[Lldb-commits] [lldb] r215488 - gcc_esp_i386 and gcc_ebp_i386 had their values backwards for
Jason Molenda
jmolenda at apple.com
Tue Aug 12 17:52:49 PDT 2014
Author: jmolenda
Date: Tue Aug 12 19:52:49 2014
New Revision: 215488
URL: http://llvm.org/viewvc/llvm-project?rev=215488&view=rev
Log:
gcc_esp_i386 and gcc_ebp_i386 had their values backwards for
i386 eh_frame register numbering, encoding a darwin-specific
bug in the register numbering. Update the definitions to be
the correct values, Darwin can use the register numbers from
debugserver. Patch from Tong Shen.
Modified:
lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h?rev=215488&r1=215487&r2=215488&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h Tue Aug 12 19:52:49 2014
@@ -34,8 +34,16 @@ enum
gcc_ecx_i386,
gcc_edx_i386,
gcc_ebx_i386,
- gcc_ebp_i386, // Warning: these are switched from dwarf values
- gcc_esp_i386, //
+
+ // on Darwin esp & ebp are reversed in the eh_frame section for i386 (versus dwarf's reg numbering).
+ // To be specific:
+ // i386+darwin eh_frame: 4 is ebp, 5 is esp
+ // i386+everyone else eh_frame: 4 is esp, 5 is ebp
+ // i386 dwarf: 4 is esp, 5 is ebp
+ // lldb will get the darwin-specific eh_frame reg numberings from debugserver instead of here so we
+ // only encode the 4 == esp, 5 == ebp numbers in this generic header.
+ gcc_esp_i386,
+ gcc_ebp_i386,
gcc_esi_i386,
gcc_edi_i386,
gcc_eip_i386,
More information about the lldb-commits
mailing list