summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp')
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
index 636819936b5..4eb3b95afb4 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
@@ -126,23 +126,14 @@ bool LibStdcppUniquePtrSyntheticFrontEnd::GetSummary(
if (!m_ptr_obj)
return false;
- if (m_ptr_obj->GetValueAsUnsigned(0) == 0) {
+ bool success;
+ uint64_t ptr_value = m_ptr_obj->GetValueAsUnsigned(0, &success);
+ if (!success)
+ return false;
+ if (ptr_value == 0)
stream.Printf("nullptr");
- } else {
- Error error;
- bool print_pointee = false;
- if (m_obj_obj) {
- if (m_obj_obj->DumpPrintableRepresentation(
- stream, ValueObject::eValueObjectRepresentationStyleSummary,
- lldb::eFormatInvalid,
- ValueObject::PrintableRepresentationSpecialCases::eDisable,
- false)) {
- print_pointee = true;
- }
- }
- if (!print_pointee)
- stream.Printf("ptr = 0x%" PRIx64, m_ptr_obj->GetValueAsUnsigned(0));
- }
+ else
+ stream.Printf("0x%" PRIx64, ptr_value);
return true;
}
OpenPOWER on IntegriCloud