diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-02-10 15:41:53 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-02-10 15:41:53 +0000 |
commit | d1307ec4ccb1dcf8b08ff23b10cc6399ed0cdc7e (patch) | |
tree | dffa886e743ac87edb105bed588694dd26219cc3 /lldb/source/Plugins/UnwindAssembly | |
parent | ada705a5d2ee1d49fedc4df199cbfa33569d6f24 (diff) | |
download | bcm5719-llvm-d1307ec4ccb1dcf8b08ff23b10cc6399ed0cdc7e.tar.gz bcm5719-llvm-d1307ec4ccb1dcf8b08ff23b10cc6399ed0cdc7e.zip |
Fix x86 return pattern detection
Summary: Replace 0xc9 (LEAVE) with 0xcb (RETF) in ret_pattern_p(). Also put 0xc3 first, since it is the most common form and will match first.
Reviewers: jasonmolenda
Reviewed By: jasonmolenda
Subscribers: labath, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D57928
llvm-svn: 353643
Diffstat (limited to 'lldb/source/Plugins/UnwindAssembly')
-rw-r--r-- | lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp index 9162f5ddf5d..615d35b9198 100644 --- a/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp +++ b/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp @@ -665,10 +665,10 @@ bool x86AssemblyInspectionEngine::mov_reg_to_local_stack_frame_p( return false; } -// ret [0xc9] or [0xc2 imm8] or [0xca imm8] +// ret [0xc3] or [0xcb] or [0xc2 imm16] or [0xca imm16] bool x86AssemblyInspectionEngine::ret_pattern_p() { uint8_t *p = m_cur_insn; - return *p == 0xc9 || *p == 0xc2 || *p == 0xca || *p == 0xc3; + return *p == 0xc3 || *p == 0xc2 || *p == 0xca || *p == 0xcb; } uint32_t x86AssemblyInspectionEngine::extract_4(uint8_t *b) { |