This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: -var-update and address changes
On Monday 17 April 2006 12:40, Mark Kettenis wrote:
> > And that PC is of some use too. I some distant future, I want to make
> > KDevelop remember the state of variables tree for a specific frame. Say,
> > you've entered function 'foo' and switched display format for variable
> > 'mask' from 'natural' to 'binary'. You probably want binary format to be
> > used whenever you enter 'foo' next time. Using frame PC is one way to
> > capture the current frame. It's not ideal, since frame address can change
> > on recompilation, but on the other hand, the worst thing that will happen
> > is that you'll use wrong format for a variable, which is not big
> > problems.
> >
> > So, I think frame PC is useful on it's own.
>
> Address space randomization (used by OpenBSD and any halfway decent
> Linux distribution) will kill this idea completely. The frame ID will
> vary from run to run on those systems.
I know and would appreciate a more reliable mechanism (say, opaque "scope
id"). Even with address randomization things will work if you enter the same
function several times without restarting application.
- Volodya