[Lldb-commits] [PATCH] D146783: [lldb] Add ability to hide the root name of a value

Jorge Gorbe Moya via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 24 16:59:18 PDT 2023


jgorbe added a comment.

I just noticed a minor aesthetic problem with the input of `dwim-print` when using data formatters. There are some spacing adjustments in this commit but I'm not sure if they are the actual cause (please let me know if you'd prefer me to file a bug instead).

You can reproduce it by defining some random struct `X` and using `settings set auto-one-line-summaries false` like you did in the test case for this commit.

If you add a summary string:

  type summary add -s "my summary" -e "X"

then the output of dwim-print without persistent results has the wrong spacing:

  (lldb) dwim-print my_x
  (X)  my summary{
    value = 0
  }

(note there are two spaces before "my summary" and no space before the opening brace).

Using `expr` or `dwim-print --persistent-result on --` doesn't have this problem:

  (lldb) dwim-print --persistent-result on -- my_x
  (X) $2 = my summary {
    value = 0
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146783



More information about the lldb-commits mailing list