aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-07-11 10:11:31 +0000
committerEli Zaretskii <eliz@gnu.org>2001-07-11 10:11:31 +0000
commitd8c852a19f586055f65fd84564d5838f913149b5 (patch)
treee60ee0367ebf1efaada334c91c497c7806cd5436
parent11d180425f2faaf100b1c49a9a9ad2476540e425 (diff)
downloadgdb-d8c852a19f586055f65fd84564d5838f913149b5.zip
gdb-d8c852a19f586055f65fd84564d5838f913149b5.tar.gz
gdb-d8c852a19f586055f65fd84564d5838f913149b5.tar.bz2
* 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>.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/go32-nat.c39
2 files changed, 36 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bf313a9..c22be44 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2001-07-11 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>.
+
2001-07-11 Mark Kettenis <kettenis@gnu.org>
* config/nm-linux.h: Fix comments.
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 94b8a84..c9d02d1 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -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