On Thu, Jul 13, 2006 at 11:21:04AM -0700, Seongbae Park wrote:
> The above code looks incorrect, for various reasons,
> not the least of which is that you're assuming CIE/FDE are fixed-length.
> There are various factors that affect FDE/CIE
> depending on PIC/non-PIC, C or C++, 32bit/64bit, etc -
> some of them must be invariant for your JIT but some of them may not.
> Also some of the datum are encoded as uleb128
> (see dwarf spec for the detail of LEB128 encoding)
> which is a variable-length encoding whose length depends on the value.
> 
> In short, you'd better start looking at how CIE/FDE structures are 
> *logically*
> layed out - otherwise you won't be able to generate correct entries.

I highly highly recommend finding a way to dump your CIE/FDE structures
to an ELF file, so that you can use readelf to view them.  It is quite
accurate and matches the GCC implementation closely.

If it can't dump your FDEs, we probably won't unwind through them
either.

-- 
Daniel Jacobowitz
CodeSourcery

Reply via email to