This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: Rename `show macro' to `info macro'
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 11 Jun 2002 15:23:00 -0500 (EST)
- Subject: PATCH: Rename `show macro' to `info macro'
gdb/ChangeLog:
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'.
gdb/doc/ChangeLog:
2002-06-11 Jim Blandy <jimb@redhat.com>
* gdb.texinfo (Macros): Call the command `info macro', not
`show macro'.
Index: gdb/macrocmd.c
===================================================================
RCS file: /cvs/src/src/gdb/macrocmd.c,v
retrieving revision 1.2
diff -c -r1.2 macrocmd.c
*** gdb/macrocmd.c 16 May 2002 21:15:53 -0000 1.2
--- gdb/macrocmd.c 11 Jun 2002 18:38:57 -0000
***************
*** 135,148 ****
static void
! show_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"
" of the macro\n"
"whose definition you want to see.");
--- 135,148 ----
static void
! 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 `info macro' command with the name"
" of the macro\n"
"whose definition you want to see.");
***************
*** 257,265 ****
add_alias_cmd ("exp1", "expand-once", no_class, 1, ¯olist);
add_cmd
! ("macro", no_class, show_macro_command,
"Show the definition of MACRO, and its source location.",
! &showlist);
add_cmd
("define", no_class, macro_define_command,
--- 257,265 ----
add_alias_cmd ("exp1", "expand-once", no_class, 1, ¯olist);
add_cmd
! ("macro", no_class, info_macro_command,
"Show the definition of MACRO, and its source location.",
! &infolist);
add_cmd
("define", no_class, macro_define_command,
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.100
diff -c -r1.100 gdb.texinfo
*** gdb/doc/gdb.texinfo 17 May 2002 18:00:03 -0000 1.100
--- gdb/doc/gdb.texinfo 11 Jun 2002 18:39:08 -0000
***************
*** 5843,5852 ****
parse the result, @var{expression} need not be a valid expression; it
can be any string of tokens.
! @kindex show macro
@cindex macro definition, showing
@cindex definition, showing a macro's
! @item show macro @var{macro}
Show the definition of the macro named @var{macro}, and describe the
source location where that definition was established.
--- 5843,5852 ----
parse the result, @var{expression} need not be a valid expression; it
can be any string of tokens.
! @kindex info macro
@cindex macro definition, showing
@cindex definition, showing a macro's
! @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,5950 ****
10 printf ("Hello, world!\n");
11 #undef N
12 printf ("We're so creative.\n");
! (gdb) show macro ADD
Defined at /home/jimb/gdb/macros/play/sample.c:5
#define ADD(x) (M + x)
! (gdb) show macro Q
Defined at /home/jimb/gdb/macros/play/sample.h:1
included at /home/jimb/gdb/macros/play/sample.c:2
#define Q <
--- 5941,5950 ----
10 printf ("Hello, world!\n");
11 #undef N
12 printf ("We're so creative.\n");
! (gdb) info macro ADD
Defined at /home/jimb/gdb/macros/play/sample.c:5
#define ADD(x) (M + x)
! (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,5983 ****
At line 10, the definition of the macro @code{N} at line 9 is in force:
@smallexample
! (gdb) show macro N
Defined at /home/jimb/gdb/macros/play/sample.c:9
#define N 28
(gdb) macro expand N Q M
--- 5977,5983 ----
At line 10, the definition of the macro @code{N} at line 9 is in force:
@smallexample
! (gdb) info macro N
Defined at /home/jimb/gdb/macros/play/sample.c:9
#define N 28
(gdb) macro expand N Q M
***************
*** 5995,6007 ****
(gdb) next
Hello, world!
12 printf ("We're so creative.\n");
! (gdb) show 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
Defined at /home/jimb/gdb/macros/play/sample.c:13
#define N 1729
(gdb) macro expand N Q M
--- 5995,6007 ----
(gdb) next
Hello, world!
12 printf ("We're so creative.\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) info macro N
Defined at /home/jimb/gdb/macros/play/sample.c:13
#define N 1729
(gdb) macro expand N Q M