Re: Is gcc trunk incompatible with older versions of gdb?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 January 2013 22:00, Miles Bader wrote:
> I've noticed that if I compile my C++ programs using (a recent Debian
> snapshot of) the gcc trunk [0], and try to debug the resulting
> program, then I've noticed (there are no doubt other issues):
>
>  (1) gdb doesn't seem to know about most local variables / function
>      parameters:  trying to print them by name doesn't work ("No
>      symbol ... in current context); "i loc" and "i args" show nothing.
>
>  (2) gdb can't find many functions in my program:  referring to them
>      by name doesn't work,and searching using "i fun ..." with an
>      appropriate pattern gives nothing.
>
>  (3) When printing backtraces, etc, gdb spits out warnings like:
>        warning: (Internal error: pc 0x429e7a in read in psymtab, but not in symtab.)
>
>  (4) Backtraces sometimes seem to be missing frames that I don't
>      think are due to inlining/tail-calls/whatever.
>
> I.e., things are fairly clearly "messed up."
>
> This behavior seems to be the case no matter what optimization flags I
> use (from no -O flag at all, to -O3; I always use -g).
>
> If I recompile my program using gcc 4.7, then gdb works as expected
> (local variables, functions, no warnings spat, etc).  This is true
> regardless of optimization level.
>
> Is there some change in trunk gcc that requires a newer gdb or something...?

I was seeing those same issues, e.g.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55041#c6

But the latest comments on that bug indicate it's no longer a problem
with current trunk (I haven't verified that myself yet, and you're
using a pretty recent snapshot)


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux