From: Eli Zaretskii <eliz@gnu.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org, tom@tromey.com
Subject: Re: [PATCHv2] gdb/mi: New commands to catch C++ exceptions
Date: Sun, 12 May 2019 04:09:00 -0000 [thread overview]
Message-ID: <835zqgco1j.fsf@gnu.org> (raw)
In-Reply-To: <20190511234646.4992-1-andrew.burgess@embecosm.com> (message from Andrew Burgess on Sun, 12 May 2019 00:46:46 +0100)
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,
> Tom Tromey <tom@tromey.com>,
> Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Sun, 12 May 2019 00:46:46 +0100
>
> Eli,
>
> This iteration includes updated documentation that fixes almost all of
> the issues you raised. The only thing I haven't done is collapse all
> of the command sub-sections into a single sub-section. I looked
> through most of the existing MI commands and they all seem to be one
> command per sub-section, so I wasn't entirely sure how to layout a
> merged entry, nor if a merged entry was inline with the style for MI
> commands.
Understood.
> +The following @sc{gdb/mi} commands can be used to create catchpoints
> +that stop the execution when C@t{++} exceptions are being throw, rethrown,
> +or caught..
^^
Extra period.
> +@smallexample
> +-catch-throw -r exception_type
> +^done,bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
> + addr="0x00000000004006c0",what="exception throw",
> + catch-type="throw",thread-groups=["i1"],
> + regexp="exception_type",times="0"@}
> +(gdb)
> +-exec-run
> +^running
> +(gdb)
> +~"\n"
> +~"Catchpoint 1 (exception thrown), 0x00007ffff7ae00ed
> + in __cxa_throw () from /lib64/libstdc++.so.6\n"
> +*stopped,bkptno="1",reason="breakpoint-hit",disp="keep",
> + frame=@{addr="0x00007ffff7ae00ed",func="__cxa_throw",
> + args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"@},
> + thread-id="1",stopped-threads="all",core="6"
> +(gdb)
> +@end smallexample
So what GDB shows when the catchpoint triggers doesn't include the
exception's type, is that right? That's a pity; I expected it to show
the type, which could then be compared against the regexp. Oh well.
> +~"Catchpoint 1 (exception thrown), 0x00007ffff7ae00ed
It says "thrown" both for "throw" and "rethrow"? So there's no way to
distinguish between these two?
> +~"Catchpoint 1 (exception thrown), 0x00007ffff7ae00ed
And the same here? not "exception caught"?
The documentation parts are OK, thanks.
next prev parent reply other threads:[~2019-05-12 4:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 0:05 [PATCH] " Andrew Burgess
2019-05-09 21:50 ` Tom Tromey
2019-05-10 7:01 ` Eli Zaretskii
2019-05-11 23:46 ` [PATCHv2] " Andrew Burgess
2019-05-12 4:09 ` Eli Zaretskii [this message]
2019-06-15 22:34 ` Andrew Burgess
2019-06-16 13:14 ` Tom de Vries
2019-06-16 15:30 ` Andrew Burgess
2019-06-16 21:45 ` Tom de Vries
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=835zqgco1j.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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