summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Instruction/ARM
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/Plugins/Instruction/ARM
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'lldb/source/Plugins/Instruction/ARM')
-rw-r--r--lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp19
-rw-r--r--lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h6
-rw-r--r--lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp2
-rw-r--r--lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h9
4 files changed, 15 insertions, 21 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
index ff142e6f35ff..555912780df9 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -1,4 +1,4 @@
-//===-- EmulateInstructionARM.cpp -------------------------------*- C++ -*-===//
+//===-- EmulateInstructionARM.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -30,6 +30,8 @@
using namespace lldb;
using namespace lldb_private;
+LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionARM, InstructionARM)
+
// Convenient macro definitions.
#define APSR_C Bit32(m_opcode_cpsr, CPSR_C_POS)
#define APSR_V Bit32(m_opcode_cpsr, CPSR_V_POS)
@@ -603,9 +605,6 @@ static uint32_t CountITSize(uint32_t ITMask) {
// First count the trailing zeros of the IT mask.
uint32_t TZ = llvm::countTrailingZeros(ITMask);
if (TZ > 3) {
-#ifdef LLDB_CONFIGURATION_DEBUG
- printf("Encoding error: IT Mask '0000'\n");
-#endif
return 0;
}
return (4 - TZ);
@@ -620,15 +619,9 @@ bool ITSession::InitIT(uint32_t bits7_0) {
// A8.6.50 IT
unsigned short FirstCond = Bits32(bits7_0, 7, 4);
if (FirstCond == 0xF) {
-#ifdef LLDB_CONFIGURATION_DEBUG
- printf("Encoding error: IT FirstCond '1111'\n");
-#endif
return false;
}
if (FirstCond == 0xE && ITCounter != 1) {
-#ifdef LLDB_CONFIGURATION_DEBUG
- printf("Encoding error: IT FirstCond '1110' && Mask != '1000'\n");
-#endif
return false;
}
@@ -7230,7 +7223,7 @@ bool EmulateInstructionARM::EmulateLDRHImmediate(const uint32_t opcode,
return true;
}
-// LDRH (literal) caculates an address from the PC value and an immediate
+// LDRH (literal) calculates an address from the PC value and an immediate
// offset, loads a halfword from memory,
// zero-extends it to form a 32-bit word, and writes it to a register.
bool EmulateInstructionARM::EmulateLDRHLiteral(const uint32_t opcode,
@@ -8516,7 +8509,7 @@ bool EmulateInstructionARM::EmulateSXTH(const uint32_t opcode,
return true;
}
-// UXTB extracts an 8-bit value from a register, zero-extneds it to 32 bits, and
+// UXTB extracts an 8-bit value from a register, zero-extends it to 32 bits, and
// writes the result to the destination
// register. You can specify a rotation by 0, 8, 16, or 24 bits before
// extracting the 8-bit value.
@@ -14368,7 +14361,7 @@ bool EmulateInstructionARM::EvaluateInstruction(uint32_t evaluate_options) {
if (!success)
return false;
- if (auto_advance_pc && (after_pc_value == orig_pc_value)) {
+ if (after_pc_value == orig_pc_value) {
after_pc_value += m_opcode.GetByteSize();
EmulateInstruction::Context context;
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
index 13d7fc061bea..d15d80c97e38 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
+++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef lldb_EmulateInstructionARM_h_
-#define lldb_EmulateInstructionARM_h_
+#ifndef LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATEINSTRUCTIONARM_H
+#define LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATEINSTRUCTIONARM_H
#include "Plugins/Process/Utility/ARMDefines.h"
#include "lldb/Core/EmulateInstruction.h"
@@ -783,4 +783,4 @@ protected:
} // namespace lldb_private
-#endif // lldb_EmulateInstructionARM_h_
+#endif // LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATEINSTRUCTIONARM_H
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp
index 11c7677c201a..aef08baa8ae9 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp
+++ b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp
@@ -1,4 +1,4 @@
-//===-- EmulationStateARM.cpp -----------------------------------*- C++ -*-===//
+//===-- EmulationStateARM.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h
index e5af37a21504..955c7c642058 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h
+++ b/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef lldb_EmulationStateARM_h_
-#define lldb_EmulationStateARM_h_
+#ifndef LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATIONSTATEARM_H
+#define LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATIONSTATEARM_H
#include <map>
@@ -73,7 +73,8 @@ private:
// uint32_t to a data buffer heap
// type.
- DISALLOW_COPY_AND_ASSIGN(EmulationStateARM);
+ EmulationStateARM(const EmulationStateARM &) = delete;
+ const EmulationStateARM &operator=(const EmulationStateARM &) = delete;
};
-#endif // lldb_EmulationStateARM_h_
+#endif // LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATIONSTATEARM_H