diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-04-29 07:51:33 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-04-29 07:51:33 +0000 |
commit | 484086b7e06069d8bc3dce0dd428d3b9fcf9053b (patch) | |
tree | 8d51f43b16ca977ef476479ed0fa190823bea2b7 /gdb/macrocmd.c | |
parent | 8e58566ff2d15055f984eed93bb261de97f5d509 (diff) | |
download | gdb-484086b7e06069d8bc3dce0dd428d3b9fcf9053b.zip gdb-484086b7e06069d8bc3dce0dd428d3b9fcf9053b.tar.gz gdb-484086b7e06069d8bc3dce0dd428d3b9fcf9053b.tar.bz2 |
gdb/
* macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
gdb/doc/
* gdb.texinfo (Macros): Note command-line for `info macro'. Append
a new part on command-line defined macros.
gdb/testsuite/
* gdb.base/macscp.exp: New `options' parameter `-DFROM_COMMANDLINE'.
(info_macro): Remova `decimal' declaration. New variable `nonzero'.
Replace all uses of `decimal' by `nonzero'.
(info macro FROM_COMMANDLINE): New test.
Diffstat (limited to 'gdb/macrocmd.c')
-rw-r--r-- | gdb/macrocmd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c index 9d301e4..355efe0 100644 --- a/gdb/macrocmd.c +++ b/gdb/macrocmd.c @@ -158,7 +158,10 @@ info_macro_command (char *name, int from_tty) fprintf_filtered (gdb_stdout, "Defined at "); show_pp_source_pos (gdb_stdout, file, line); - fprintf_filtered (gdb_stdout, "#define %s", name); + if (line != 0) + fprintf_filtered (gdb_stdout, "#define %s", name); + else + fprintf_filtered (gdb_stdout, "-D%s", name); if (d->kind == macro_function_like) { int i; @@ -172,7 +175,10 @@ info_macro_command (char *name, int from_tty) } fputs_filtered (")", gdb_stdout); } - fprintf_filtered (gdb_stdout, " %s\n", d->replacement); + if (line != 0) + fprintf_filtered (gdb_stdout, " %s\n", d->replacement); + else + fprintf_filtered (gdb_stdout, "=%s\n", d->replacement); } else { |