summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-08-13 00:52:49 +0000
committerJason Molenda <jmolenda@apple.com>2014-08-13 00:52:49 +0000
commit06adbc4e0dd93b0527e9467cb91da71949fad9a3 (patch)
tree18ddac2fdd423f830f4a947f4a532f1f22dfd9d3
parent18355283ce1a8fc2f7e92ab6cc9aefc69e941601 (diff)
downloadbcm5719-llvm-06adbc4e0dd93b0527e9467cb91da71949fad9a3.tar.gz
bcm5719-llvm-06adbc4e0dd93b0527e9467cb91da71949fad9a3.zip
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. llvm-svn: 215488
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContext_x86.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h b/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
index b471a6a603a..6b3f6fb43e3 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
@@ -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,
OpenPOWER on IntegriCloud