From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [PATCH:gdb/mi] Update a specified list of variable objects
Date: Mon, 21 Sep 2009 12:39:00 -0000 [thread overview]
Message-ID: <h97s58$t5a$1@ger.gmane.org> (raw)
In-Reply-To: <19127.27863.973393.962895@totara.tehura.co.nz>
Nick Roberts wrote:
> Since -var-list-children currently creates variable objects of all children
> and this may be a large number, I would like to be able to restrict
> -var-update to just update those variable objects whose expressions are
> visible in the front end. This could be done by updating them individually
> but that might result in many round trips. I would therefore like to commit
> the following patch which allows a list of variable objects to be specified in
> the argument to -var-update:
>
> -var-update [PRINT_VALUES] NAME1 NAME2 ...
>
Hi Nick,
the general idea seems good. There is a minor issue. You have made this change
- if (argc == 2)
- print_values = mi_parse_values_option (argv[0]);
- else
- print_values = PRINT_NO_VALUES;
+ while (1)
+ {
+ int opt = mi_getopt ("mi_cmd_var_update",
+ argc, argv, opts, &optind, &optarg);
mi_parse_values_option used to accept 0, 1 and 2, in addition to
string values, and your change breaks that. So, I observe this:
(gdb)
-var-create foo @ 10
^done,name="foo",numchild="0",value="10",type="int",has_more="0"
(gdb)
-var-update 0 foo
^error,msg="Variable object not found"
and it works for me with 6.8
Would it be easier to rename mi_parse_values_option to
mi_parse_values_option_nothrow and write new mi_parse_values_option that
would call mi_parse_values_option_nothrow and call error as necessary?
- Volodya
next prev parent reply other threads:[~2009-09-21 12:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 12:09 Nick Roberts
2009-09-21 12:39 ` Vladimir Prus [this message]
2009-09-21 23:39 ` Nick Roberts
2009-09-22 0:04 ` Nick Roberts
2009-09-28 16:33 ` Vladimir Prus
2009-09-29 23:36 ` Nick Roberts
2009-09-21 16:58 ` Tom Tromey
2009-09-21 23:39 ` 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='h97s58$t5a$1@ger.gmane.org' \
--to=vladimir@codesourcery.com \
--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