[all-commits] [llvm/llvm-project] 4c56f7: [lldb] (Partially) enable formatting of utf string...

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Nov 18 05:48:41 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c56f734b35dd3e16b75da46c023cd4b92f83f8c
      https://github.com/llvm/llvm-project/commit/4c56f734b35dd3e16b75da46c023cd4b92f83f8c
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2021-11-18 (Thu, 18 Nov 2021)

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

  Log Message:
  -----------
  [lldb] (Partially) enable formatting of utf strings before the program is started

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.

Differential Revision: https://reviews.llvm.org/D113098




More information about the All-commits mailing list