This is the mail archive of the gcc@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]

Generating DWARF CIE info


I'm working with a target that has a call instruction
similar to SPARC: the address of the calling instruction
is saved in a link register (lr).  The actual return address
is, like SPARC, lr+8.

It seemed to me that the right thing would be to have the
initial value of the "return address" column in the CIE
contain the location expression for lr+8.  When I tried this,
the offset was ignored and only the register number was generated.
I came across this comment in dwarf2out.c:

 case PLUS:
   /* The return address is at some offset from any value we can
      actually load.  For instance, on the SPARC it is in %i7+8. Just
      ignore the offset for now; it doesn't matter for unwinding frames.  */

When I looked at what sparc-gcc was generating for the return
address column, I discovered that it didn't generate anything.
Instead, sparc-gdb ignores it and computes %i7+8.

It seems to me that the offset is necessary to unwind a frame
correctly (at least, if you use the CIE info).  Is there any
reason to discard it?

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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