summaryrefslogtreecommitdiffstats
path: root/source/Core/Disassembler.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
committeremaste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
commit6beac4fcf9e5327f07c0fefd527180124438096a (patch)
tree95cb16075f0af1b3a05b9b84eb18dda8e6c903e9 /source/Core/Disassembler.cpp
parentf087960a1097db2a1ef14a88963f8785df239aaa (diff)
downloadFreeBSD-src-6beac4fcf9e5327f07c0fefd527180124438096a.zip
FreeBSD-src-6beac4fcf9e5327f07c0fefd527180124438096a.tar.gz
Import lldb as of SVN r201577 (git 2bdc2f6)
(A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Core/Disassembler.cpp')
-rw-r--r--source/Core/Disassembler.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/Core/Disassembler.cpp b/source/Core/Disassembler.cpp
index 7f830ac..1d2b8cf 100644
--- a/source/Core/Disassembler.cpp
+++ b/source/Core/Disassembler.cpp
@@ -35,6 +35,7 @@
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
+#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
@@ -1044,10 +1045,8 @@ InstructionList::GetIndexOfNextBranchInstruction(uint32_t start) const
}
uint32_t
-InstructionList::GetIndexOfInstructionAtLoadAddress (lldb::addr_t load_addr, Target &target)
+InstructionList::GetIndexOfInstructionAtAddress (const Address &address)
{
- Address address;
- address.SetLoadAddress(load_addr, &target);
size_t num_instructions = m_instructions.size();
uint32_t index = UINT32_MAX;
for (size_t i = 0; i < num_instructions; i++)
@@ -1061,6 +1060,15 @@ InstructionList::GetIndexOfInstructionAtLoadAddress (lldb::addr_t load_addr, Tar
return index;
}
+
+uint32_t
+InstructionList::GetIndexOfInstructionAtLoadAddress (lldb::addr_t load_addr, Target &target)
+{
+ Address address;
+ address.SetLoadAddress(load_addr, &target);
+ return GetIndexOfInstructionAtAddress(address);
+}
+
size_t
Disassembler::ParseInstructions (const ExecutionContext *exe_ctx,
const AddressRange &range,
@@ -1235,25 +1243,25 @@ PseudoInstruction::SetOpcode (size_t opcode_size, void *opcode_data)
case 8:
{
uint8_t value8 = *((uint8_t *) opcode_data);
- m_opcode.SetOpcode8 (value8);
+ m_opcode.SetOpcode8 (value8, eByteOrderInvalid);
break;
}
case 16:
{
uint16_t value16 = *((uint16_t *) opcode_data);
- m_opcode.SetOpcode16 (value16);
+ m_opcode.SetOpcode16 (value16, eByteOrderInvalid);
break;
}
case 32:
{
uint32_t value32 = *((uint32_t *) opcode_data);
- m_opcode.SetOpcode32 (value32);
+ m_opcode.SetOpcode32 (value32, eByteOrderInvalid);
break;
}
case 64:
{
uint64_t value64 = *((uint64_t *) opcode_data);
- m_opcode.SetOpcode64 (value64);
+ m_opcode.SetOpcode64 (value64, eByteOrderInvalid);
break;
}
default:
OpenPOWER on IntegriCloud