This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: backtrace been implemented on MIPS yet?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]