[all-commits] [llvm/llvm-project] 89a81e: [lldb-vscode] Display a more descriptive summary f...

Walter Erquinigo via All-commits all-commits at lists.llvm.org
Wed Sep 6 14:13:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89a81ec2054919411eb8da1274557cbf97bbfe49
      https://github.com/llvm/llvm-project/commit/89a81ec2054919411eb8da1274557cbf97bbfe49
  Author: Walter Erquinigo <a20012251 at gmail.com>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M lldb/test/API/tools/lldb-vscode/evaluate/TestVSCode_evaluate.py
    M lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py
    M lldb/tools/lldb-vscode/JSONUtils.cpp

  Log Message:
  -----------
  [lldb-vscode] Display a more descriptive summary for containers and pointers (#65514)

We've been displaying types and addresses for containers, but that's not
very useful information. A better approach is to compose the summary of
containers with the summary of a few of its children.

Not only that, we can dereference simple pointers and references to get
the summary of the pointer variable, which is also better than just
showing an anddress.

And in the rare case where the user wants to inspect the raw address,
they can always use the debug console for that.

For the record, this is very similar to what the CodeLLDB extension
does, and it seems to give a better experience.

An example of the new output:
<img width="494" alt="Screenshot 2023-09-06 at 2 24 27 PM"
src="https://github.com/llvm/llvm-project/assets/1613874/588659b8-421a-4865-8d67-ce4b6182c4f9">

And this is the 
<img width="476" alt="Screenshot 2023-09-06 at 2 46 30 PM"
src="https://github.com/llvm/llvm-project/assets/1613874/5768a52e-a773-449d-9aab-1b2fb2a98035">
old output:




More information about the All-commits mailing list