This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: stabs and #define/#undef
- From: Ian Lance Taylor <iant at google dot com>
- To: David Taylor <dtaylor at emc dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 24 Oct 2006 07:59:01 -0700
- Subject: Re: stabs and #define/#undef
- References: <200610061530.k96FUCUH012387@mailhub.lss.emc.com>
David Taylor <dtaylor@emc.com> writes:
> 2006-10-06 David Taylor <dtaylor@emc.com>
>
> * c-lex.c (init_c_lex): Set debug callbacks for DBX_DEBUG also,
> as it's now implemented.
> * dbxout.c (dbxout_define, dbxout_undef): New functions.
> (dbx_debug_hooks): Add initializations for dbxout_define and
> dbxout_undef.
> * stab.def (N_MAC_DEFINE, N_MAC_UNDEF): Define.
This patch is OK for mainline with a couple of changes, but check with
the gdb developers first as noted below.
(Technically I can't approve the change to c-lex.c, but it's only one
line, and I think it counts as obvious once the rest of the patch is
in).
> +/* Called from debug_define in toplev.c. The `buffer' parameter contains
> + the tail part of the directive line, i.e. the part which is past the
> + initial whitespace, #, whitespace, directive-name, whitespace part. */
The first sentence in this comment is wrong. Just remove it.
> +/* Called from debug_undef in toplev.c. The `buffer' parameter contains
> + the tail part of the directive line, i.e. the part which is past the
> + initial whitespace, #, whitespace, directive-name, whitespace part. */
Same here.
> Index: gcc/stab.def
> ===================================================================
> --- gcc/stab.def (revision 117374)
> +++ gcc/stab.def (working copy)
> @@ -59,10 +59,16 @@
> /* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
> __define_stab (N_NOMAP, 0x34, "NOMAP")
>
> +/* GNU extension. Macro define. */
> +__define_stab(N_MAC_DEFINE, 0x36, "MAC_DEFINE")
> +
> /* New stab from Solaris. I don't know what it means, but it
> don't seem to contain useful information. */
> __define_stab (N_OBJ, 0x38, "OBJ")
>
> +/* GNU extension. Macro undefine. */
> +__define_stab(N_MAC_UNDEF, 0x3a, "MAC_UNDEF")
> +
You need to also update the matrix format starting at line 190.
Patch is OK for gcc with those changes.
Please send a patch to the gdb folks for gdb/doc/stabs.texinfo. In
fact, please do that before you check the change into gcc, in case
they have any recommend changes.
Thanks.
Ian