This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: -var-update using formatted value
> > I don't like this change. If I change the format to hexadecimal, 11 -> 0xb
> > say, the display should change, so I would like GDB to report it through
> > -var-update.
>
> Why? It seems to me that if user does "change format" in UI, then UI should:
>
> 1. Change format
> 2. Display the value shown according to the new format
In this case, GDB needs to print the value of the new format. I did submit a
patch to do this in the thread:
http://sourceware.org/ml/gdb-patches/2006-05/msg00008.html
but it never got approved. I've now configured Emacs (but can revert) for
current behaviour.
> I cannot imagine any usecase where the frontend would:
>
> 1. Change format
> 2. Step program
> 3. Issue -var-update
I'm not sure what point you're making here. Debugging GDB, has variables which
contain addresses which are not pointers (so the natural format is decimal),
e.g., stack_addr, code_addr components of frames. It makes sense here to:
1. Change format to hexadecimal
2. Step GDB
3. Issue -var-update to see if these values have changed.
--
Nick http://www.inet.net.nz/~nickrob