aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-06-11 20:05:03 +0000
committerJim Blandy <jimb@codesourcery.com>2002-06-11 20:05:03 +0000
commit475b08678044b12807e00bc0cb1bb4882711af91 (patch)
treed4b3e5ed535d07eaca475b4a9ed17b90374b534d
parent9e36416278c7943ae237b89ef05d20bda0fef68f (diff)
downloadgdb-475b08678044b12807e00bc0cb1bb4882711af91.zip
gdb-475b08678044b12807e00bc0cb1bb4882711af91.tar.gz
gdb-475b08678044b12807e00bc0cb1bb4882711af91.tar.bz2
Call the command `info macro', not `show macro'.
* gdb/macrocmd.c (info_macro_command): Renamed from `show_macro_command'. Fix error message. (_initialize_macrocmd): Register `info_macro_command' in `infolist', not `showlist'. * gdb/doc/gdb.texinfo (Macros): Call the command `info macro', not `show macro'.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo14
-rw-r--r--gdb/macrocmd.c8
4 files changed, 24 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9ebf2dc..a9d6a23 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ Call the command `info macro', not `show macro'.
+ * macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
+ Fix error message.
+ (_initialize_macrocmd): Register `info_macro_command' in
+ `infolist', not `showlist'.
+
2002-06-11 Daniel Jacobowitz <drow@mvista.com>
* mips-tdep.c (MIPS_FPU_TYPE, FP_REGISTER_DOUBLE, MIPS_EABI)
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 07a7191..363a3fc 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (Macros): Call the command `info macro', not
+ `show macro'.
+
2002-06-09 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Coding): Add section ``Per-architecture module
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5d84047..bff763b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -5843,10 +5843,10 @@ expansions. Since @value{GDBN} simply expands macros, but does not
parse the result, @var{expression} need not be a valid expression; it
can be any string of tokens.
-@kindex show macro
+@kindex info macro
@cindex macro definition, showing
@cindex definition, showing a macro's
-@item show macro @var{macro}
+@item info macro @var{macro}
Show the definition of the macro named @var{macro}, and describe the
source location where that definition was established.
@@ -5941,10 +5941,10 @@ to decide which macro definitions are in scope:
10 printf ("Hello, world!\n");
11 #undef N
12 printf ("We're so creative.\n");
-(gdb) show macro ADD
+(gdb) info macro ADD
Defined at /home/jimb/gdb/macros/play/sample.c:5
#define ADD(x) (M + x)
-(gdb) show macro Q
+(gdb) info macro Q
Defined at /home/jimb/gdb/macros/play/sample.h:1
included at /home/jimb/gdb/macros/play/sample.c:2
#define Q <
@@ -5977,7 +5977,7 @@ Breakpoint 1, main () at sample.c:10
At line 10, the definition of the macro @code{N} at line 9 is in force:
@smallexample
-(gdb) show macro N
+(gdb) info macro N
Defined at /home/jimb/gdb/macros/play/sample.c:9
#define N 28
(gdb) macro expand N Q M
@@ -5995,13 +5995,13 @@ thereof) in force at each point:
(gdb) next
Hello, world!
12 printf ("We're so creative.\n");
-(gdb) show macro N
+(gdb) info macro N
The symbol `N' has no definition as a C/C++ preprocessor macro
at /home/jimb/gdb/macros/play/sample.c:12
(gdb) next
We're so creative.
14 printf ("Goodbye, world!\n");
-(gdb) show macro N
+(gdb) info macro N
Defined at /home/jimb/gdb/macros/play/sample.c:13
#define N 1729
(gdb) macro expand N Q M
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 1d14735..40b3154 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -135,14 +135,14 @@ show_pp_source_pos (struct ui_file *stream,
static void
-show_macro_command (char *name, int from_tty)
+info_macro_command (char *name, int from_tty)
{
struct macro_scope *ms = NULL;
struct cleanup *cleanup_chain = make_cleanup (free_current_contents, &ms);
struct macro_definition *d;
if (! name || ! *name)
- error ("You must follow the `show macro' command with the name"
+ error ("You must follow the `info macro' command with the name"
" of the macro\n"
"whose definition you want to see.");
@@ -257,9 +257,9 @@ _initialize_macrocmd (void)
add_alias_cmd ("exp1", "expand-once", no_class, 1, &macrolist);
add_cmd
- ("macro", no_class, show_macro_command,
+ ("macro", no_class, info_macro_command,
"Show the definition of MACRO, and its source location.",
- &showlist);
+ &infolist);
add_cmd
("define", no_class, macro_define_command,