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: RFC: don't set the pspace on ordinary breakpoints


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 (éå)


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