This is the mail archive of the
mailing list for the GCC project.
Re: Modify gcc for use with gdb (issue5132047)
- From: Mike Stump <mikestump at comcast dot net>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Lawrence Crowl <crowl at google dot com>, reply at codereview dot appspotmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Oct 2011 11:20:00 -0700
- Subject: Re: Modify gcc for use with gdb (issue5132047)
- References: <20110926220500.9254022266A@jade.mtv.corp.google.com> <20110927071447.GJ2687@tyan-ft48-01.lab.bos.redhat.com> <CAFiYyc1F+qt8c4XTBn=Jp2WCdOLppkWaPahnmxUfd97K43v7UA@mail.gmail.com> <CAFiYyc14=_KNGBqm9-6C3ZMCLjPmP1UDzbmZOsPLFpi20=UEpA@mail.gmail.com> <4E8C5910.email@example.com>
On Oct 5, 2011, at 6:18 AM, Diego Novillo wrote:
> I think we need to find a solution for this situation.
The solution Apple found and implemented is a __nodebug__ attribute, as can be seen in Apple's gcc.
We use it like so:
#define __always_inline__ __always_inline__, __nodebug__
in headers like mmintrn.h:
__STATIC_INLINE void __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
to disappear the debug information for all the routines, so that the context is the context in which the routine is called (because the routine is always inlined). It is implemented and works great. Easy to use and understand. Since we use the #define, #undef around the functions, it is mostly equivalent to #pragma, though, it does attach a little closer to the function. You can strip #.* from the .i files, and not have it removed (which is nice).