This is the mail archive of the gdb@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: -var-update using formatted value


On Sunday 20 January 2008 23:15:26 Nick Roberts wrote:
>  > >  > 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.
>  > 
>  > What UI-level command does this? And why, after you change format, 
>  > you don't read/display the value in new format?
> 
> Creating a watch expression (in the speedbar, in the case of Emacs) for a frame
> related structure would do this.  Yes, currently you would need to do
> -var-update after 1..
> 
> Anyway, I withdraw my objection to your patch, if the patch (or similar) in the
> thread I mentioned (http://sourceware.org/ml/gdb-patches/2006-05/msg00008.html)
> is also approved.  So there appears to be some consensus here.

FWIW, I agree that the patch in
http://sourceware.org/ml/gdb-patches/2006-05/msg00008.html
is good, as it removes the need to do -var-evaluate-expression 
or -var-update after setting variable's format.

- Volodya


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