This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Asking help with (dwarf) exception hacking on mipsel


Hi all,

one step closer.

> This is an executable, not a shared library, right?

Yes.

> Doe the value returned by __builtin_return_address correspond to a value
> in the text segment of your program, as shown by readelf -S? ?If not,
> why not? If it does correspond, then why do the FDEs not cover that address?

Now, I know what is going on, but I do not know why: the
__builtin_return_address() corresponds to a value in the text segment,
which has fde entry, but:
- __builtin_return_address() returns back the run-time address of the
text segment
- the fde entries contain the link-time address of the same text segment.

In the documentation of my platform, I can see that the link-time
address most be computed by:

link-time address = run-time address - gp register value + _gp.

and the __builtin_extract_return_addr() gives back the same run time
value what it got. Now I can see in the documentation for
__builtin_extract_return_addr() that it is a platform specific
behaviour of the fixing of the run-time addresses if needed:

http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html

But I do not know how to fix it for my mipsel target, because I do not
find this function declaration/definition in the gcc sources... :(

Csaba


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