This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: stabs.texinfo update for macro define/undefine
- From: Eli Zaretskii <eliz at gnu dot org>
- To: David Taylor <dtaylor at emc dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 31 Oct 2006 06:19:33 +0200
- Subject: Re: stabs.texinfo update for macro define/undefine
- References: <200610251931.k9PJVRDO011265@mailhub.lss.emc.com> <ud58guoa6.fsf@gnu.org> <200610302225.k9UMPLZ9001050@mailhub.lss.emc.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> cc: Eli Zaretskii <eliz@gnu.org>
> Date: Mon, 30 Oct 2006 17:25:21 -0500
> From: David Taylor <dtaylor@emc.com>
>
> Patch to add information about recording macro define and undefine
> information in stabs.
Thanks.
> +@node Macro define and undefine
> +@chapter Representation of #define and #undef
> +
> +Macro define and undefine.
This last sentence is redundant (and actually isn't even a sentence).
> +information, supported on some systems. (e.g., with -g3 -gstabs when
Please put command-line options in @option.
> +using gcc).
Please use GCC instead of gcc.
> +A @code{#define @var{macro-name} @var{macro-body}} is represented with
> +an @code{N_MAC_DEFINE} stab with a string field of
> +@code{@var{macro-name} @var{macro-body}}.
> +@findex N_MAC_DEFINE
> +
> +An @code{#undef @var{macro-name}} is represented with an
> +@code{N_MAC_UNDEF} stabs with a string field of simply
> +@code{@var{macro-name}}.
> +@findex N_MAC_UNDEF
> +
> +For both @code{N_MAC_DEFINE} and @code{N_MAC_UNDEF}, the desc field is
> +the line number within the file where the corresponding @code{#define}
> +or @code{#undef} occurred.
> +@findex N_MAC_DEFINE
> +@findex N_MAC_UNDEF
It is not useful to have two identical index entries that point to the
same page. In this case, I don't see the need for the second pair of
@findex entries here.
> +@end example
> +
> +produces the following stabs (as well as many others):
You need a @noindent before this line, since you don't want it to be
indented as if it were a new paragraph.
> +@example
> + .stabs "NONE 42",54,0,1,0 # 54 is N_MAC_DEFINE
> + .stabs "TWO(a,b) (a + (a) + 2 * b)",54,0,2,0 # 54 is N_MAC_DEFINE
> + .stabs "ONE(c) (c + 19)",54,0,3,0 # 54 is N_MAC_DEFINE
> + .stabs "ONE",58,0,10,0 # 58 is N_MAC_UNDEF
> + .stabs "ONE(c) (c + 23)",54,0,11,0 # 54 is N_MAC_DEFINE
> +@end example
These lines are too long: they will overflow the page margin in the
printed version of the manual. I suggest to remove the comments and
instead explain the meaning of the constants in a separate text.
(Didn't I tell you this when you first posted the suggested text?)
Please also post the ChangeLog entry for the patch.
With these changes, this can go in. Thanks.