Hi,
I've been implementing a basic RSP protocol server for remotely debugging a
MIPS simulator, and have been having some trouble getting certain lldb
features to work there, in particular backtraces (bt) and instruction step
over (ni). Does someone know what packets these commands rely on to work?
I've attached some communication logs, and if it helps my code is at
https://github.com/CQCumbers/nmulator/blob/master/src/debugger.h
Please forgive me if this isn't the right place to ask - I know this isn't
directly part of lldb development but I've tried several other places and
haven't been able to find anyone familiar with the subject.
Also, just a user question, but is there a way to show register values in
hex format without leading zeros?
Thanks,
Alexander
(lldb) log enable gdb-remote all
(lldb) gdb-remote 4343
ProcessGDBRemote::ConnectToDebugserver Connecting to connect://localhost:4343
< 1> send packet: +
history[1] tid=0x0307 < 1> send packet: +
< 7> read packet: $S05#b8
< 1> send packet: +
< 19> send packet: $QStartNoAckMode#b0
< 1> read packet: +
< 4> read packet: $#00
< 1> send packet: +
< 41> send packet: $qSupported:xmlRegisters=i386,arm,mips#12
< 1> read packet: +
< 19> read packet: $PacketSize=2047#fd
< 1> send packet: +
< 26> send packet: $QThreadSuffixSupported#e4
< 1> read packet: +
< 4> read packet: $#00
< 1> send packet: +
< 27> send packet: $QListThreadsInStopReply#21
< 1> read packet: +
< 4> read packet: $#00
< 1> send packet: +
< 13> send packet: $qHostInfo#9b
< 1> read packet: +
< 61> read packet:
$triple:6d6970732d6c696e75782d676e75;ptrsize:8;endian:big;#d1
< 1> send packet: +
GDBRemoteCommunicationClient::GetHostInfo parsed host architecture as mips,
triple as mips-unknown-linux-gnu from triple text mips-linux-gnu
< 10> send packet: $vCont?#49
< 1> read packet: +
< 4> read packet: $#00
< 1> send packet: +
< 27> send packet: $qVAttachOrWaitSupported#38
< 1> read packet: +
< 4> read packet: $#00
< 1> send packet: +
< 23> send packet: $QEnableErrorStrings#8c
< 1> read packet: +
< 4> read packet: $#00
< 1> send packet: +
ProcessGDBRemote::StartAsyncThread ()
< 16> send packet: $qProcessInfo#dc
ProcessGDBRemote::AsyncThread (arg = 0x7f8eff006218, pid = 0) thread
starting...
ProcessGDBRemote::AsyncThread (arg = 0x7f8eff006218, pid = 0)
listener.WaitForEvent (NULL, event_sp)...
< 1> read packet: +
< 46> read packet: $triple:6d6970732d6c696e75782d676e75;pid:1;#e0
< 1> send packet: +
< 5> send packet: $?#3f
< 1> read packet: +
< 7> read packet: $S05#b8
< 1> send packet: +
< 18> send packet: $qRegisterInfo0#72
< 1> read packet: +
< 57> read packet: $name:r0;bitsize:64;offset:0;encoding:sint;format:hex;#7a
< 1> send packet: +
< 18> send packet: $qRegisterInfo1#73
< 1> read packet: +
< 57> read packet: $name:at;bitsize:64;offset:8;encoding:sint;format:hex;#b5
< 1> send packet: +
< 18> send packet: $qRegisterInfo2#74
< 1> read packet: +
< 58> read packet: $name:v0;bitsize:64;offset:16;encoding:sint;format:hex;#b5
< 1> send packet: +
< 18> send packet: $qRegisterInfo3#75
< 1> read packet: +
< 58> read packet: $name:v1;bitsize:64;offset:24;encoding:sint;format:hex;#b5
< 1> send packet: +
< 18> send packet: $qRegisterInfo4#76
< 1> read packet: +
< 58> read packet: $name:a0;bitsize:64;offset:32;encoding:sint;format:hex;#9e
< 1> send packet: +
< 18> send packet: $qRegisterInfo5#77
< 1> read packet: +
< 58> read packet: $name:a1;bitsize:64;offset:40;encoding:sint;format:hex;#9e
< 1> send packet: +
< 18> send packet: $qRegisterInfo6#78
< 1> read packet: +
< 58> read packet: $name:a2;bitsize:64;offset:48;encoding:sint;format:hex;#a7
< 1> send packet: +
< 18> send packet: $qRegisterInfo7#79
< 1> read packet: +
< 58> read packet: $name:a3;bitsize:64;offset:56;encoding:sint;format:hex;#a7
< 1> send packet: +
< 18> send packet: $qRegisterInfo8#7a
< 1> read packet: +
< 58> read packet: $name:t0;bitsize:64;offset:64;encoding:sint;format:hex;#b6
< 1> send packet: +
< 18> send packet: $qRegisterInfo9#7b
< 1> read packet: +
< 58> read packet: $name:t1;bitsize:64;offset:72;encoding:sint;format:hex;#b6
< 1> send packet: +
< 18> send packet: $qRegisterInfoa#a3
< 1> read packet: +
< 58> read packet: $name:t2;bitsize:64;offset:80;encoding:sint;format:hex;#b6
< 1> send packet: +
< 18> send packet: $qRegisterInfob#a4
< 1> read packet: +
< 58> read packet: $name:t3;bitsize:64;offset:88;encoding:sint;format:hex;#bf
< 1> send packet: +
< 18> send packet: $qRegisterInfoc#a5
< 1> read packet: +
< 58> read packet: $name:t4;bitsize:64;offset:96;encoding:sint;format:hex;#bf
< 1> send packet: +
< 18> send packet: $qRegisterInfod#a6
< 1> read packet: +
< 59> read packet: $name:t5;bitsize:64;offset:104;encoding:sint;format:hex;#e6
< 1> send packet: +
< 18> send