From: Daniel Jacobowitz <drow@false.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH]: MI -var-set-format
Date: Fri, 05 May 2006 18:11:00 -0000 [thread overview]
Message-ID: <20060505181111.GI31029@nevyn.them.org> (raw)
In-Reply-To: <17494.64020.26176.277202@farnswood.snap.net.nz>
On Tue, May 02, 2006 at 06:20:04PM +1200, Nick Roberts wrote:
>
> Currently:
>
> -var-evaluate-expression var1
> ^done,value="18"
>
> -var-set-format var1 hexadecimal
> ^done,format="hexadecimal"
>
> -var-set-format just repeats the format that has been set which is not
> very useful since presumably the front end sent it in the first place.
>
> I would like to add the value in the (new) current format, which I find
> much more useful:
>
> -var-set-format var1 hexadecimal
> ^done,format="hexadecimal",value="0x12"
>
> OK to apply if I update the testsuite accordingly?
This seems reasonable; I doubt anyone will object.
I was wondering how to handle potential error conditions. I see at
least two:
- The return of varobj_get_value can be NULL. You should check for
that.
- common_val_print might fail to transform the struct value * into
a string for some reason. I believe it may call error() if that
happens.
Should -var-set-format fail in those cases, or should it omit the
value, or should it supply a default value string (e.g. <error>)? It
will have changed the varobj's settings, so I don't think ^error
is appropriate.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-05-05 18:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 6:19 Nick Roberts
2006-05-05 18:11 ` Daniel Jacobowitz [this message]
2006-05-05 23:30 ` Nick Roberts
2006-05-15 17:07 ` Daniel Jacobowitz
2006-05-16 3:46 ` Nick Roberts
2008-01-22 20:13 ` Daniel Jacobowitz
2008-01-23 3:25 ` Nick Roberts
2008-01-23 3:48 ` Daniel Jacobowitz
2008-01-23 6:24 ` Nick Roberts
2008-01-23 13:17 ` Daniel Jacobowitz
2008-01-23 21:17 ` Nick Roberts
2008-01-23 21:24 ` Daniel Jacobowitz
2008-01-23 22:30 ` Nick Roberts
2008-01-24 21:49 Marc Khouzam
2008-01-25 10:38 ` Eli Zaretskii
2008-01-25 15:46 ` Marc Khouzam
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=20060505181111.GI31029@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=nickrob@snap.net.nz \
/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