From: Eli Zaretskii <eliz@is.elta.co.il>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH] Add system-information commands to go32-nat.c
Date: Wed, 11 Jul 2001 03:12:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1010711131313.4033A-100000@is> (raw)
In-Reply-To: <3B4B42A8.6030803@cygnus.com>
Per Andrew's suggestion, I've committed the attached below.
2001-07-10 Eli Zaretskii <eliz@is.elta.co.il>
* go32-nat.c (info_dos_cmdlist): New variable.
(go32_info_dos_command): New function.
(_initialize_go32_nat): Convert all DOS-specific commands into
subcommands of "info dos". Suggested by Andrew Cagney
<ac131313@redhat.com>.
--- gdb/go32-nat.c~2 Wed Jul 4 19:22:06 2001
+++ gdb/go32-nat.c Tue Jul 10 20:40:20 2001
@@ -26,6 +26,7 @@
#include "gdb_wait.h"
#include "gdbcore.h"
#include "command.h"
+#include "gdbcmd.h"
#include "floatformat.h"
#include "buildsym.h"
#include "i387-nat.h"
@@ -1612,23 +1613,39 @@ go32_sidt (char *arg, int from_tty)
}
}
+static struct cmd_list_element *info_dos_cmdlist = NULL;
+
+static void
+go32_info_dos_command (char *args, int from_tty)
+{
+ help_list (info_dos_cmdlist, "info dos ", class_info, gdb_stdout);
+}
+
void
_initialize_go32_nat (void)
{
init_go32_ops ();
add_target (&go32_ops);
- add_info ("dos-sysinfo", go32_sysinfo,
- "Display information about the target system, including CPU, OS, DPMI, etc.");
- add_info ("dos-ldt", go32_sldt,
- "Display entries in the LDT (Local Descriptor Table).\n"
- "Entry number (an expression) as an argument means display only that entry.");
- add_info ("dos-gdt", go32_sgdt,
- "Display entries in the GDT (Global Descriptor Table).\n"
- "Entry number (an expression) as an argument means display only that entry.");
- add_info ("dos-idt", go32_sidt,
- "Display entries in the IDT (Interrupt Descriptor Table).\n"
- "Entry number (an expression) as an argument means display only that entry.");
+ add_prefix_cmd ("dos", class_info, go32_info_dos_command,
+ "Print information specific to DJGPP (a.k.a. MS-DOS) debugging.",
+ &info_dos_cmdlist, "info dos ", 0, &infolist);
+
+ add_cmd ("sysinfo", class_info, go32_sysinfo,
+ "Display information about the target system, including CPU, OS, DPMI, etc.",
+ &info_dos_cmdlist);
+ add_cmd ("ldt", class_info, go32_sldt,
+ "Display entries in the LDT (Local Descriptor Table).\n"
+ "Entry number (an expression) as an argument means display only that entry.",
+ &info_dos_cmdlist);
+ add_cmd ("gdt", class_info, go32_sgdt,
+ "Display entries in the GDT (Global Descriptor Table).\n"
+ "Entry number (an expression) as an argument means display only that entry.",
+ &info_dos_cmdlist);
+ add_cmd ("idt", class_info, go32_sidt,
+ "Display entries in the IDT (Interrupt Descriptor Table).\n"
+ "Entry number (an expression) as an argument means display only that entry.",
+ &info_dos_cmdlist);
}
pid_t
next parent reply other threads:[~2001-07-11 3:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3B4B42A8.6030803@cygnus.com>
2001-07-11 3:12 ` Eli Zaretskii [this message]
2001-07-08 3:31 Eli Zaretskii
2001-07-08 19:09 ` Andrew Cagney
2001-07-09 0:53 ` Eli Zaretskii
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=Pine.SUN.3.91.1010711131313.4033A-100000@is \
--to=eliz@is.elta.co.il \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sourceware.cygnus.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