Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] doc: Document macros defined from command-line
@ 2009-03-06 20:46 Jan Kratochvil
  2009-03-07  9:16 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2009-03-06 20:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Joel Brobecker

Hi,

http://sourceware.org/ml/gdb-patches/2009-03/msg00026.html
On Tue, 03 Mar 2009 01:54:30 +0100, Joel Brobecker wrote:
> Regarding whether or not we should print line "0" or "command-line",
> in the absence of further comments from other contributors, I suggest
> we follow your approach of keeping this as is - but with some extra
> documentation just to make it clear what the zero means.  The
> documentation patch can be proposed separately from this patch, since
> it would document the existing behavior.

Here it is.


Thanks,
Jan


gdb/doc/
	* gdb.texinfo (Macros): A new part on coomand-line defined macros.

--- gdb/doc/gdb.texinfo	5 Mar 2009 23:11:11 -0000	1.561
+++ gdb/doc/gdb.texinfo	6 Mar 2009 20:41:17 -0000
@@ -8506,6 +8506,19 @@ $2 = 0
 (@value{GDBP})
 @end smallexample
 
+Printed definition line number will be zero for macros defined from the
+compiler command-line.  Unix compilers use the option @samp{-Dname=value} for
+such definitions.  @value{GDBN} displays in this case a name of the main source
+file being compiled when the macro has been defined:
+
+@smallexample
+(@value{GDBP}) info macro __STDC__
+(gdb) info macro __STDC__
+Defined at /home/jimb/gdb/macros/play/sample.c:0
+#define __STDC__ 1
+(@value{GDBP})
+@end smallexample
+
 
 @node Tracepoints
 @chapter Tracepoints


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-29  7:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-06 20:46 [patch] doc: Document macros defined from command-line Jan Kratochvil
2009-03-07  9:16 ` Eli Zaretskii
2009-03-09  0:17   ` [patch] Better display command-line macros + doc addon [Re: [patch] doc: Document macros defined from command-line] Jan Kratochvil
2009-03-09  4:00     ` Eli Zaretskii
2009-04-28 20:17     ` Joel Brobecker
2009-04-29  7:17       ` Eli Zaretskii
2009-04-29  7:55         ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox