[Lldb-commits] [PATCH] D141425: [lldb] Add --gdb-format flag to dwim-print

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 10 19:05:53 PST 2023


jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

I don't think this is quite right.

First off, it's a little weird that your `dwim-print` command only supports the gdb-format option and not the format option?  In the long run, I think you need to support both.  Being able to say `v -fA variable` but not `dwim-print -fA` would be wrong.  But given this is early days, that can be a separate patch.

More importantly, your translation is lossy.  The gdb format option supports count & size as well as format: e.g. `-G 32xb`.  But the current code will turn that into `-G x` for the underlying command.  So you either need to reconstitute the gdb-format string from the m_count and m_byte_size as well as m_format, or get the OptionGroupFormat to store the unparsed gdb format string and just hand that back to you.


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