Symbol Tables and Backtraces in Linux
From: TLOlczyk (olczyk2002_at_yahoo.com)
Date: 07/25/04
- Next message: Jens.Toerring_at_physik.fu-berlin.de: "Re: encrypt and decrypt using encrypt(char block[64], int edflag)"
- Previous message: rockwell: "encrypt and decrypt using encrypt(char block[64], int edflag)"
- Next in thread: John Reiser: "Re: Symbol Tables and Backtraces in Linux"
- Reply: John Reiser: "Re: Symbol Tables and Backtraces in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 25 Jul 2004 04:53:42 -0500
On 22 Jul 2004 03:51:43 -0700, gil_hamilton@hotmail.com (Gil Hamilton)
wrote:
>TLOlczyk <olczyk2002@yahoo.com> wrote in message news:<v7lqf0h53jmgf4srijng3mb9bo7adr4pj9@4ax.com>...
>> I have a shared object for which I want to print (stack) backtraces
>> at certain locations. I've tried backtrace and backtrace_symbols_fd.
>>
Since then I've printed to the file using backtrace_symbols. Same
result.
>> The thing is that I don't quite get the output I want.
>> Many lines are printed simple as:
>> shared_object_file_name(offset)
>>
>> sometimes as
>>
>> shared_object_file_name(function_name+offset)
>>
>> I've compiled with the -g option.
>> The shared object is third party with it's own make system,
>> so I might be missing something in the build. If so, what should
>> I look for?
>
The funny thing is that if I use ddd, put in a sleep(10) and "attach
to process", I can see the lines of source in ddd. So the symbol
information must be in there.
>I recently went through much the same exercise trying to produce a
>stack trace for my executable. I wasn't able to get actual function
>names printed until I started using the linker's -E (--export-dynamic)
>option. To pass it through the compiler to the linker, you use
>"-Wl,-E".
>
Finding the source in the debugger is OK if I use -E or if I don't.
IAnyone give me suggestions?
The reply-to email address is olczyk2002@yahoo.com.
This is an address I ignore.
To reply via email, remove 2002 and change yahoo to
interaccess,
**
Thaddeus L. Olczyk, PhD
There is a difference between
*thinking* you know something,
and *knowing* you know something.
- Next message: Jens.Toerring_at_physik.fu-berlin.de: "Re: encrypt and decrypt using encrypt(char block[64], int edflag)"
- Previous message: rockwell: "encrypt and decrypt using encrypt(char block[64], int edflag)"
- Next in thread: John Reiser: "Re: Symbol Tables and Backtraces in Linux"
- Reply: John Reiser: "Re: Symbol Tables and Backtraces in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|