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

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