From: Eli Zaretskii <eliz@gnu.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] doc: Document macros defined from command-line
Date: Sat, 07 Mar 2009 09:16:00 -0000 [thread overview]
Message-ID: <uk571n15x.fsf@gnu.org> (raw)
In-Reply-To: <20090306204631.GA27092@host0.dyn.jankratochvil.net>
> Date: Fri, 6 Mar 2009 21:46:31 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Joel Brobecker <brobecker@adacore.com>
>
> +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:
I suggest to reword like this:
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.
The changes I made are:
. Tell about the way of defining macros before describing what GDB
does in that case.
. Don't qualify the -Dfoo=bar feature by "Unix", since on non-Unix
platforms GDB supports only GCC-produced debug info.
. Use @var for meta-syntactic variables that stand for something
else.
> +@smallexample
> +(@value{GDBP}) info macro __STDC__
> +(gdb) info macro __STDC__
I think this second line is redundant. At least in my testing, GDB
does not display it.
> +Defined at /home/jimb/gdb/macros/play/sample.c:0
> +#define __STDC__ 1
Should we perhaps show "-D__STDC__=1" here?
Also, perhaps add a short notice of this feature at the beginning of
the section, where "info macro" is described.
Other than that, the patch is fine.
Thanks.
next prev parent reply other threads:[~2009-03-07 9:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 20:46 Jan Kratochvil
2009-03-07 9:16 ` Eli Zaretskii [this message]
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=uk571n15x.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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