Bug#562766: gdb does not support 'break exception'
found 562766 6.8-3 found 562766 7.1-1 thanks In both 6.8-3 and 7.1-1, I experienced the problem that Stephe reported, i.e. (gdb) catch throw Function __cxa_throw not defined. Catchpoint 1 (throw) I believe this all depends on whether the debuggee includes object code compiled from C++ or not. I still believe this is a bug in gdb, not gnat; the GDB doc says gdb supports Ada exceptions. -- Ludovic Brenta. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#562766: gdb does not support 'break exception'
On Mon, Dec 28, 2009 at 03:09:10PM +, Debian Bug Tracking System wrote: Processing commands for cont...@bugs.debian.org: reassign 562766 gdb Bug #562766 [gnat-4.4] gdb does not support 'break exception' Bug reassigned from package 'gnat-4.4' to 'gdb'. Bug No longer marked as found in versions gnat-4.4/4.4.2-4. I'm confused by this reassignment. Does catch throw work, as Ludovic wrote in the bug report? If so, is this a bug in the GNAT documentation rather than GDB? -- Daniel Jacobowitz CodeSourcery -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#562766: gdb does not support 'break exception'
Daniel Jacobowitz d...@debian.org writes: On Mon, Dec 28, 2009 at 03:09:10PM +, Debian Bug Tracking System wrote: Processing commands for cont...@bugs.debian.org: reassign 562766 gdb Bug #562766 [gnat-4.4] gdb does not support 'break exception' Bug reassigned from package 'gnat-4.4' to 'gdb'. Bug No longer marked as found in versions gnat-4.4/4.4.2-4. I'm confused by this reassignment. Does catch throw work, as Ludovic wrote in the bug report? If so, is this a bug in the GNAT documentation rather than GDB? I believe the GNAT User's Guide is out of sync with the GDB manual and moreover, GNAT should not attempt to describe GDB, so let's ignore the GNAT User's Guide for now. The GDB 7.0 manual documents the catch command with these relevant arguments: @item throw @cindex stop on c...@t{++} exceptions The throwing of a c...@t{++} exception. @item catch The catching of a c...@t{++} exception. @item exception @cindex Ada exception catching @cindex catch Ada exceptions An Ada exception being raised. If an exception name is specified at the end of the command (eg @code{catch exception Program_Error}), the debugger will stop only when this specific exception is raised. Otherwise, the debugger stops execution when any Ada exception is raised. When inserting an exception catchpoint on a user-defined exception whose name is identical to one of the exceptions defined by the language, the fully qualified name must be used as the exception name. Otherwise, @value{GDBN} will assume that it should stop on the pre-defined exception rather than the user-defined one. For instance, assuming an exception called @code{Constraint_Error} is defined in package @code{Pck}, then the command to use to catch such exceptions is @kbd{catch exception Pck.Constraint_Error}. @item exception unhandled An exception that was raised but is not handled by the program. @item assert A failed Ada assertion. Therefore, the following commands ought to work in GDB 7.0 but don't: catch exception Exception_Name catch exception catch exception unhandled catch assert In contrast, catch throw works but it is impossible to specify the name of an Ada exception; this is roughly equivalent to catch exception without an argument, so this is only a partial solution. The bug is real, sadly :) -- Ludovic Brenta. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#562766: gdb does not support 'break exception'
package 562766 gdb tags 562766 upstream found 562766 gdb/7.0-1 notfound gnat-4.4/4.4.2-4 thanks This is an upstream bug; see http://sourceware.org/ml/gdb/2009-10/msg00020.html and http://gcc.gnu.org/ml/gcc-help/2009-11/msg00214.html This problem is in gdb, not gnat. -- Ludovic Brenta. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#562766: gdb does not support 'break exception'
It looks like catch throw (as opposed to catch exception) works. -- Ludovic Brenta. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#562766: gdb does not support 'break exception'
Package: gnat-4.4 Version: 4.4.2-4 I'm debugging Ada code compiled with gnat-4.4. gdb supports Ada: (gdb) show lang The current source language is auto; currently ada. However, it does not suppor the 'break exception' command: (gdb) break exception exception is not a function 'catch exception' does not work for Ada: (gdb) catch exception Cannot insert catchpoints in this configuration. The 'break exception' command is documented in the gnat-4.3-doc info manual: File: gnat_ugn-4.3.info, Node: Ada Exceptions, Next: Ada Tasks, Prev: Using the Next Command in a Function, Up: Running and Debugging Ada Programs *Note (gnat_ugn-4.3)Top:: *Note Running and Debugging Ada Programs:: Ada Exceptions 26.7 Breaking on Ada Exceptions === You can set breakpoints that trip when your program raises selected exceptions. `break exception' Set a breakpoint that trips whenever (any task in the) program raises any exception. The gnat-4.4-doc package is not yet available. 'break exception' is supported in the gdb included in the GNAT GPL and Pro distributions. -- -- Stephe -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org