[Lldb-commits] [PATCH] D113098: [lldb] (Partially) enable formatting of utf strings before the program is started

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 3 05:54:23 PDT 2021


labath created this revision.
labath added reviewers: teemperor, vsk.
labath requested review of this revision.
Herald added a project: LLDB.

The StringPrinter class was using a Process instance to read memory.
This automatically prevented it from working before starting the
program.

This patch changes the class to use the Target object for reading
memory, as targets are always available. This required moving
ReadStringFromMemory from Process to Target.

This is sufficient to make frame/target variable work, but further
changes are necessary for the expression evaluator. Preliminary analysis
indicates the failures are due to the expression result ValueObjects
failing to provide an address, presumably because we're operating on
file addresses before starting. I haven't looked into what would it take
to make that work.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113098

Files:
  lldb/include/lldb/DataFormatters/StringPrinter.h
  lldb/include/lldb/Target/Process.h
  lldb/include/lldb/Target/Target.h
  lldb/source/DataFormatters/StringPrinter.cpp
  lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
  lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
  lldb/source/Plugins/Language/ObjC/NSString.cpp
  lldb/source/Target/Process.cpp
  lldb/source/Target/Target.cpp
  lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113098.384410.patch
Type: text/x-patch
Size: 17950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211103/94c7c20b/attachment-0001.bin>


More information about the lldb-commits mailing list