labath added a comment. In D55718#1443415 <https://reviews.llvm.org/D55718#1443415>, @jasonmolenda wrote:
> In D55718#1442965 <https://reviews.llvm.org/D55718#1442965>, @clayborg wrote: > > > It would be really nice to get the GDB remote server for ARC so that it > > vends the correct regs to begin with, but if that isn't possible I guess we > > need to do what we are doing here. I would really like to not see more > > architectures have to add code to ProcessGDBRemote.cpp at all. If that > > isn't possible this solution will need to be used. > > > Unrelated to this patchset, but just last week I was working on something and > thinking about how our system of "the RSP stub is the canonical source of > register knowledge" is probably not the best architecture. IMO the remote > stub should teach us (1) the name of each register, (2) the numbers it will > use for each register, (3) the size in bits of each register, and (4) the > offset into the g/G packet of that register. > > Everything else about registers should come from lldb in either > architecture-specific definitions (rax has 64 bits, and it has a slice > register eax of 32 bits, an ax of 16 bits etc; it is printed as > Uint64/32/16), or ABI definitions (rdi is arg1 in the posix x86_64 ABI; rsp > is eh_frame regnum 7, dwarf regnum 7). Coordination between the RSP stub and > lldb should be done by register name, confirmed by register size (the remote > stub says it has a 64-bit r0 and I only know about a 32-bit r0, we have a > problem). > > Back in 2015 I added some code in r247121 that would fill in eh_frame and > dwarf register numbers from the ABI plugin if the remote stub didn't provide > them in ProcessGDBRemote's AugmentRegisterInfoViaABI. It might be better for > ARC to hardcode these generic register additions some place like that. The > change in 247121 was a step in the direction of having lldb be the canonical > source of information about registers, but only doing the easy first bit. +1000 This sounds really great to me. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55718/new/ https://reviews.llvm.org/D55718 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits