[PATCHv2] print stack trace after each syscall

Masatake YAMATO yamato at redhat.com
Mon Jul 22 02:55:57 UTC 2013


Hi,

> On Mon, Jul 8, 2013 at 5:02 AM, Masatake YAMATO <yamato at redhat.com> wrote:
>> I've tested on Fedora 19. It works fine.
>>
>> BTW, I found that libunwind doesn't refer deubginfo file.
>> So the patched strace cannot resolve symbols well.
>> Porting debuginfo resolver from gdb to libunwind will be nice.
>>
>> Masatake YAMATO
>>
> 
> Hey Masatake,
> did you use the --enable-debug-frame flag to compile it?
> I think that it is disable by default.

(I'm using /usr/bin/ls command for testing. 
 Dwarf data is in separated file /usr/lib/debug/usr/bin/ls.debug.)

As you wrote it was disabled. I didn't try the option yet. 
However, as far as seeing the output of objdump running against ls and
ls.debug, there is no .debug_frame section. So I guess the function
to read the separate debuginfo file is needed in libunwind. As far as
reading configure.ac in libunwind, the option is for ARM architecture. 

Anyway I will try the option. Thanks.

I'm working on modifying libunwind to read the separate debuginfo file.
In my small test, my patch works: static functions defined in ls are
shown in stacktrace of strace+your patch.

> Luca

Masatake YAMATO





More information about the Strace-devel mailing list