[Lldb-commits] [PATCH] Fix -break-insert for system functions (MI)
Ilia K
ki.stfu at gmail.com
Wed Mar 18 06:01:17 PDT 2015
Hi abidh, clayborg,
# Fix -break-insert for system functions
# Fix MiExecTestCase to use -break-insert instead of CLI "b"
# Improve MiBreakTestCase: now it uses printf() instead of in-house function
All tests pass on OS X.
http://reviews.llvm.org/D8412
Files:
test/tools/lldb-mi/breakpoint/TestMiBreak.py
test/tools/lldb-mi/breakpoint/main.cpp
test/tools/lldb-mi/control/TestMiExec.py
tools/lldb-mi/MICmdCmdBreak.cpp
Index: test/tools/lldb-mi/breakpoint/TestMiBreak.py
===================================================================
--- test/tools/lldb-mi/breakpoint/TestMiBreak.py
+++ test/tools/lldb-mi/breakpoint/TestMiBreak.py
@@ -21,7 +21,7 @@
self.runCmd("-file-exec-and-symbols %s" % self.myexe)
self.expect("\^done")
- self.runCmd("-break-insert -f g_MyFunction")
+ self.runCmd("-break-insert -f printf")
self.expect("\^done,bkpt={number=\"1\"")
self.runCmd("-exec-run")
@@ -46,7 +46,7 @@
self.expect("\^running")
self.expect("\*stopped,reason=\"breakpoint-hit\"")
- self.runCmd("-break-insert g_MyFunction")
+ self.runCmd("-break-insert printf")
self.expect("\^done,bkpt={number=\"2\"")
self.runCmd("-exec-continue")
Index: test/tools/lldb-mi/breakpoint/main.cpp
===================================================================
--- test/tools/lldb-mi/breakpoint/main.cpp
+++ test/tools/lldb-mi/breakpoint/main.cpp
@@ -7,14 +7,11 @@
//
//===----------------------------------------------------------------------===//
-void
-g_MyFunction(void)
-{
-}
+#include <cstdio>
int
main(int argc, char const *argv[])
{
- g_MyFunction();
+ printf("");
return 0; // BP_return
}
Index: test/tools/lldb-mi/control/TestMiExec.py
===================================================================
--- test/tools/lldb-mi/control/TestMiExec.py
+++ test/tools/lldb-mi/control/TestMiExec.py
@@ -430,9 +430,8 @@
#self.expect("\^error: Frame index 10 is out of range")
# Set BP at printf and run to BP
- # FIXME: BP at printf not resolved and never hit!
- self.runCmd("-interpreter-exec command \"breakpoint set --name printf\"") #FIXME: self.runCmd("-break-insert -f printf")
- self.expect("\^done") #FIXME: self.expect("\^done,bkpt={number=\"3\"")
+ self.runCmd("-break-insert -f printf")
+ self.expect("\^done,bkpt={number=\"3\"")
self.runCmd("-exec-continue")
self.expect("\^running")
self.expect("\*stopped,reason=\"breakpoint-hit\"")
Index: tools/lldb-mi/MICmdCmdBreak.cpp
===================================================================
--- tools/lldb-mi/MICmdCmdBreak.cpp
+++ tools/lldb-mi/MICmdCmdBreak.cpp
@@ -232,7 +232,7 @@
m_brkPt = sbTarget.BreakpointCreateByLocation(fileName.c_str(), nFileLine);
break;
case eBreakPoint_ByName:
- m_brkPt = sbTarget.BreakpointCreateByName(m_brkName.c_str(), sbTarget.GetExecutable().GetFilename());
+ m_brkPt = sbTarget.BreakpointCreateByName(m_brkName.c_str(), nullptr);
break;
case eBreakPoint_count:
case eBreakPoint_NotDefineYet:
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8412.22176.patch
Type: text/x-patch
Size: 2814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150318/57fe6bf9/attachment.bin>
More information about the lldb-commits
mailing list