Modify gcc for use with gdb (issue5132047)

Tom Tromey
Wed Oct 5 15:29:00 GMT 2011

>>>>> "Diego" == Diego Novillo <> 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.


More information about the Gcc-patches mailing list