This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug macros/9748] macros containing __extension__ won't run
- From: "pedro at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 15 Jan 2009 21:30:06 -0000
- Subject: [Bug macros/9748] macros containing __extension__ won't run
- References: <20090115210626.9748.rearnsha@gcc.gnu.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From pedro at codesourcery dot com 2009-01-15 21:30 -------
Subject: Re: New: macros containing __extension__ won't run
On Thursday 15 January 2009 21:06:26, rearnsha at gcc dot gnu dot org wrote:
> Consider a macro, such as the following (from GCC):
>
> #define TREE_CHECK(T, CODE) __extension__ ({ __typeof (T) const __t = (T); if
> (TREE_CODE (__t) != (CODE)) tree_check_failed (__t, __FILE__, __LINE__,
> __FUNCTION__, (CODE), 0); __t; })
>
> if the object containing the macro is compiled with -g3, then the definition is
> available to GDB, but this doesn't help much...
>
> (gdb) p TREE_CHECK (fntype, CALL_EXPR)
> No symbol "__extension__" in current context.
>
I current gdb mainline, you could try defining __extension__ to empty:
(gdb) macro define __extension__
("macro define" was stubbed in yearlier versions of gdb, it
has only recently been implemented)
I guess you'd need to do the same for __FILE__, __LINE__, etc, but I
think you'll trip on __typeof.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=9748
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.