diff options
author | Ravitheja Addepally <ravitheja.addepally@intel.com> | 2015-08-13 09:05:11 +0000 |
---|---|---|
committer | Ravitheja Addepally <ravitheja.addepally@intel.com> | 2015-08-13 09:05:11 +0000 |
commit | 4778e410d0b33dc6f5837683ccd0e439a9b69d9e (patch) | |
tree | 919751d5ea3ac51757137b987c8ce97a79447991 /lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp | |
parent | 0164b8ff70e814cd60621b0fcfbc5b86637efbb3 (diff) | |
download | bcm5719-llvm-4778e410d0b33dc6f5837683ccd0e439a9b69d9e.tar.gz bcm5719-llvm-4778e410d0b33dc6f5837683ccd0e439a9b69d9e.zip |
Set orig_eax to -1 for Linux x86 platforms
Summary:
For Linux x86 based environments the orig_eax/orig_rax
register should be set to -1 to prevent the instruction pointer
to be decremented, which was the cause for the SIGILL exception.
Fix for Bug 23659
Reviewers: zturner, ashok.thirumurthi, mikesart, jingham, clayborg
Subscribers: clayborg, labath
Differential Revision: http://reviews.llvm.org/D11411
llvm-svn: 244875
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp index 4f6bbc8f8ab..de35f591ae2 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp @@ -26,7 +26,7 @@ struct GPR uint32_t es; uint32_t fs; uint32_t gs; - uint32_t orig_ax; + uint32_t orig_eax; uint32_t eip; uint32_t cs; uint32_t eflags; @@ -98,6 +98,9 @@ struct UserArea RegisterContextLinux_i386::RegisterContextLinux_i386(const ArchSpec &target_arch) : RegisterInfoInterface(target_arch) { + RegisterInfo orig_ax = { "orig_eax", NULL, sizeof(((GPR*)NULL)->orig_eax), (LLVM_EXTENSION offsetof(GPR, orig_eax)), eEncodingUint, \ + eFormatHex, { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }; + d_register_infos.push_back(orig_ax); } size_t @@ -131,3 +134,9 @@ RegisterContextLinux_i386::GetUserRegisterCount () const { return static_cast<uint32_t> (k_num_user_registers_i386); } + +const std::vector<lldb_private::RegisterInfo> * +RegisterContextLinux_i386::GetDynamicRegisterInfoP() const +{ + return &d_register_infos; +} |