From: Anton Kolesov <Anton.Kolesov@synopsys.com>
To: gdb-patches@sourceware.org
Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>,
Francois Bedard <Francois.Bedard@synopsys.com>
Subject: [PATCH 3/5] arc: Add "maintenance print arc" command prefix
Date: Tue, 14 Feb 2017 10:01:00 -0000 [thread overview]
Message-ID: <20170214100130.29194-3-Anton.Kolesov@synopsys.com> (raw)
In-Reply-To: <20170214100130.29194-1-Anton.Kolesov@synopsys.com>
Add an "arc" sublist to "maintenance print" command list. The list is empty
for now, its purpose is to contain commands that print internal state of some
ARC-specific structures.
gdb/ChangeLog:
yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com>
* arc-tdep (maintenance_print_arc_list): New variable.
(maintenance_print_arc_command): New function.
---
gdb/arc-tdep.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index e4b2e7a..5495f2e 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -59,6 +59,10 @@ struct arc_frame_cache
int arc_debug;
+/* List of "maintenance print arc" commands. */
+
+static struct cmd_list_element *maintenance_print_arc_list = NULL;
+
/* XML target description features. */
static const char core_v2_feature_name[] = "org.gnu.gdb.arc.core.v2";
@@ -1318,6 +1322,14 @@ arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
}
+/* Wrapper for "maintenance print arc" list of commands. */
+
+static void
+maintenance_print_arc_command (char *args, int from_tty)
+{
+ cmd_show_list (maintenance_print_arc_list, from_tty, "");
+}
+
/* Suppress warning from -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_arc_tdep;
@@ -1331,6 +1343,13 @@ _initialize_arc_tdep (void)
/* Register ARC-specific commands with gdb. */
+ /* Add root prefix command for "maintenance print arc" commands. */
+ add_prefix_cmd ("arc", class_maintenance, maintenance_print_arc_command,
+ _("ARC-specific maintenance commands for printing GDB "
+ "internal state."),
+ &maintenance_print_arc_list, "maintenance print arc ", 0,
+ &maintenanceprintlist);
+
/* Debug internals for ARC GDB. */
add_setshow_zinteger_cmd ("arc", class_maintenance,
&arc_debug,
--
2.8.3
next prev parent reply other threads:[~2017-02-14 10:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 10:01 [PATCH 1/5] arc: Align internal regnums with architectural regnums Anton Kolesov
2017-02-14 10:01 ` [PATCH 4/5] arc: Add disassembler helper Anton Kolesov
2017-02-14 15:50 ` Eli Zaretskii
2017-02-17 13:00 ` Pedro Alves
2017-02-17 13:01 ` Pedro Alves
2017-02-14 10:01 ` [PATCH 5/5] arc: Add prologue analysis Anton Kolesov
2017-02-14 15:51 ` Eli Zaretskii
2017-02-17 13:25 ` Pedro Alves
2017-03-15 15:18 ` [PATCH 5/5 v2] " Anton Kolesov
2017-03-15 15:59 ` Eli Zaretskii
2017-03-27 14:20 ` Anton Kolesov
2017-03-28 13:28 ` Pedro Alves
2017-02-14 10:01 ` [PATCH 2/5] arc: Set section to ".text" when disassembling Anton Kolesov
2017-02-15 22:27 ` Yao Qi
2017-02-16 16:35 ` Anton Kolesov
2017-02-17 12:31 ` Pedro Alves
2017-03-15 15:16 ` Anton Kolesov
2017-02-14 10:01 ` Anton Kolesov [this message]
2017-02-17 13:02 ` [PATCH 3/5] arc: Add "maintenance print arc" command prefix Pedro Alves
2017-02-17 13:26 ` [PATCH 1/5] arc: Align internal regnums with architectural regnums Pedro Alves
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=20170214100130.29194-3-Anton.Kolesov@synopsys.com \
--to=anton.kolesov@synopsys.com \
--cc=Francois.Bedard@synopsys.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