libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] Api to access local variable ?


From: David Jobet
Subject: [libunwind] Api to access local variable ?
Date: Fri, 06 Jun 2003 16:40:45 +0200 (CEST)
User-agent: IMP/PHP IMAP webmail program 2.2.6

Hello,

I hope I'm not out of topic. If it is, just tell me : I won't bother you 
anymore.

I'd like to know several things :
1 - do the unwind table contains information about the local variables defined
in each functions (offset / frame pointer, static type)
2 - if yes, is there some functions in libunwind's api to retrieve this
information or is it planned to develop these functions ? (couldn't find them)

I'd like to give some more background information so that you can give me some
hint if I'm wrong...

I've read gcc uses libunwind to do exception handling.
In C++, gcc have to call destructors of local variables while unwinding stack.
I guessed (perhaps wrongly) that there is information in the unwind table about
local variables of functions ?

I'm currently developping a compiler for a new language called Nosica (for fun).
For exception handling I started developping an exception handling library that
unwind stack, find the good exception handler, resume execution and of course
call the appropriate destructor for each local variables in each function.
I'm using the C language (and gcc) in my back end : no assembly.

The only information I cannot generate as static data is the address of
variables in the stack frame, so I'm looking for a way to retrieve it using the
unwind table (of course, provided this information does exist !)

Any help is welcome.

Kind regards

David

Nosica : http://www.nosica.net
Nothing happens unless first a dream (Carl Sandburg)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]