This is the mail archive of the
mailing list for the GCC project.
Re: Modify gcc for use with gdb (issue5132047)
- From: Tom Tromey <tromey at redhat dot com>
- 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, Cary Coutant <ccoutant at google dot com>, Ian Taylor <iant at google dot com>
- Date: Wed, 05 Oct 2011 09:27:23 -0600
- 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> <CAFiYyc1b=9RVhj3KE12p8q=-vERSzRJs9LBzFMLAbhKO=mjfWw@mail.gmail.com> <CAD_=9DSMHE7f=C7QZxF=jpGYv7S9VdQFJik=YFf6RR+_bDfBfirstname.lastname@example.org>
>>>>> "Diego" == Diego Novillo <email@example.com> writes:
Diego> Tom, Cary, Ian, any suggestions? We are trying to figure out a
Diego> compromise for tiny inline functions that are generally a nuisance
Diego> when debugging. The scenario is a call like this: big_function_foo
Diego> (inlined_f (x), inlined_g (y));
Diego> We want to use 's' to step inside the call to big_function_foo(), but
Diego> we don't want to step into either inlined_f() or inlined_g().
FWIW, I wrote the "macro define" stuff that Paolo posted back when I was
actively hacking on gcc. I consider it to be mildly superior to the
inline approach, because it circumvents the runtime type checking --
this is a plus because it means that if I type the wrong thing to gdb it
doesn't cause cc1 to abort. At least, this is a plus for me, since I
make mistakes like that with reasonable frequency.
Diego> I proposed extending #pragma GCC options to bracket these functions
Diego> with -g0. This would help reduce the impact of debug info size.
I think this is fixing the wrong component: it means making a
one-size-fits-all decision in the gcc build, instead of just making the
debugger be more flexible.
If you want to pursue the inline function approach, I suggest
resurrecting this gdb patch:
Then you could add the appropriate blacklisting commands to gcc's
.gdbinit by default.