This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] -data-list-changed-registers
On Sat, Jun 04, 2005 at 10:36:05AM +1200, Nick Roberts wrote:
> Daniel Jacobowitz writes:
> > On Wed, Jun 01, 2005 at 11:12:01PM +1200, Nick Roberts wrote:
> > >
> > > Currently the GDB/MI command -data-list-changed-registers gives an internal
> > > error if there is no stack i.e when there is no inferior process:
> >
> > This has come up before; the right solution is elsewhere. I believe
> > that updating register_changed_p and get_register to use
> > get_selected_frame() will work.
> >
> > I have a big patch for this sort of thing lying around, but the problem
> > is that many of the references to deprecated_selected_frame should
> > really by fixed by adding a frame parameter to the function, so that
> > they can be used on non-selected frames. They need to be looked over
> > one by one and I haven't gotten round to it yet.
>
> Could this patch be applied as an interim measure? Currently any front end
> that uses -data-list-changed-registers without a stack crashes.
I would prefer not to; right now the presence of
deprecated_selected_frame is a good warning sign. I can find you a
copy if you want to look at individual places that should be
investigated.
I think the changes are right in this case, though. Could you take a
look at those two functions (the change to make is obvious) and see if
that fixes your problem?
--
Daniel Jacobowitz
CodeSourcery, LLC