This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stabs.texinfo update for macro define/undefine


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]