This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MI: type prefixes for values
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 17 Mar 2006 19:07:17 +0300
- Subject: Re: MI: type prefixes for values
- References: <dt43qh$sns$1@sea.gmane.org> <17427.54333.236860.258115@kahikatea.snap.net.nz>
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.
- Volodya