[Lldb-commits] [PATCH] D62931: [lldb-server] Add setting to force 'g' packet use

Guilherme Andrade via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 16 16:29:15 PDT 2019


guiandrade added a comment.

In D62931#1607800 <https://reviews.llvm.org/D62931#1607800>, @labath wrote:

> In D62931#1607221 <https://reviews.llvm.org/D62931#1607221>, @guiandrade wrote:
>
> > Oh, sorry about that. I was relying on `ninja check`, which runs okay for me.
> >
> >   > ninja check
> >    [0/1] Running the LLVM regression tests
> >    Testing Time: 583.96s
> >      Expected Passes    : 32141
> >      Expected Failures  : 147
> >      Unsupported Tests  : 438
> >   
> >
> > How can I invoke those other tests? (in case it's relevant, here's my cmake command `cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS='lldb;clang;libcxx'`)
>
>
> LLDB tests can be run with the "check-lldb" target. There's also "check-all" which would run *all* tests, but that's usually overkill.
>
> > About not tying `G` and `g` together, maybe could we remove this branch <https://github.com/llvm/llvm-project/blob/63e5fb76ecfed3434252868d8cf07d676f979f2f/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp#L336>?
>
> That would be fine for lldb-server, but I am not sure how would that play with other stubs. As I understand it, the main reason this read-all-at-once logic was introduced was to handle stubs which did not implement `p`/`P` packets, so we may not be able to just start sending `P` unconditionally. @clayborg or @jasonmolenda can probably say more about that...


I'm trying to write a prototype that disassociates the use of 'g' and 'G' packets, and I think I found an issue with LLDB's current code and Intel MPX registers.

Repro steps:

Using https://github.com/llvm/llvm-project/blob/3cabfb344b820586bb7c43212340f64246cde8eb/lldb/lit/Register/Inputs/x86-ymm-read.cpp, run:

`g++ -g x86-ymm-read.cpp && lldb a.out -o 'r' -o 'reg read bnd0' -o 'reg read ymm12' -o 'reg read bnd0'`

The register `bnd0` will initially be evaluated to `{0x0000000000000000 0x0000000000000000}` and then to `{0x131211100f0e0d0c 0x1b1a191817161514}`.

I think that's because there's an intersection between the interval `[reg_info->byte_offset, reg_info->byte_offset + reg_info->byte_size)` for `bnd0` and `ymm12`, which causes data in https://github.com/llvm-mirror/lldb/blob/2f97c81e9ed17f6ad759265abfa3f8f49dd7b826/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h#L115 to get overwritten.

Could someone please confirm that this is an issue?

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62931/new/

https://reviews.llvm.org/D62931





More information about the lldb-commits mailing list