This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Report stop locations in inlined functions.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]