This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: don't set the pspace on ordinary breakpoints
- From: Yao Qi <yao at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 31 Oct 2011 17:41:00 +0800
- Subject: Re: RFC: don't set the pspace on ordinary breakpoints
- References: <m3lis6h35l.fsf@fleche.redhat.com>
On 10/27/2011 11:20 PM, Tom Tromey wrote:
> First, it changes ordinary breakpoints to set leave their 'pspace' field
> NULL. The rationale for this is that, with the ambiguous linespec
> patch, a linespec may apply to different program spaces, not just the
> one which was selected when the breakpoint was created. For these
> breakpoints, we do not want breakpoint_program_space_exit to remove the
> breakpoint.
>
> @@ -5817,9 +5819,11 @@ init_raw_breakpoint (struct breakpoint *b,
struct gdbarch *gdbarch,
> b->loc->address = adjusted_address;
> b->loc->pspace = sal.pspace;
>
> - /* Store the program space that was used to set the breakpoint, for
> - breakpoint resetting. */
> - b->pspace = sal.pspace;
> + /* Store the program space that was used to set the breakpoint,
> + except for ordinary breakpoints, which are independent of the
> + program space. */
> + if (bptype != bp_breakpoint && bptype != bp_hardware_breakpoint)
> + b->pspace = sal.pspace;
Looks "ordinary breakpoints" includes bp_breakpoint and
bp_hardware_breakpoint. However, as you described above, IIUC,
'ambiguous linespec' should apply to trap tracepoint and fast tracepoint
as well.
--
Yao (éå)