Bug 9598 - help catch is outdated regarding C++ exceptions
Summary: help catch is outdated regarding C++ exceptions
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: 6.8
: P3 enhancement
Target Milestone: 7.5
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-05 15:08 UTC by Phil Muldoon
Modified: 2012-01-11 18:36 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Muldoon 2008-08-05 15:08:02 UTC
[Converted from Gnats 2493]

help catch details regarding exceptions:

Raised exceptions may be caught:
	catch throw               - all exceptions, when thrown
	catch throw <exceptname>  - a particular exception, when thrown
	catch catch               - all exceptions, when caught
	catch catch <exceptname>  - a particular exception, when caught


and

C++ exceptions may be caught:
	catch throw               - all exceptions, when thrown
	catch catch               - all exceptions, when caught


These are essentially the same.

catch throw <<exception>> and catch catch <<exception>> do not work, and have no support.

catch catch and catch throw both place breakpoints in the C++ throw code (__cxa_throw) and catch (__cxa_begin_catch) code so are in fact C++ specific.  As far as I can tell it has always been this way in these specific handlers

Release:
6.8
Comment 1 Phil Muldoon 2008-08-05 15:08:02 UTC
Fix:
The generic section of catch catch/throw needs to be deleted while preserving the C++ specific text.
Comment 2 Mark Wielaard 2011-02-02 16:21:35 UTC
Or instead of removing the help text about being able to handle only named catch/throws, implement the <exceptionname> feature. It actually looks useful. I was a little sad it didn't work after reading the help text.
Comment 3 cvs-commit@gcc.gnu.org 2012-01-11 18:30:32 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	tromey@sourceware.org	2012-01-11 18:30:20

Modified files:
	gdb            : ChangeLog breakpoint.c 

Log message:
	PR gdb/9598:
	* breakpoint.c (_initialize_breakpoint): Fix help for "catch
	catch" and "catch throw".

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13730&r2=1.13731
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&r1=1.639&r2=1.640
Comment 4 Tom Tromey 2012-01-11 18:36:19 UTC
(In reply to comment #2)
> Or instead of removing the help text about being able to handle only named
> catch/throws, implement the <exceptionname> feature. It actually looks useful.
> I was a little sad it didn't work after reading the help text.

I filed PR 13588 for this.

Meanwhile, the documentation bug is fixed.