Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: [patch] doc: Document macros defined from command-line
Date: Fri, 06 Mar 2009 20:46:00 -0000	[thread overview]
Message-ID: <20090306204631.GA27092@host0.dyn.jankratochvil.net> (raw)

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


             reply	other threads:[~2009-03-06 20:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 20:46 Jan Kratochvil [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090306204631.GA27092@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox