summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorIlia K <ki.stfu@gmail.com>2015-04-24 11:33:36 +0000
committerIlia K <ki.stfu@gmail.com>2015-04-24 11:33:36 +0000
commitafef49267adaf5fdce55a834b20fc4947c4f9868 (patch)
tree60c07af94e4b18bf16e26e483df8b1ca3c68dd4f /lldb
parentff1e234fb8f4984e3702bbf41272b363150e634b (diff)
downloadbcm5719-llvm-afef49267adaf5fdce55a834b20fc4947c4f9868.tar.gz
bcm5719-llvm-afef49267adaf5fdce55a834b20fc4947c4f9868.zip
Fix CMICmnLLDBDebuggerHandleEvents::GetProcessStdout/GetProcessStderr to use stream-record (MI)
llvm-svn: 235711
Diffstat (limited to 'lldb')
-rw-r--r--lldb/test/tools/lldb-mi/TestMiGdbSetShow.py6
-rw-r--r--lldb/test/tools/lldb-mi/interpreter/TestMiCliSupport.py10
-rw-r--r--lldb/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py10
-rw-r--r--lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py2
-rw-r--r--lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp10
5 files changed, 20 insertions, 18 deletions
diff --git a/lldb/test/tools/lldb-mi/TestMiGdbSetShow.py b/lldb/test/tools/lldb-mi/TestMiGdbSetShow.py
index f2e7e78293a..c6833001b4a 100644
--- a/lldb/test/tools/lldb-mi/TestMiGdbSetShow.py
+++ b/lldb/test/tools/lldb-mi/TestMiGdbSetShow.py
@@ -57,7 +57,7 @@ class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase):
# Test that program is executed in async mode
self.runCmd("-exec-run")
self.expect("\*running")
- self.expect("~\"argc=1")
+ self.expect("@\"argc=1")
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -80,9 +80,9 @@ class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase):
# Test that program is executed in async mode
self.runCmd("-exec-run")
unexpected = [ "\*running" ] # "\*running" is async notification
- it = self.expect(unexpected + [ "~\"argc=1\\\\r\\\\n" ])
+ it = self.expect(unexpected + [ "@\"argc=1\\\\r\\\\n" ])
if it < len(unexpected):
- # generate error if it's not "~\"argc=1\\\\r\\\\n"
+ # generate error if it's not "@\"argc=1\\\\r\\\\n"
self.expect("$UNEXPECTED FOUND: %s\.^" % unexpected[it], timeout = 0)
@lldbmi_test
diff --git a/lldb/test/tools/lldb-mi/interpreter/TestMiCliSupport.py b/lldb/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
index 896b4ffc81d..9a1a1555920 100644
--- a/lldb/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
+++ b/lldb/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
@@ -74,7 +74,7 @@ class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
self.expect("\^running")
# Test that arguments were passed properly
- self.expect("~\"argc=5\\\\r\\\\n\"")
+ self.expect("@\"argc=5\\\\r\\\\n\"")
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -99,7 +99,7 @@ class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
self.expect("\^running")
# Test that arguments were passed properly
- self.expect("~\"argc=5\\\\r\\\\n\"")
+ self.expect("@\"argc=5\\\\r\\\\n\"")
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -151,7 +151,7 @@ class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
# Linux: "*stopped,reason=\"end-stepping-range\",frame={addr="0x[0-9a-f]+\",func=\"__printf\",args=[{name=\"format\",value=\"0x[0-9a-f]+\"}],file=\"printf.c\",fullname=\".+printf.c\",line="\d+"},thread-id=\"1\",stopped-threads=\"all\"
self.runCmd("thread step-in")
self.expect("\^done")
- it = self.expect([ "~\"argc=1\\\\r\\\\n\"",
+ it = self.expect([ "@\"argc=1\\\\r\\\\n\"",
"\*stopped,reason=\"end-stepping-range\".+?func=\"(?!main).+?\"" ])
if it == 0:
self.expect("\*stopped,reason=\"end-stepping-range\".+?func=\"main\"")
@@ -179,7 +179,7 @@ class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
# Test that "thread step-over" steps over
self.runCmd("thread step-over")
self.expect("\^done")
- self.expect("~\"argc=1\\\\r\\\\n\"")
+ self.expect("@\"argc=1\\\\r\\\\n\"")
self.expect("\*stopped,reason=\"end-stepping-range\"")
@lldbmi_test
@@ -205,7 +205,7 @@ class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
# Test that "thread continue" continues execution
self.runCmd("thread continue")
self.expect("\^done")
- self.expect("~\"argc=1\\\\r\\\\n")
+ self.expect("@\"argc=1\\\\r\\\\n")
self.expect("\*stopped,reason=\"exited-normally\"")
if __name__ == '__main__':
diff --git a/lldb/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py b/lldb/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
index 9157a17860c..6ec2ea2b923 100644
--- a/lldb/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
+++ b/lldb/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
@@ -72,7 +72,7 @@ class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
self.expect("\^running")
# Test that arguments were passed properly
- self.expect("~\"argc=2\\\\r\\\\n\"")
+ self.expect("@\"argc=2\\\\r\\\\n\"")
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -96,7 +96,7 @@ class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
self.expect("\^running")
# Test that arguments were passed properly
- self.expect("~\"argc=2\\\\r\\\\n\"")
+ self.expect("@\"argc=2\\\\r\\\\n\"")
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -146,7 +146,7 @@ class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
# Linux: "*stopped,reason=\"end-stepping-range\",frame={addr="0x[0-9a-f]+\",func=\"__printf\",args=[{name=\"format\",value=\"0x[0-9a-f]+\"}],file=\"printf.c\",fullname=\".+printf.c\",line="\d+"},thread-id=\"1\",stopped-threads=\"all\"
self.runCmd("-interpreter-exec console \"thread step-in\"")
self.expect("\^done")
- it = self.expect([ "~\"argc=1\\\\r\\\\n\"",
+ it = self.expect([ "@\"argc=1\\\\r\\\\n\"",
"\*stopped,reason=\"end-stepping-range\".+?func=\"(?!main).+?\"" ])
if it == 0:
self.expect("\*stopped,reason=\"end-stepping-range\".+?func=\"main\"")
@@ -173,7 +173,7 @@ class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
# Test that "thread step-over" steps over
self.runCmd("-interpreter-exec console \"thread step-over\"")
self.expect("\^done")
- self.expect("~\"argc=1\\\\r\\\\n\"")
+ self.expect("@\"argc=1\\\\r\\\\n\"")
self.expect("\*stopped,reason=\"end-stepping-range\"")
@lldbmi_test
@@ -198,7 +198,7 @@ class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
# Test that "thread continue" continues execution
self.runCmd("-interpreter-exec console \"thread continue\"")
self.expect("\^done")
- self.expect("~\"argc=1\\\\r\\\\n")
+ self.expect("@\"argc=1\\\\r\\\\n")
self.expect("\*stopped,reason=\"exited-normally\"")
if __name__ == '__main__':
diff --git a/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py b/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py
index d1e5cf52bfa..1bcd79fc774 100644
--- a/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py
+++ b/lldb/test/tools/lldb-mi/syntax/TestMiSyntax.py
@@ -75,7 +75,7 @@ class MiSyntaxTestCase(lldbmi_testcase.MiTestCaseBase):
self.expect("\^running")
# Test that a process output is wrapped correctly
- self.expect("\~\"'\\\\r\\\\n` - it's \\\\\\\\n\\\\x12\\\\\"\\\\\\\\\\\\\"")
+ self.expect("\@\"'\\\\r\\\\n` - it's \\\\\\\\n\\\\x12\\\\\"\\\\\\\\\\\\\"")
if __name__ == '__main__':
unittest2.main()
diff --git a/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp b/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
index c99aa5d4f7b..cc30e0a2be2 100644
--- a/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
+++ b/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
@@ -1534,8 +1534,9 @@ CMICmnLLDBDebuggerHandleEvents::GetProcessStdout(void)
return MIstatus::success;
const bool bEscapeQuotes(true);
- const CMIUtilString t(CMIUtilString::Format("~\"%s\"", text.Escape(bEscapeQuotes).c_str()));
- return TextToStdout(t);
+ CMICmnMIValueConst miValueConst(text.Escape(bEscapeQuotes));
+ CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, miValueConst);
+ return MiOutOfBandRecordToStdout(miOutOfBandRecord);
}
//++ ------------------------------------------------------------------------------------
@@ -1567,8 +1568,9 @@ CMICmnLLDBDebuggerHandleEvents::GetProcessStderr(void)
return MIstatus::success;
const bool bEscapeQuotes(true);
- const CMIUtilString t(CMIUtilString::Format("~\"%s\"", text.Escape(bEscapeQuotes).c_str()));
- return TextToStdout(t);
+ CMICmnMIValueConst miValueConst(text.Escape(bEscapeQuotes));
+ CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, miValueConst);
+ return MiOutOfBandRecordToStdout(miOutOfBandRecord);
}
//++ ------------------------------------------------------------------------------------
OpenPOWER on IntegriCloud