[Lldb-commits] [PATCH] D117928: [lldb] Disable tests for x86 that uses write command on XMM registers

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 21 16:44:11 PST 2022


Ah, I think your confusion is that you missed the “Remote” part of all the classes in lldb that start with “GDB”.   They are so called because they use the “gdb remote serial protocol” to communicate with the debug monitor, not because they have anything to do with gdb the debugger.  That’s a protocol for communication between a debugger and a debug monitor of some sort, devised by people working on gdb aeons ago:

https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html

In lldb’s case, that debug monitor can be debugserver (the default on Darwin systems) lldb-server (the default on Linux systems) or anything else that speaks the gdb remote protocol (a lot of JTAG parts come with a gdb remote protocol stub) including potentially gdb’s implementation of the monitor: gdbserver...

But there’s no shared code between gdb & lldb, just a shared communication protocol.

Jim

> On Jan 21, 2022, at 4:34 PM, Luís Ferreira via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> ljmf00 added a comment.
> 
> In D117928#3262710 <https://reviews.llvm.org/D117928#3262710>, @jingham wrote:
> 
>> I guess we're just all confused that you are mentioning GDB at all, and the only thing I could think of is gdbserver, since that's the only way anything GDB could get mixed with anything LLDB...
> 
> Ok, I will try to give some context. I can be wrong/confused and this can be unrelated to GDB and a coincidence with my observable behaviour, but running LLDB with default settings, `register write` command triggers the following function https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp#L296 .
> 
> Interestingly, I just did a test right now: removed GDB from my machine and did a clean build. That function (`GDBRemoteRegisterContext::WriteRegister`) still triggers when `register write`. I'm a bit confused now on why this is triggered. Maybe there is a fallback system? I don't have any guidance on this whatsoever, so my view on how those plugins work can be wrong. Would be cool to have a brief explanation about the //pipeline// of `RegisterContext` and how it interacts with `GDBRemoteRegisterContext` to be in sync.
> 
> Can be confusing to add a link to the GDB bug tracker, but one thing I can be sure of is that this is dependent on the CPU and by the observed behaviour, the presence of AVX or some other extension introduced on x86_64-v2 related to XMM registers (can't think of another one other than SSE). I can also describe my testing environment and give the libvirt/qemu parameters I added to virtualize the CPU flags, if needed, but the CPU configuration is similar to the models I described. I ran LLDB on a clean archiso live installation.
> 
> In D117928#3262762 <https://reviews.llvm.org/D117928#3262762>, @mgorny wrote:
> 
>> I'm sorry but I don't understand what you're talking about. Could you explain how are you running tests? Is there some way we can reproduce the problem?
> 
> You can see a build log I posted on discourse: https://ipfs.io/ipfs/bafybeidsf745d4qxrzhbbir4h23ov4rppvo2uke7qh75oj6lfoi6zkcyre/
> 
> 
> Repository:
>  rG LLVM Github Monorepo
> 
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D117928/new/
> 
> https://reviews.llvm.org/D117928
> 



More information about the lldb-commits mailing list