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/doc | |
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/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index b4d1ba8..2a0277d 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.texinfo (Macros): Note command-line for `info macro'. Append + a new part on command-line defined macros. + 2009-04-25 Eli Zaretskii <eliz@gnu.org> * gdb.texinfo (Machine Code) <disassemble-next-line>: Improve and diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 7ae9e1c..57bd084 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -8382,7 +8382,7 @@ can be any string of tokens. @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. +source location or compiler command-line where that definition was established. @kindex macro define @cindex user-defined macros @@ -8547,6 +8547,18 @@ $2 = 0 (@value{GDBP}) @end smallexample +In addition to source files, macros can be defined on the compilation command +line using the @option{-D@var{name}=@var{value}} syntax. For macros defined in +such a way, @value{GDBN} displays the location of their definition as line zero +of the source file submitted to the compiler. + +@smallexample +(@value{GDBP}) info macro __STDC__ +Defined at /home/jimb/gdb/macros/play/sample.c:0 +-D__STDC__=1 +(@value{GDBP}) +@end smallexample + @node Tracepoints @chapter Tracepoints |