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: MI: type prefixes for values


On Fri, Mar 17, 2006 at 07:07:17PM +0300, Vladimir Prus wrote:
> Nick Roberts wrote:
> 
> > 2006-03-12  Nick Roberts  <nickrob@snap.net.nz>
> > 
> > * mi/mi-cmd-stack.c (list_args_or_locals): Use common_val_print
> > instead of print_variable_value so that type doesn't get printed
> > with value.
> 
> This patch is much more important that value formatting, in fact. Without
> it, if there's local reference variable that's no initialized, we get this
> output from gdb:
> 
>    (gdb) -stack-list-locals --all-values 
>    Cannot access memory at address 0x1
>    ^error,msg="Cannot access memory at address 0x1"
> 
> Essentially, I can't see any local variables. This patch fixes this too,
> because, I believe, common_val_print does check for non-dereferencable
> values. Changelogs say common_val_print was specifically added for this
> purpose.

Did you try this?  I don't think it will: common_val_print was added
for the optimized-out case, not for the memory-error case, which should
be handled somewhere else.

-- 
Daniel Jacobowitz
CodeSourcery


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