Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* FYI: fix error in py-type.c
@ 2013-02-06 16:54 Tom Tromey
  2013-02-06 21:51 ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2013-02-06 16:54 UTC (permalink / raw)
  To: gdb-patches

I'm checking this in.

Today I resurrected my gcc plugin for checking gdb exception handling:

    http://sourceware.org/ml/gdb/2011-11/msg00002.html

It found a bug in py-type.c:

../../archer/gdb/python/py-type.c:415: error: function typy_strip_typedefs is marked nothrow but can throw
../../archer/gdb/python/py-type.c:426: info: via call to check_typedef
../../archer/gdb/gdbtypes.c:1552: info: via call to lookup_symbol
../../archer/gdb/symtab.c:1225: info: via call to lookup_symbol_in_language
../../archer/gdb/symtab.c:1210: info: via call to lookup_symbol_aux
../../archer/gdb/symtab.c:1353: info: via call to error
../../archer/gdb/utils.c:720: info: via call to throw_verror

The fix is to remove the extra call to check_typedef.  It isn't needed
anyway, due to the (correct) code earlier in the function.

Built and tested on x86-64 Fedora 16.

Tom

2013-02-06  Tom Tromey  <tromey@redhat.com>

	* python/py-type.c (typy_strip_typedefs): Don't call check_typedef
	outside of TRY_CATCH.

Index: python/py-type.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-type.c,v
retrieving revision 1.46
diff -u -r1.46 py-type.c
--- python/py-type.c	1 Jan 2013 06:33:01 -0000	1.46
+++ python/py-type.c	6 Feb 2013 16:50:53 -0000
@@ -423,7 +423,7 @@
     }
   GDB_PY_HANDLE_EXCEPTION (except);
 
-  return type_to_type_object (check_typedef (type));
+  return type_to_type_object (type);
 }
 
 /* Strip typedefs and pointers/reference from a type.  Then check that


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FYI: fix error in py-type.c
  2013-02-06 16:54 FYI: fix error in py-type.c Tom Tromey
@ 2013-02-06 21:51 ` Doug Evans
  2013-02-06 22:00   ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2013-02-06 21:51 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Wed, Feb 6, 2013 at 8:53 AM, Tom Tromey <tromey@redhat.com> wrote:
> I'm checking this in.
>
> Today I resurrected my gcc plugin for checking gdb exception handling:
>
>     http://sourceware.org/ml/gdb/2011-11/msg00002.html

Something for gdb/contrib?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FYI: fix error in py-type.c
  2013-02-06 21:51 ` Doug Evans
@ 2013-02-06 22:00   ` Tom Tromey
  2013-02-07 19:22     ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2013-02-06 22:00 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> On Wed, Feb 6, 2013 at 8:53 AM, Tom Tromey <tromey@redhat.com> wrote:
>> I'm checking this in.
>> 
>> Today I resurrected my gcc plugin for checking gdb exception handling:
>> 
>> http://sourceware.org/ml/gdb/2011-11/msg00002.html

Doug> Something for gdb/contrib?

Yeah, I was considering it today.
It still gives too many false reports, but I was thinking maybe I could
fix that.

Tom


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FYI: fix error in py-type.c
  2013-02-06 22:00   ` Tom Tromey
@ 2013-02-07 19:22     ` Doug Evans
  2013-02-07 20:58       ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2013-02-07 19:22 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Wed, Feb 6, 2013 at 2:00 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> On Wed, Feb 6, 2013 at 8:53 AM, Tom Tromey <tromey@redhat.com> wrote:
>>> I'm checking this in.
>>>
>>> Today I resurrected my gcc plugin for checking gdb exception handling:
>>>
>>> http://sourceware.org/ml/gdb/2011-11/msg00002.html
>
> Doug> Something for gdb/contrib?
>
> Yeah, I was considering it today.
> It still gives too many false reports, but I was thinking maybe I could
> fix that.

I think the bar for contrib is in general lower.
I think you should feel free to add the FIXMEs you deem appropriate
and check it in.
[... and maybe leverage the net to fix them for you :-)]


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FYI: fix error in py-type.c
  2013-02-07 19:22     ` Doug Evans
@ 2013-02-07 20:58       ` Tom Tromey
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2013-02-07 20:58 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> I think the bar for contrib is in general lower.
Doug> I think you should feel free to add the FIXMEs you deem appropriate
Doug> and check it in.
Doug> [... and maybe leverage the net to fix them for you :-)]

I'll send the series in a minute.

What I did is add some options to the summarizer script.
The default is to disable reporting for the checks that are generally
not useful.  I checked the indirect function call errors and for the
most part they aren't important.

After the series I still get the appended.
This is a bug, but pretty obscure.

Tom

../../archer/gdb/python/py-cmd.c:404: error: function cmdpy_init is marked nothrow but can throw
../../archer/gdb/python/py-cmd.c:451: info: via call to gdbpy_parse_command_name
../../archer/gdb/python/py-cmd.c:359: info: via call to lookup_cmd_1
../../archer/gdb/cli/cli-decode.c:1381: info: via call to deprecated_cmd_warning
../../archer/gdb/cli/cli-decode.c:1587: info: via call to printf_filtered
../../archer/gdb/utils.c:2437: info: via call to vfprintf_filtered
../../archer/gdb/utils.c:2348: info: via call to vfprintf_maybe_filtered
../../archer/gdb/utils.c:2340: info: via call to fputs_maybe_filtered
../../archer/gdb/utils.c:2112: info: via call to prompt_for_continue
../../archer/gdb/utils.c:1902: info: via call to quit
../../archer/gdb/utils.c:1142: info: via call to fatal
../../archer/gdb/utils.c:740: info: via call to throw_vfatal
../../archer/gdb/python/py-param.c:655: error: function parmpy_init is marked nothrow but can throw
../../archer/gdb/python/py-param.c:709: info: via call to gdbpy_parse_command_name
../../archer/gdb/python/py-cmd.c:359: info: via call to lookup_cmd_1
../../archer/gdb/cli/cli-decode.c:1381: info: via call to deprecated_cmd_warning
../../archer/gdb/cli/cli-decode.c:1587: info: via call to printf_filtered
../../archer/gdb/utils.c:2437: info: via call to vfprintf_filtered
../../archer/gdb/utils.c:2348: info: via call to vfprintf_maybe_filtered
../../archer/gdb/utils.c:2340: info: via call to fputs_maybe_filtered
../../archer/gdb/utils.c:2112: info: via call to prompt_for_continue
../../archer/gdb/utils.c:1902: info: via call to quit
../../archer/gdb/utils.c:1142: info: via call to fatal
../../archer/gdb/utils.c:740: info: via call to throw_vfatal


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-07 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 16:54 FYI: fix error in py-type.c Tom Tromey
2013-02-06 21:51 ` Doug Evans
2013-02-06 22:00   ` Tom Tromey
2013-02-07 19:22     ` Doug Evans
2013-02-07 20:58       ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox