This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Report stop locations in inlined functions.
- From: Pedro Alves <palves at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 18 Jul 2017 18:46:34 +0100
- Subject: Re: [PATCH 2/2] Report stop locations in inlined functions.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E942861BBB
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E942861BBB
- References: <1499740601-15957-1-git-send-email-keiths@redhat.com> <1499740601-15957-2-git-send-email-keiths@redhat.com> <4bfba041-22f5-1650-1f83-0f8860f202fb@redhat.com>
On 07/18/2017 06:16 PM, Pedro Alves wrote:
> On 07/11/2017 03:36 AM, Keith Seitz wrote:
>> I don't quite like this, though. This solution involves calling
>> decode_line_full, and that is really expensive, so I would be grateful if
>> maintaienrs could offer advice on how to better tackle this.
>
> I'm still trying to grok these patches fully, but, shouldn't comparing
> the breakpoint's bp_location's addresses work the same? I.e., with this,
> gdb.opt/inline-break.exp still passes cleanly here:
>
Hmm, and with this direction, we may not even need the
breakpoint_for_stop function. The location(s) that caused
the stop is/are in the bpstat chain:
stop_chain->bp_location_at->address
etc. Using those also implicitly makes sure that you're only
consulting locations that were inserted/enabled, as other
not-enabled/inserted locations won't appear in the bpstat chain.
Maybe we need to move this bit in infrun.c:
/* See if there is a breakpoint/watchpoint/catchpoint/etc. that
handles this event. */
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
stop_pc, ecs->ptid, &ecs->ws, stop_chain);
a bit above, before the skip_inline_frames call, and then
you don't even need to pass down the bpstat to skip_inline_frames,
as you can then access it from the thread directly?
Thanks,
Pedro Alves