[Lldb-commits] [PATCH] D141425: [lldb] Add --gdb-format flag to dwim-print
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 11 10:04:03 PST 2023
kastiglione added a comment.
@jingham The brief answer is that decisions have been based on compatibility with the behavior of `p`.
1. `expression` (also `p`) and `frame variable`, only support the the format part of gdb options. Neither support `--count` or `--size` and so don't support the equivalent gdb options.
2. `p` takes no flags (other than the gdb-format), and `dwim-print` matches that behavior.
Taking the example of `dwim-print -fA variable`, if the user were to do the same but with an expression, they'd have to write `dwim-print -fA -- expression`. Will there be users who know and want the printing options you mentioned (synthetic/raw, depth, etc) but who try to use those with `dwim-print` instead of directly using `v` or `e`?
My expectation has been that `dwim-print` would (1) generally not be used directly, but be via an alias (either `p` or another choice) and that (2) for compatibility, the alias would be `dwim-print --`.
Thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141425/new/
https://reviews.llvm.org/D141425
More information about the lldb-commits
mailing list