Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lldb-netbsd: Fix reading arm64 registers from core files
Add a local hack to transform 128 registers into 64 ones. This seems to work: $ LD_LIBRARY_PATH=/usr/pkg/lib PATH=/public/llvm-build/bin/:$PATH lldb -c ./a.out.core ./a.out (lldb) target create "./a.out" --core "./a.out.core" Core file '/public/core-arm64/./a.out.core' (aarch64) was loaded. (lldb) bt * thread #1, stop reason = signal SIGSEGV * frame #0: 0x0000000200100990 a.out`main(argc=1, argv=0x0000ffffffb97a88) at test.c:27 frame #1: 0x0000000200100834 a.out`___start + 320 (lldb) register read -a General Purpose Registers: x0 = 0x0000000000000013 x1 = 0x0000000000000000 x2 = 0x0000ffffffb97a98 x3 = 0x0000000000000000 x4 = 0x0000fffff953e1e0 x5 = 0x0000000000000000 x6 = 0x0000ffffffb979a0 x7 = 0x0000000000000000 x8 = 0x0000000000000000 x9 = 0x0000f747d5bb0000 x10 = 0x00000002001004f2 x11 = 0x0000000000000000 x12 = 0x000000000000000c x13 = 0x000003dd1f5750c1 x14 = 0x0000000000000010 x15 = 0x0000f747d5d42060 x16 = 0x0000f747d5d24ba8 x17 = 0x0000f747d5bf2d40 x18 = 0x000000000016d9b8 x19 = 0x0000ffffffb98fe0 x20 = 0x0000000200110e68 a.out`environ x21 = 0x0000000200110bf0 a.out`__JCR_LIST__ x22 = 0x0000000200110bf0 a.out`__JCR_LIST__ x23 = 0x0000000000000000 x24 = 0x0000ffffffb98fe0 x25 = 0x0000fffff9520000 x26 = 0x0000000000000000 x27 = 0x0000000000000000 x28 = 0x0000000000000000 fp = 0x0000ffffffb97a40 lr = 0x000000020010097c a.out`main + 32 at test.c:27 sp = 0x0000ffffffb97a30 pc = 0x0000000200100990 a.out`main + 52 at test.c:27 cpsr = 0x60000000 w0 = 0x00000013 w1 = 0x00000000 w2 = 0xffb97a98 w3 = 0x00000000 w4 = 0xf953e1e0 w5 = 0x00000000 w6 = 0xffb979a0 w7 = 0x00000000 w8 = 0x00000000 w9 = 0xd5bb0000 w10 = 0x001004f2 w11 = 0x00000000 w12 = 0x0000000c w13 = 0x1f5750c1 w14 = 0x00000010 w15 = 0xd5d42060 w16 = 0xd5d24ba8 w17 = 0xd5bf2d40 w18 = 0x0016d9b8 w19 = 0xffb98fe0 w20 = 0x00110e68 w21 = 0x00110bf0 w22 = 0x00110bf0 w23 = 0x00000000 w24 = 0xffb98fe0 w25 = 0xf9520000 w26 = 0x00000000 w27 = 0x00000000 w28 = 0x00000000 Floating Point Registers: s0 = -2.91628e+13 d0 = 1.34330471992722e-309 96 registers were unavailable. (lldb) For a clean room implementation we need to support APInt (Arbitrary Precision Integers) to handle 128bit regiters. Upstream will request new tests for this.. but there are greater problems with the NetBSD support as of now. Sponsored by <The NetBSD Foundation>
- Loading branch information