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

Luís Ferreira via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 21 19:24:40 PST 2022


ljmf00 added a comment.

In D117928#3262874 <https://reviews.llvm.org/D117928#3262874>, @jingham wrote:

> 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

Thanks, this makes much more sense in my brain and gives me much more control to debug this. I'm digging a bit more. I'm tracing Linux kernel syscalls to check if data is sent correctly. At first glance, it seems fine to me, so maybe it's a `ptrace` issue? I need to investigate a bit more to say that tho. `strace` say me this:

  ptrace(PTRACE_SETREGSET, 29772, NT_FPREGSET, {iov_base={cwd=0x37f, swd=0, ftw=0, fop=0, rip=0, rdp=0, mxcsr=0x1f80, mxcr_mask=0, st_space=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], xmm_space=[0xa090807, 0xe0d0c0b, 0x1211100f, 0x16151413, 0xa090807, 0xe0d0c0b, 0x1211100f, 0x16151413, 0xa090807, 0xe0d0c0b, 0x1211100f, 0x16151413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...], padding=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, iov_len=512}) = 0
  ptrace(PTRACE_GETREGSET, 29772, NT_FPREGSET, {iov_base={cwd=0x37f, swd=0, ftw=0, fop=0, rip=0, rdp=0, mxcsr=0x1f80, mxcr_mask=0, st_space=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], xmm_space=[0xa090807, 0xe0d0c0b, 0x1211100f, 0x16151413, 0xa090807, 0xe0d0c0b, 0x1211100f, 0x16151413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...], padding=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, iov_len=512}) = 0

First call when setting xmm2 and second call when getting the current registers.


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