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.

Thanks,
Andy

Attachment: call-frame-32.patch
Description: call-frame-32.patch

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to