upmem / lldb

Mirror of official lldb git repository located at http://llvm.org/git/lldb.
http://lldb.llvm.org
Other
0 stars 0 forks source link

cannot dump registers after DPU program has completed #3

Open vpalatin opened 5 years ago

vpalatin commented 5 years ago

It would be nice to be able to inspect the registers content after the program has completed its execution

(lldb) file helloworld.bin
Current executable set to 'helloworld.bin' (dpu).
(lldb) b main
Breakpoint 1: where = helloworld.bin`main + 40 at helloworld.c:6, address = 0x800000a0
(lldb) run
Process 21312 launched: '.../helloworld.bin' (dpu)
Process 21312 stopped
* thread #1, name = 'DPUthread0', stop reason = breakpoint 1.1
    frame #0: 0x800000a0 helloworld.bin`main at helloworld.c:6
[...]
(lldb) register read -A
General Purpose Registers:
        r0 = 0x00000000  data_at_zero
[...]
(lldb) cont
Process 21312 resuming
Process 21312 exited with status = 92 (0x0000005c) 
(lldb) register read -A
error: invalid thread
ghost commented 5 years ago

It is not possible for a x86 program with LLDB, not sure we can do it for easily for a DPU program.

vpalatin commented 5 years ago

It is not possible for a x86 program with LLDB, not sure we can do it for easily for a DPU program.

sure when the process no longer exists, the context is gone. Maybe 'exited' is not the best state for us ?