From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PROTOTYPE] Make "info breakpoints" show breakpoint's specs (Re: [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler)
Date: Wed, 03 Jul 2019 22:37:00 -0000 [thread overview]
Message-ID: <b21c9aec-4512-1725-64c2-4f49d2bf96cf@redhat.com> (raw)
In-Reply-To: <85fe230e-ab67-0552-fe71-81f9f3762dd2@redhat.com>
On 6/24/19 8:54 PM, Pedro Alves wrote:
> I did notice that the patch currently crashes with catchpoints that
> are implemented via breakpoints, for example, and possibly
> other types:
>
> (top-gdb) catch throw
> Catchpoint 5 (throw)
> (top-gdb) info breakpoints
> 5 breakpoint keep y ../../gdb/breakpoint.c:6387: internal-error: void print_one_breakpoint_location(breakpoint*, bp_location*, int, bp_location**, int): Assertion `b->loc == NULL || b->loc->next == NULL' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)
>
> whoops. :-) I did say this was a prototype, right? :-)
Actually, turns out this is a preexisting problem.
GDB is not expecting to find more than one location for a catchpoint
backed by breakpoints. But it is now finding two locations.
The breakpoint is set at "__cxa_begin_catch", and if we do that manually,
we see what are those locations:
(top-gdb) b __cxa_begin_catch
Breakpoint 5 at 0xb126c0 (2 locations)
(top-gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x0000000000b126c0 <__cxa_begin_catch>
1.2 y 0x00007ffff2f4ddb0 in __cxxabiv1::__cxa_begin_catch(void*) at ../../../../libstdc++-v3/libsupc++/eh_catch.cc:41
Looks like a regression caused by the -qualified stuff.
I guess we want a breakpoint at <__cxa_begin_catch> only.
Should be easy to fix.
But I also suggest that "info breakpoints" shouldn't be showing any
address for "catch catch" breakpoints (and catch throw, etc.).
It's an implementation detail that these catchpoints are implemented
as magic breakpoints.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-07-03 22:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 12:34 [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler Andrew Burgess
2019-06-20 1:11 ` Kevin Buettner
2019-06-20 20:58 ` Andrew Burgess
2019-06-20 23:23 ` Andrew Burgess
2019-06-21 3:20 ` Kevin Buettner
2019-06-21 13:43 ` Pedro Alves
2019-06-22 11:06 ` Andrew Burgess
2019-06-22 11:23 ` Andrew Burgess
2019-06-24 19:16 ` Pedro Alves
2019-06-24 19:54 ` [PROTOTYPE] Make "info breakpoints" show breakpoint's specs (Re: [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler) Pedro Alves
2019-07-03 22:37 ` Pedro Alves [this message]
2019-06-24 19:16 ` [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler Pedro Alves
2019-07-01 17:12 ` Andrew Burgess
2019-07-01 18:03 ` [PATCHv2 2/2] " Andrew Burgess
2019-07-03 22:13 ` Pedro Alves
2019-07-01 18:03 ` [PATCHv2 0/2] Changes for explicit_line tracking, and prologue skipping Andrew Burgess
2019-07-01 18:03 ` [PATCHv2 1/2] gdb: Remove unneeded parameter from set_breakpoint_location_function Andrew Burgess
2019-07-03 22:13 ` Pedro Alves
2019-07-01 18:21 ` [PATCH] gdb: Don't skip prologue for explicit line breakpoints in assembler Pedro Alves
2019-07-02 8:28 ` Andrew Burgess
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=b21c9aec-4512-1725-64c2-4f49d2bf96cf@redhat.com \
--to=palves@redhat.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.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