This is the mail archive of the
mailing list for the GDB project.
Re: RFC: don't set the pspace on ordinary breakpoints
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 2 Nov 2011 18:54:42 +0000
- Subject: Re: RFC: don't set the pspace on ordinary breakpoints
- References: <email@example.com>
On Thursday 27 October 2011 16:20:38, Tom Tromey wrote:
> I would appreciate comments on this patch.
> This is the second of two patches in preparation for my "ambiguous
> linespec" patch. I think they are reasonably independent so I am
> sending them separately.
> This patch does two things.
Could have been two independent patches.
> 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
I'm not clear how this isn't breaking multi-process without
the linespec changes. I mean, if we no longer have a pspace
pointer, breakpoint re-setting will no longer work correctly.
(breakpoint_re_set -> ... -> prepare_re_set_context)
> I looked at removing the pspace field entirely. Internal breakpoints
> often set this field, though, and I chose not to touch all this code in
> hopes of keeping the patch down to a reasonable size. So, I left the
> field and added a special meaning for NULL.
> Second, this patch removes bp_startup_disabled. Instead, I changed
> should_be_inserted to directly examine the location's pspace, and I
> changed one spot (update_global_location_list) to use should_be_inserted
> to pick this up.
I don't think that's correct. During startup, we disable user breakpoints,
because the symbols haven't been relocated yet. But, we still need to
insert internal breakpoints set at magic addresses (not through symbols), so
that we know when the startup is done with. Ulrich?