This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
MIPS stack frame
- From: "Bharath Yadav" <bharath dot yadav at gmail dot com>
- To: libc-ports at sourceware dot org
- Date: Mon, 10 Apr 2006 09:54:19 +0530
- Subject: MIPS stack frame
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=U8Q9NCxZNtWAUt35aAfeMvDl0HrIP706sFyGjjzntfUO5nlNN4HNaR80rGpaSlIvKadriYyVp5UOEjxxnSBscbSC+/j1UjSTaOv/mmdSZr3oWVgiZn/TnrInPxI7pLOs05lUGD7wjQFSyHPIySuFbUxyomsGrADXICVS5v19zYM=
Hi,
I am working on retrieving the call stack information on MIPS
platform. Does glibc support backtrace on MIPS either through
backtrace() APIs or any other mechanism ? In i386, glibc has a set of
3 backtrace APIs which use the gcc builtins, __builtin_return_address
and __builtin_frame_address to retrieve the stack frame information.
However there seems to be no such implementation available for MIPs.
Is it true ? Please correct me if I am wrong.
On MIPS though, I am able to get the current function s return address
using the gcc builtin, __builtin_return_address. I also have the
current function s frame pointer. My doubt is how do I traverse back
to get the information about previous frame and the subsequent ones..?
I tried to feed in the values obtained by gcc builtins to a dynamic
linker function dladdr() and compiled the binary with -rdynamic
option, but couldn succeed for values > 0 for __builtin_return_address
builtin.
Please provide me some pointers regarding this.
Thanks and Regards,
Bharath