Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Ingham <jingham@apple.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Eli Zaretskii <eliz@gnu.org>, Vladimir Prus <ghost@cs.msu.su>,
	        gdb@sources.redhat.com
Subject: Re: MI: type prefixes for values
Date: Fri, 17 Feb 2006 21:14:00 -0000	[thread overview]
Message-ID: <3D09ADF2-5A80-4B42-B4DE-2A2861C3A2AA@apple.com> (raw)
In-Reply-To: <20060217203120.GE30881@nevyn.them.org>

And... since the varobj's only parse the expression once when the  
varobj is created, getting the current values of varobj's is much  
faster than doing -data-evaluate-expression.  Not a big deal if you  
are just printing one value.  But if you are trying to update all the  
local variables on every step, this can be significant.  People tend  
to be pretty sensitive to the speed of the "step" operation...

If you're writing a front end using the MI, you are better off using  
variable objects for anything that you are likely to refresh more  
than one or two times.

In Xcode, we do use -data-evaluate-expression, but only when we are  
doing function calls where we know the call we are making and what to  
expect back.  In this case the overhead of the variable object is not  
worth the trouble.  Other than that, we use varobj's...

Jim

On Feb 17, 2006, at 12:31 PM, Daniel Jacobowitz wrote:

> On Fri, Feb 17, 2006 at 10:22:32PM +0200, Eli Zaretskii wrote:
>>> Date: Fri, 17 Feb 2006 15:15:37 -0500
>>> From: Daniel Jacobowitz <drow@false.org>
>>> Cc: Vladimir Prus <ghost@cs.msu.su>, gdb@sources.redhat.com
>>>
>>> The real problem here is that Vladimir is trying to parse the  
>>> result of
>>> -data-evaluate-expression, which is defined as opaque.  Maybe  
>>> someone
>>> should design a major interface change where values are returned as
>>> varobjs instead of strings.
>>
>> Maybe, I don't know.  If the results of -data-evaluate-expression are
>> designed to be unparsable, then indeed Vladimir shouldn't try that;
>> but then there should be some way of getting that information in an
>> easily parsable way.
>
> What a great idea!  Conveniently someone else already thought of  
> it :-)
>
> -var-create - * "getpid()"
> ^done,name="var1",numchild="0",type="int"
> (gdb)
> -var-evaluate-expression var1
> ^done,value="31989"
>
> (then -var-delete when you're done)
>
> Now, this appears at first no different.  It has an opaque value
> string.  And for functions it has the annoying {int (int)}.  But
> I think we've agreed that we can remove that, and for compound
> values you can decompose it using -var-list-children, and you can  
> query
> its formatted type separately:
>
> -var-info-type var1
> ^done,type="int"
>
> For the record, it evaluates the call at -var-create time rather than
> -var-evaluate-expression, as I would hope.  The result is somewhat
> strange if GDB hits a breakpoint while doing so.
>
> -- 
> Daniel Jacobowitz
> CodeSourcery


  reply	other threads:[~2006-02-17 20:41 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
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 [this message]
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=3D09ADF2-5A80-4B42-B4DE-2A2861C3A2AA@apple.com \
    --to=jingham@apple.com \
    --cc=drow@false.org \
    --cc=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