[lldb-dev] [PATCH][Review Request] Call frame address validation for 32-bit ABI

Kaylor, Andrew andrew.kaylor at intel.com
Tue Aug 20 14:23:00 PDT 2013

Currently the MacOSX-i386 ABI plugin gets used for both Darwin and Linux platforms (probably FreeBSD also) when debugging a 32-bit inferior.  This makes sense because in almost all cases the ABI definition is the same across these platforms.

However, if I'm reading the specs correctly, there is an exception with regard to call frame address alignment.  It appears that call frame addresses must be 8-byte aligned on Darwin, whereas on Linux they can be 4-byte aligned.

The attached patch modifies the MacOSX-i386 ABI creation mechanism to allow separate ABI instances for Darwin and non-Darwin targets and passes a flag to the constructor that will be used in the case of cfa validation.

If there's a better way to handle this, I'm open to guidance.

Some correction to the cfa validation is necessary to enable correct stack unwinding with 32-bit targets on Linux.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130820/787f9641/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: call-frame-32.patch
Type: application/octet-stream
Size: 2733 bytes
Desc: call-frame-32.patch
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130820/787f9641/attachment.obj>

More information about the lldb-dev mailing list