From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: FYI: fix error in py-type.c
Date: Wed, 06 Feb 2013 16:54:00 -0000 [thread overview]
Message-ID: <877gmlxu1l.fsf@fleche.redhat.com> (raw)
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
next reply other threads:[~2013-02-06 16:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 16:54 Tom Tromey [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gmlxu1l.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox