public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [Q] Register mapping in Call Frame Instructions
@ 2002-01-18 12:00 Bharadwaj Yadavalli
  0 siblings, 0 replies; only message in thread
From: Bharadwaj Yadavalli @ 2002-01-18 12:00 UTC (permalink / raw)
  To: gcc

I am trying to use the frame unwinding rules in call frame information
recorded in .eh_frame for virtual unwinding. For example consider the
following output of readelf -wf -wF <filename>

00000050 00000018 00000054 FDE cie=00000000 pc=08048480..080484a7
   LOC   CFA      r5   ra   
08048480 r4+4     u    c-4  
08048481 r4+8     c-8  c-4  
08048483 r5+8     c-8  c-4  
08048492 r5+8     c-8  c-4

on a Linux/i386 machine. I figured out from the gcc-2.95.3 sources that the
mapping of registers used to emit call frame instructions is as follows:

eax - r0
ecx - r1
edx - r2
ebx - r3
ebp - r4
esp - r5
esi - r6
edi - r7

Q1. Is this correct?
Q2. Is there a function call (in lbgcc??) that returns this mapping - as
    opposed to rummaging thru' the arch. specific files of gcc -  if I
    wish to interpret the CFI in a portable manner?

Thanks,

Bharadwaj

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-18 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 12:00 [Q] Register mapping in Call Frame Instructions Bharadwaj Yadavalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).