From: Nick Roberts <nickrob@snap.net.nz>
To: gdb-patches@sources.redhat.com
Subject: Re: MI: type prefixes for values
Date: Mon, 13 Mar 2006 02:44:00 -0000 [thread overview]
Message-ID: <17427.54333.236860.258115@kahikatea.snap.net.nz> (raw)
In-Reply-To: <dt43qh$sns$1@sea.gmane.org>
> Also, I note that gdb is currently inconsitent even within itself:
>
> (gdb)
> -thread-select 2
> ^done,new-thread-id="2",frame={level="0",func="thread",
> args=[{name="p",value="0x0"}],..........
> (gdb)
> -stack-list-arguments 1 0 0
> ^done,stack-args=[frame={level="0",
> args=[{name="p",value="(void *) 0x0"}]}]
>
> Note that first output has "0x0" as value of 'p', and the second has
> "(void *)0x0".
Here's a patch that doesn't print the type with the value for
-stack-list-arguments and -stack-list-list-locals (they both use
list_args_or_locals).
The screenshot http://www.inet.net.nz/~nickrob/gdb-ui.png shows the
duplication that arises from the current code (in the upper right hand
window (locals of emacs) of the Emacs frame).
Nick
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.
*** mi-cmd-stack.c 05 Jan 2006 10:56:18 +1300 1.29
--- mi-cmd-stack.c 12 Mar 2006 19:44:08 +1300
*************** list_args_or_locals (int locals, int val
*** 278,283 ****
--- 278,284 ----
{
struct cleanup *cleanup_tuple = NULL;
struct symbol *sym2;
+ struct value *val;
if (values != PRINT_NO_VALUES)
cleanup_tuple =
make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
*************** list_args_or_locals (int locals, int val
*** 300,312 ****
&& TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION)
{
! print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
}
do_cleanups (cleanup_tuple);
break;
case PRINT_ALL_VALUES:
! print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
do_cleanups (cleanup_tuple);
break;
--- 301,317 ----
&& TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION)
{
! val = read_var_value (sym2, fi);
! common_val_print
! (val, stb->stream, 0, 0, 2, Val_no_prettyprint);
ui_out_field_stream (uiout, "value", stb);
}
do_cleanups (cleanup_tuple);
break;
case PRINT_ALL_VALUES:
! val = read_var_value (sym2, fi);
! common_val_print
! (val, stb->stream, 0, 0, 2, Val_no_prettyprint);
ui_out_field_stream (uiout, "value", stb);
do_cleanups (cleanup_tuple);
break;
next parent reply other threads:[~2006-03-12 7:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <dt43qh$sns$1@sea.gmane.org>
2006-03-13 2:44 ` Nick Roberts [this message]
2006-03-17 19:32 ` Vladimir Prus
2006-03-17 19:41 ` Daniel Jacobowitz
2006-03-21 14:58 ` Vladimir Prus
2006-03-24 4:30 ` Daniel Jacobowitz
2006-03-24 9:46 ` Vladimir Prus
2006-03-24 21:02 ` Daniel Jacobowitz
2006-04-06 8:42 ` Vladimir Prus
2006-04-28 6:32 ` Vladimir Prus
2006-05-05 19:25 ` Daniel Jacobowitz
2006-05-06 9:59 ` Nick Roberts
2006-05-15 16:57 ` Daniel Jacobowitz
2006-05-16 6:10 ` Nick Roberts
2007-02-03 5:31 ` MI: type prefixes for values [PATCH] Nick Roberts
2007-02-04 14:16 ` Daniel Jacobowitz
2007-02-04 21:46 ` Nick Roberts
2006-03-17 22:25 ` MI: type prefixes for values Daniel Jacobowitz
2006-03-18 18:39 ` Nick Roberts
2006-03-20 6:50 ` Daniel Jacobowitz
2006-03-21 10:22 ` Nick Roberts
2006-03-24 4:25 ` Daniel Jacobowitz
2006-03-24 5:26 ` Nick Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17427.54333.236860.258115@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox