summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-11-03 20:51:28 +0000
committerKevin Enderby <enderby@apple.com>2016-11-03 20:51:28 +0000
commit7747cb55dcba83388c4fbce10ec32426b205d090 (patch)
tree7453e0961adbfa938556181b5142e463a2e2abda /llvm/include
parent8e232573a8ae5da87c51cf03166f668ba361744c (diff)
downloadbcm5719-llvm-7747cb55dcba83388c4fbce10ec32426b205d090.tar.gz
bcm5719-llvm-7747cb55dcba83388c4fbce10ec32426b205d090.zip
Add support for the ARM_THREAD_STATE64 and
in llvm-objdump for Mach-O files add the printing of the ARM_THREAD_STATE64 in the same format as otool-classic(1) on darwin. To do this the 64-bit ARM general tread state needed to be defined in include/llvm/Support/MachO.h . rdar://28985800 llvm-svn: 285967
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/MachO.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/MachO.h b/llvm/include/llvm/Support/MachO.h
index d7729755d69..80106a8c1e3 100644
--- a/llvm/include/llvm/Support/MachO.h
+++ b/llvm/include/llvm/Support/MachO.h
@@ -1742,6 +1742,25 @@ namespace llvm {
sys::swapByteOrder(x.cpsr);
}
+ struct arm_thread_state64_t {
+ uint64_t x[29];
+ uint64_t fp;
+ uint64_t lr;
+ uint64_t sp;
+ uint64_t pc;
+ uint32_t cpsr;
+ };
+
+ inline void swapStruct(arm_thread_state64_t &x) {
+ for (int i = 0; i < 29; i++)
+ sys::swapByteOrder(x.x[i]);
+ sys::swapByteOrder(x.fp);
+ sys::swapByteOrder(x.lr);
+ sys::swapByteOrder(x.sp);
+ sys::swapByteOrder(x.pc);
+ sys::swapByteOrder(x.cpsr);
+ }
+
struct arm_state_hdr_t {
uint32_t flavor;
uint32_t count;
@@ -1778,6 +1797,9 @@ namespace llvm {
const uint32_t ARM_THREAD_STATE_COUNT =
sizeof(arm_thread_state32_t) / sizeof(uint32_t);
+ const uint32_t ARM_THREAD_STATE64_COUNT =
+ sizeof(arm_thread_state64_t) / sizeof(uint32_t);
+
struct ppc_thread_state32_t {
uint32_t srr0;
uint32_t srr1;
OpenPOWER on IntegriCloud