tags:

views:

32

answers:

0

I'm trying to decode dwarf information for a program and am confused by the dwarf register numbering. According to http://wikis.sun.com/display/SunStudio/Dwarf+Register+Numbering register 4 is the ESP and register 5 is EBP. However the DWARF information I'm decoding (the exception handling unwind information) appears to indicate that ESP is 5 and EBP is 4.

I rather assumed that the register numbering was hardware (i.e x86) specific, but it appears different on MacOS than it is on Linux.

Anyone got a reference for what the DWARF register numbering for MacOS is?

Thanks.