RE: Exception Handling implementation with Return Address (RA) having PC right shifted by 1

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

 



Hi,
   The problem arises with throw and catch code in c++ EH code. During the runtime unwinding process of stack, RA register value which is a right shifted value of PC (because of hardware implementation) is interpreted by stack unwinder as is. So the call backs across functions were pointed to wrong locations. 

How can I adjust the RA (return address) so that my throw, catch EH code works fine with my compiler.

Regards,
Sumanth G    

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@xxxxxxxxxx] 
Sent: Monday, November 22, 2010 11:42 PM
To: Sumanth Gundapaneni
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: Exception Handling implementation with Return Address (RA) having PC right shifted by 1

Sumanth Gundapaneni <Sumanth.Gundapaneni@xxxxxxxxxxxxxxx> writes:

> During branching to the called function, the return address of the next 
> instruction right shifted by 1 is stored in the RA(Return Address) 
> register. This is a hardware implementation.
>
> The DWARF information generated for EH has found to be storing this right 
> shifted return value appropriately. To my knowledge , debugging 
> information for variables and stack pushed registers was generated correctly.
>
> How can I communicate to DWARF EH regarding the right shifted value of 
> return address. How can I do this in backend code?

It's not clear to me why the DWARF EH encoding should care that the
return address is right shifted.  What is actually going wrong?

The usual way to tell the DWARF code to do something unusual is to build
a REG_CFA_DEF_CFA note and attach it to some relevant insn.

Ian





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux