mstorsjo created this revision. mstorsjo added reviewers: labath, amccarth. Herald added a subscriber: kristof.beyls. Herald added a project: LLDB.
The change in itself is straightforward based on reading the code, but I don't have a real world case where I know this made a difference, so I don't really know what to use to distill a test case out of though. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70797 Files: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Index: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp =================================================================== --- lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -850,6 +850,7 @@ /* On Apple iOS et al, the frame pointer register is always r7. * Typically on other ARM systems, thumb code uses r7; arm code uses r11. + * Windows on ARM, which is in thumb mode, uses r11 though. */ uint32_t fp_regnum = 11; @@ -857,7 +858,7 @@ if (is_apple) fp_regnum = 7; - if (m_opcode_mode == eModeThumb) + if (m_opcode_mode == eModeThumb && !m_arch.GetTriple().isOSWindows()) fp_regnum = 7; return fp_regnum; @@ -879,6 +880,7 @@ /* On Apple iOS et al, the frame pointer register is always r7. * Typically on other ARM systems, thumb code uses r7; arm code uses r11. + * Windows on ARM, which is in thumb mode, uses r11 though. */ uint32_t fp_regnum = dwarf_r11; @@ -886,7 +888,7 @@ if (is_apple) fp_regnum = dwarf_r7; - if (m_opcode_mode == eModeThumb) + if (m_opcode_mode == eModeThumb && !m_arch.GetTriple().isOSWindows()) fp_regnum = dwarf_r7; return fp_regnum;
Index: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp =================================================================== --- lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -850,6 +850,7 @@ /* On Apple iOS et al, the frame pointer register is always r7. * Typically on other ARM systems, thumb code uses r7; arm code uses r11. + * Windows on ARM, which is in thumb mode, uses r11 though. */ uint32_t fp_regnum = 11; @@ -857,7 +858,7 @@ if (is_apple) fp_regnum = 7; - if (m_opcode_mode == eModeThumb) + if (m_opcode_mode == eModeThumb && !m_arch.GetTriple().isOSWindows()) fp_regnum = 7; return fp_regnum; @@ -879,6 +880,7 @@ /* On Apple iOS et al, the frame pointer register is always r7. * Typically on other ARM systems, thumb code uses r7; arm code uses r11. + * Windows on ARM, which is in thumb mode, uses r11 though. */ uint32_t fp_regnum = dwarf_r11; @@ -886,7 +888,7 @@ if (is_apple) fp_regnum = dwarf_r7; - if (m_opcode_mode == eModeThumb) + if (m_opcode_mode == eModeThumb && !m_arch.GetTriple().isOSWindows()) fp_regnum = dwarf_r7; return fp_regnum;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits