* [PATCH] Fix python compatibility with old gdb versions
@ 2017-03-08 7:23 Orgad Shaneh
2017-06-11 13:55 ` Orgad Shaneh
0 siblings, 1 reply; 3+ messages in thread
From: Orgad Shaneh @ 2017-03-08 7:23 UTC (permalink / raw)
To: gdb-patches
Type.name was introduced in GDB 7.9.
---
gdb/python/lib/gdb/printing.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/python/lib/gdb/printing.py b/gdb/python/lib/gdb/printing.py
index 181701c719..106da4ac8b 100644
--- a/gdb/python/lib/gdb/printing.py
+++ b/gdb/python/lib/gdb/printing.py
@@ -205,7 +205,7 @@ class RegexpCollectionPrettyPrinter(PrettyPrinter):
# Get the type name.
typename = gdb.types.get_basic_type(val.type).tag
- if not typename:
+ if not typename and hasattr(val.type, "name"):
typename = val.type.name
if not typename:
return None
--
2.12.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix python compatibility with old gdb versions
2017-03-08 7:23 [PATCH] Fix python compatibility with old gdb versions Orgad Shaneh
@ 2017-06-11 13:55 ` Orgad Shaneh
2017-06-11 17:27 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Orgad Shaneh @ 2017-06-11 13:55 UTC (permalink / raw)
To: gdb-patches
On Wed, Mar 8, 2017 at 10:23 AM, Orgad Shaneh <orgads@gmail.com> wrote:
>
> Type.name was introduced in GDB 7.9.
> ---
> gdb/python/lib/gdb/printing.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/python/lib/gdb/printing.py b/gdb/python/lib/gdb/printing.py
> index 181701c719..106da4ac8b 100644
> --- a/gdb/python/lib/gdb/printing.py
> +++ b/gdb/python/lib/gdb/printing.py
> @@ -205,7 +205,7 @@ class RegexpCollectionPrettyPrinter(PrettyPrinter):
>
> # Get the type name.
> typename = gdb.types.get_basic_type(val.type).tag
> - if not typename:
> + if not typename and hasattr(val.type, "name"):
> typename = val.type.name
> if not typename:
> return None
> --
> 2.12.0.windows.1
ping?
- Orgad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix python compatibility with old gdb versions
2017-06-11 13:55 ` Orgad Shaneh
@ 2017-06-11 17:27 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2017-06-11 17:27 UTC (permalink / raw)
To: Orgad Shaneh; +Cc: gdb-patches
On 2017-06-11 15:55, Orgad Shaneh wrote:
> On Wed, Mar 8, 2017 at 10:23 AM, Orgad Shaneh <orgads@gmail.com> wrote:
>>
>> Type.name was introduced in GDB 7.9.
>> ---
>> gdb/python/lib/gdb/printing.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/python/lib/gdb/printing.py
>> b/gdb/python/lib/gdb/printing.py
>> index 181701c719..106da4ac8b 100644
>> --- a/gdb/python/lib/gdb/printing.py
>> +++ b/gdb/python/lib/gdb/printing.py
>> @@ -205,7 +205,7 @@ class
>> RegexpCollectionPrettyPrinter(PrettyPrinter):
>>
>> # Get the type name.
>> typename = gdb.types.get_basic_type(val.type).tag
>> - if not typename:
>> + if not typename and hasattr(val.type, "name"):
>> typename = val.type.name
>> if not typename:
>> return None
>> --
>> 2.12.0.windows.1
>
> ping?
>
> - Orgad
Hi Orgad,
Thanks for submitting this, and sorry for the wait. Could you provide a
little bit of context to help others understand what's wrong? Can you
give some details on how to reproduce the problem? Make sure to add it
to the commit message.
Also, please include a ChangeLog entry in your commit message, more
details here:
https://sourceware.org/gdb/wiki/ContributionChecklist#Properly_Formatted_GNU_ChangeLog
If anything is not clear, please ask.
Thanks,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-11 17:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 7:23 [PATCH] Fix python compatibility with old gdb versions Orgad Shaneh
2017-06-11 13:55 ` Orgad Shaneh
2017-06-11 17:27 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox