backtrace been implemented on MIPS yet?

Ravi Sankar ravisankar.g@gmail.com
Tue Feb 22 10:04:00 GMT 2011


Hi,

> Hi All,
>
> I tried the example code along with the backtrace manpage. But the
> executabe didn't seem to work on MIPS.
>

> $mips-linux-gcc -EL -O2 test_backtrace.c
> / # ./a.out 6
> backtrace() returned 1 addresses
> [0x7ff54868]
>

O2 option might remove "frame pointers" information from binary which
is required for backtrace() API to work.  So backtrace() could not
return more addresses for you.

> The results were totally different from thoes on x86.
>
> $gcc test_backtrace.c
> $./a.out 6

Here "O2" was not used and so backtrace() can work. And to get
function names in backtrace() rather than function address, do compile
it with "-g" option.

> backtrace() returned 11 addresses
> ./bt [0x804864d]
> ./bt [0x80486dc]
> ./bt [0x80486ff]
> ./bt [0x80486f8]
> ./bt [0x80486f8]
> ./bt [0x80486f8]
> ./bt [0x80486f8]
> ./bt [0x80486f8]
> ./bt [0x8048766]
> /lib/libc.so.6(__libc_start_main+0xe6) [0x7275d6]
> ./bt [0x80484f1]
>

> So, has backtrace been implemented on MIPS yet?
>
> PRC
> Feb 22,2011
>
>

Hope it answers your question.

--,
BR,
Ravi Sankar Guntur.
http://www.ravisankar.org.in/



More information about the Libc-help mailing list