gcc and gdb bug caused by imacros usage (gdb emits only <command-line>)

Alan DeKok aland at deployingradius.com
Sat Jan 18 22:01:40 CET 2014


John Dennis wrote:
> Recently when I was trying to perform symbolic debugging on components
> built from the 3.x tree I discovered I was unable to get any source file
> information in gdb, it would only emit <command-line> as the source
> filename and I could not get gdb to list source, show it in a backtrace,
> etc.
> 
> Thanks to Nalin Dahyabhai who discovered the root cause, it's covered in
> this bugzilla.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1004526

  Which isn't visible to anyone, apparently.

> Apparently using -imacros causes the failure. To be honest I wasn't all
> that familiar with -imacros myself. The workaround I came up with was to
> replace -imacros in Make.inc.in with -include.

  That works for some platforms.  IIRC, the -imacro was added for a reason.

> I don't know which version of the gcc/gdb tool chain this shows up in or
> if it's specific to how debuginfo packages are produced during the RPM
> build process.
> 
> But if you do hit this issue you'll discover it's almost impossible to
> do any useful debugging, so heads up, HTH

  I'm inclined to ignore it for the short term.  I don't see it on any
platforms I use, and the upstream gcc / gdb really should be fixed to
work as advertised.

  Alan DeKok.


More information about the Freeradius-Devel mailing list