This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix error in py-type.c
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 06 Feb 2013 09:53:58 -0700
- Subject: FYI: fix error in py-type.c
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