Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb@sources.redhat.com
Subject: Re: MI: type prefixes for values
Date: Fri, 17 Feb 2006 10:22:00 -0000	[thread overview]
Message-ID: <u8xsai8tk.fsf@gnu.org> (raw)
In-Reply-To: <dt43qh$sns$1@sea.gmane.org> (message from Vladimir Prus on Fri, 	17 Feb 2006 12:08:32 +0300)

> From:  Vladimir Prus <ghost@cs.msu.su>
> Date:  Fri, 17 Feb 2006 12:08:32 +0300
> 
> some time ago I've raised the question why MI output sometimes prefixes
> variable values with it's type. For example:
> 
>    -data-evaluate-expression *p3
>    ^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>"
>    (gdb)
> 
> (note the {int (int)} part). The part does not make sense for a GUI and must
> be removed by a specially written code.
> 
> See:
> 
>    http://article.gmane.org/gmane.comp.gdb.devel/13477

And you were answered in that thread that this prefix is to show you
the signature of a function to which p3 is a pointer.  That is, GDB is
telling you that p3 points to a function which accepts a single int
argument and returns an int.

> In the end, I've inquired why such prefixes cannot be dropped:
> 
>   http://article.gmane.org/gmane.comp.gdb.devel/13539

Are you saying that you don't want to show your users the fact that
the pointed object is a function?

> I imagine it's a simple matter of wrapping some code in
> "ui_output_is_mi_like_p". Can somebody comment on this proposal?

I think this will lose useful information.  So for now I object.

> 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". 

Also, the first one shows the func= part, the second doesn't.  Looks
like a bug to me: those two should both use the same code.

> So, can a clear decision be made if the type prefixes has a place in MI, or
> should be removed?

At least for functions, they convey useful information.


  reply	other threads:[~2006-02-17 10:22 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17  9:09 Vladimir Prus
2006-02-17 10:22 ` Eli Zaretskii [this message]
2006-02-17 10:29   ` Vladimir Prus
2006-02-17 11:26     ` Eli Zaretskii
     [not found]       ` <200602171450.16858.ghost@cs.msu.su>
2006-02-17 13:49         ` Eli Zaretskii
2006-02-17 13:54           ` Daniel Jacobowitz
2006-02-17 14:08             ` Eli Zaretskii
2006-02-17 13:58           ` Vladimir Prus
2006-02-17 14:11             ` Eli Zaretskii
2006-02-17 14:26               ` Vladimir Prus
2006-02-17 14:36                 ` Bob Rossi
2006-02-17 14:43                   ` Vladimir Prus
2006-02-17 14:51                     ` Bob Rossi
2006-02-17 15:02                       ` Vladimir Prus
2006-02-17 19:25                 ` Eli Zaretskii
2006-02-17 19:33                   ` Daniel Jacobowitz
2006-02-17 19:36                     ` Eli Zaretskii
2006-02-17 19:38                       ` Daniel Jacobowitz
2006-02-17 19:56                         ` Eli Zaretskii
2006-02-17 20:05                           ` Bob Rossi
2006-02-17 20:07                             ` Eli Zaretskii
2006-02-17 20:17                               ` Daniel Jacobowitz
2006-02-17 20:28                                 ` Eli Zaretskii
2006-02-17 20:33                                   ` Daniel Jacobowitz
2006-02-17 21:14                                     ` Jim Ingham
2006-02-18 11:34                                       ` Eli Zaretskii
2006-02-20 13:47                                         ` Vladimir Prus
2006-02-20  8:11                                       ` Vladimir Prus
2006-02-20 19:49                                         ` Jim Ingham
2006-02-20 20:56                                           ` Daniel Jacobowitz
2006-02-20 20:57                                             ` Jim Ingham
2006-02-21 14:15                                           ` Vladimir Prus
2006-02-21 21:33                                             ` Jim Ingham
2006-04-06 13:33                                               ` Vladimir Prus
2006-04-06 13:45                                                 ` Daniel Jacobowitz
2006-04-06 14:05                                                   ` Vladimir Prus
2006-04-06 14:31                                                     ` Daniel Jacobowitz
2006-04-06 15:05                                                       ` Vladimir Prus
2006-04-06 15:32                                                         ` Daniel Jacobowitz
2006-04-06 18:53                                                           ` Jim Ingham
2006-04-06 16:49                                                     ` Jim Ingham
2006-04-06 16:49                                                       ` Daniel Jacobowitz
2006-04-06 16:52                                                         ` Jim Ingham
2006-04-06 18:58                                                 ` Jim Ingham
2006-04-07  8:13                                                   ` Vladimir Prus
2006-04-07 20:08                                                     ` Jim Ingham
2006-04-12 15:38                                                       ` Vladimir Prus
2006-04-12 19:41                                                         ` Jim Ingham
2006-04-13 16:15                                                           ` Vladimir Prus
2006-02-17 21:19                                     ` Daniel Jacobowitz
2006-02-17 20:20                               ` Bob Rossi
2006-02-17 20:47                                 ` Daniel Jacobowitz
2006-02-17 19:44                       ` Bob Rossi
2006-02-17 19:59                         ` Eli Zaretskii
2006-02-20  7:28                         ` Vladimir Prus
2006-02-20 23:37                           ` Eli Zaretskii
2006-02-21  4:13                             ` Daniel Jacobowitz
2006-02-21 14:15                               ` Vladimir Prus
2006-02-21 20:41                                 ` Daniel Jacobowitz
2006-02-20 13:48                   ` Vladimir Prus
2006-02-17 11:27     ` 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=u8xsai8tk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    /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