[Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 22 11:07:23 PDT 2015


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

You can't use std::string in the public API. Use lldb::SBStream as noted in inlined comments.


================
Comment at: include/lldb/API/SBValue.h:132-133
@@ -131,1 +131,4 @@
 
+    bool
+    PrintValueSummary (std::string& valsum);
+
----------------
You can't use std::string in the public API. You should use a SBStream instead. It can be used here:

```
bool
GetValueSummary (SBStream &strm);
```

Then you can get the data and length:

```
const char *data = strm.GetData();
const size_t data_len = strm.GetSize();
```

================
Comment at: source/API/SBValue.cpp:711
@@ +710,3 @@
+bool
+SBValue::PrintValueSummary (std::string& valsum)
+{
----------------
Use SBStream


http://reviews.llvm.org/D13058





More information about the lldb-commits mailing list