gdb vs non-base gcc

Andriy Gapon avg at
Sun Oct 9 16:58:09 UTC 2011

I observe some strange behavior with different versions gdb when used on
executables compiled with gcc45.  My world is compiled with the base gcc.

1. If a crash happens while execution is in code compiled with base gcc (e.g. in
libc because of abort(2) call)...

A. Base gdb:
- incorrectly reports lines numbers in code compiled with gcc45
- reports a lot of strange/junk frames in between libc and program frames
- but overall correctly shows program stack

B. gdb73
- correctly shows libc frames
- doesn't unwind stack to program frames

2. If a crash happens in the code compiled with gcc45...

A. Base gdb:
- show some strange stack frames and is not really useable

B. gdb73
- does everything correctly

>From what I've heard on IRC it looks like I am not the only one who runs into
issues like this.
Any ideas/suggestions?

Andriy Gapon

More information about the freebsd-hackers mailing list