Bqacktraces.

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

 



I'm not really sure this is the best place to ask this
question, but since the functions in questions are a
part of libc, I figure this is as good a location as I can hope
for.

I've tried to use backtrace and backtrace_symbols/backtrace_symbols_fd
to print ( what else? ) backtraces in certain parts of a shared
object. The problem is that my output looks like:

foo.so(offset1)
foo.so(offset2)
foo.so(function_name+offset3)

I've compiled with the -g option and with the -Wl,-E option.
(I've actually tried all four compbinations. )
In fact I've put sleep(10) in parts of the code, and run from
the commandline. Then I start ddd and "attach to process"
( I mention ddd because it may do a bit more than straight
gdb ). And I can see code in the shared object. That indicates
that all the proper debug info is in there.

So why am I not seeing something like 
foo.so(filename1:linenum1)
foo.so(filename2:linenum2)
foo.so(filename3:linenum3)

(I'm concerened about the information not the format.)

The project is n Linux running a 2.4.x kernel using
gcc 2.96.whatever the last 2 version was. It is built
from a Makefile I was given. The Makefile builds
the so and copies it into a ( semi ) standard location.
So the so may not be able to find the source
(still it should be able to find the line and filename).

Suggestions?

Thaddeus L. Olczyk
-----------------------
Think twice, code once.

[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