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 Tuesday 08 November 2011 20:23:13, Tom Tromey wrote:
> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
> 
> Tom> I think I will change linespec to ignore program spaces in this state.
> 
> The appended has two parts: the linespec.c change, relative to the big
> patch I posted, and the breakpoint.c change I think is needed too.  Only
> the latter makes sense in the context of this thread.
> 
> I *think* the should_be_inserted change is all that was really needed,
> after re-reading all the messages in this thread.  Let me know what you
> think.

I think so, but it's hard to tell, given that the dependency
on the linespec.c changes.

E.g.,

> @@ -1327,6 +1329,12 @@ decode_indirect (struct linespec_state *self, char **argptr)
>    CORE_ADDR pc;
>    char *initial = *argptr;
>    
> +  if (current_program_space->executing_startup)
> +    /* The error message doesn't really matter, because this case
> +       should only hit during breakpoint reset.  */
> +    throw_error (NOT_FOUND_ERROR, _("cannot evaluate expressions while "
> +                                   "program space is in startup"));

Why is is okay to look at current_program_space here, if you're
iterating over pspaces elsewhere?

Any chance we can have a standalone patch for just the
startup-disabled changes?  We'd need something like my previous
suggestion in bkpt_re_set (even if we'd remain buggy WRT
multi-process).

-- 
Pedro Alves


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