This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove stale breakpoint step-over information
- From: Pedro Alves <palves at redhat dot com>
- To: "Maciej W. Rozycki" <macro at wdc dot com>, gdb-patches at sourceware dot org
- Cc: Jim Wilson <jimw at sifive dot com>
- Date: Thu, 31 Oct 2019 17:46:20 +0000
- Subject: Re: [PATCH] Remove stale breakpoint step-over information
- References: <alpine.LFD.2.21.1910182100030.2438@redsun52.ssa.fujisawa.hgst.com>
On 10/19/19 8:10 PM, Maciej W. Rozycki wrote:
> Correct the issue by making a call to clear global breakpoint step-over
> information from `exit_inferior_1', which is where we already do all
> kinds of similar clean-ups, e.g. `delete_thread' called from there
> clears per-thread step-over information.
>
This looks like a fragile place to clear this, considering
multiprocess. I.e., what if we're calling exit_inferior for some
inferior other than the one that was stepping.
The step over information is associated with a thread.
I think it'd be better to clear the step over information
when the corresponding thread is deleted.
So something like adding a thread_info parameter to
clear_step_over_info, and then calling clear_step_over_info
from clear_thread_inferior_resources. clear_step_over_info
would only clear the info if the thread matched, or if NULL
is passed. Would that work?
Thanks,
Pedro Alves