This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/12174] gdb.GdbError exceptions should not be translatedto RuntimeError exceptions
- From: "pmuldoon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 21 Mar 2011 20:14:32 +0000
- Subject: [Bug python/12174] gdb.GdbError exceptions should not be translatedto RuntimeError exceptions
- Auto-submitted: auto-generated
- References: <bug-12174-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12174
--- Comment #1 from Phil Muldoon <pmuldoon at redhat dot com> 2011-03-21 20:03:42 UTC ---
It actually took me a few hours of hacking to figure this out. It's not
really a bug in that you will never have anything that faces Python (ie
can be called from a Python script) that will just print a message and
no stack trace. gdb.GdbError gets converted to a GDB exception which
has its own handling mechanism within GDB. When a GDB exception
ends up at the border between the Python API and GDB it gets converted
into a Python exception. Python has no idea how to deal with a GDB
exception. So in this case it went from a gdb.GdbError to a GDB
Exception back to a GdbError exception. This is usless, but
harmless. This is the case with gdb.execute, gdb.parse_and_eval and
a few other functions.
As far as I know, there is no Python C API to deal specifically
or alter how Python prints backtraces from exceptions. We seem to be
able to either print it or not.
I'll leave this open for a few days in case you disagree, or know of some other
way to fix the bug. After that will close it.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.