[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 29 16:01:39 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) {
----------------
clayborg wrote:
Why does `addr_of_string = valobj.GetAddressOf(scalar_is_load_addr, &addr_type);` return `eAddressTypeHost` with `addr_of_string` being set to `LLDB_INVALID_ADDRESS`?
https://github.com/llvm/llvm-project/pull/89110
More information about the lldb-commits
mailing list