[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)
via lldb-commits
lldb-commits at lists.llvm.org
Tue May 28 09:59:38 PDT 2024
================
@@ -254,13 +254,17 @@ bool lldb_private::formatters::LibStdcppStringSummaryProvider(
} else
addr_of_string =
valobj.GetAddressOf(scalar_is_load_addr, &addr_type);
- if (addr_of_string != LLDB_INVALID_ADDRESS) {
+
+ // We have to check for host address here
+ // because GetAddressOf returns INVALID for all non load addresses.
+ // But we can still format strings in host memory.
+ if (addr_of_string != LLDB_INVALID_ADDRESS ||
+ addr_type == eAddressTypeHost) {
----------------
jimingham wrote:
That's fine too, but you have to be careful here since getting host vrs. target address attribution wrong is one quick way to crash lldb.
https://github.com/llvm/llvm-project/pull/89110
More information about the lldb-commits
mailing list