PDA

View Full Version : debugging misaligned_stack_error_




Madd the Sane
Dec 9, 2011, 03:43 PM
I am having an issue with PCSX-R (http://pcsxr.codeplex.com), mainly that the 32-bit build crashes with a call to misaligned_stack_error_ when fseek is called. Is there a way to fix it so that I don't have to use -mstackrealign? I can't debug using gdb when I use it.



Madd the Sane
Dec 10, 2011, 12:22 PM
Wirelessly posted (Mozilla/5.0 (iPod; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3)

Okay, I figured out what was causing the issue: Apparently the i386 dynarec core that PCSX-R uses is 4-byte alligned, but Mac OS X code needs to be 16-byte alligned under i386. If it isn't, it crashes when it gets to a libSystem call.