From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [rfa] clean up output of "info set" command.
Date: Fri, 11 Feb 2011 20:20:00 -0000 [thread overview]
Message-ID: <4D5599E8.6030408@vmware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 465 bytes --]
"info set" is meant to show the state of all "set"-able
debugger state variables, but it really executes each and
every "show" command in alphabetical order.
Several of these commands (notably "copying" and "warranty")
have no corresponding "set" command, are not "set"-able, and
produce a lot of output. Especially "show copying" which
produces pages and pages of output.
This patch excludes "copying", "warranty", and "version" from
the output of "info set'.
[-- Attachment #2: infoset.txt --]
[-- Type: text/plain, Size: 1608 bytes --]
2011-02-10 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* cli/cli-setshow.c (cmd_show_list): Skip commands show copying,
show warranty and show version.
Index: cli/cli-setshow.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-setshow.c,v
retrieving revision 1.43
diff -u -p -u -p -r1.43 cli-setshow.c
--- cli/cli-setshow.c 6 Jan 2011 00:57:02 -0000 1.43
+++ cli/cli-setshow.c 11 Feb 2011 20:14:22 -0000
@@ -434,18 +434,23 @@ cmd_show_list (struct cmd_list_element *
}
else
{
- struct cleanup *option_chain
- = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
+ if (strcmp (list->name, "copying") != 0
+ && strcmp (list->name, "version") != 0
+ && strcmp (list->name, "warranty") != 0)
+ {
+ struct cleanup *option_chain
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
- ui_out_text (uiout, prefix);
- ui_out_field_string (uiout, "name", list->name);
- ui_out_text (uiout, ": ");
- if (list->type == show_cmd)
- do_setshow_command ((char *) NULL, from_tty, list);
- else
- cmd_func (list, NULL, from_tty);
- /* Close the tuple. */
- do_cleanups (option_chain);
+ ui_out_text (uiout, prefix);
+ ui_out_field_string (uiout, "name", list->name);
+ ui_out_text (uiout, ": ");
+ if (list->type == show_cmd)
+ do_setshow_command ((char *) NULL, from_tty, list);
+ else
+ cmd_func (list, NULL, from_tty);
+ /* Close the tuple. */
+ do_cleanups (option_chain);
+ }
}
}
/* Close the tuple. */
next reply other threads:[~2011-02-11 20:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 20:20 Michael Snyder [this message]
2011-02-11 20:42 ` Pedro Alves
2011-02-11 20:53 ` Michael Snyder
2011-02-11 21:17 ` Tom Tromey
2011-02-11 23:33 ` Pedro Alves
2011-02-12 0:01 ` Michael Snyder
2011-02-12 0:08 ` Michael Snyder
2011-02-12 1:30 ` Michael Snyder
2011-02-12 7:55 ` Eli Zaretskii
2011-02-15 2:03 ` Michael Snyder
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=4D5599E8.6030408@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb-patches@sourceware.org \
/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