[Lldb-commits] [PATCH] Fix process's output to stdout/stderr (MI)

Ilia K ki.stfu at gmail.com
Tue Feb 24 07:40:10 PST 2015


Hi abidh, clayborg, emaste,

* Add CMIUtilString::Escape/Unescape methods (MI)
* Fix process's output to stdout/stderr (MI):
lldb-mi escapes process's output to show it in the following format:
```
~"..."
```

But previously not all characters were escaped by CMICmnLLDBDebuggerHandleEvents::ConvertPrintfCtrlCodeToString and output of
```
printf("'\n` - it's \\n")
```
looked like:
```
~"'\r\n` - it's \n"
```

This patch fixes it by using CMIUtilString::Escape method and now it looks like:
```
~"\'\r\n\` - it\'s \\n"
```

http://reviews.llvm.org/D7858

Files:
  tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
  tools/lldb-mi/MIUtilString.cpp
  tools/lldb-mi/MIUtilString.h

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7858.20596.patch
Type: text/x-patch
Size: 7391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150224/08095912/attachment.bin>


More information about the lldb-commits mailing list