diff options
-rw-r--r-- | lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py | 4 | ||||
-rw-r--r-- | lldb/test/tools/lldb-mi/breakpoint/main.cpp | 7 | ||||
-rw-r--r-- | lldb/test/tools/lldb-mi/control/TestMiExec.py | 5 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmdCmdBreak.cpp | 2 |
4 files changed, 7 insertions, 11 deletions
diff --git a/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py b/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py index c1e4e9e5945..48058eb4e5a 100644 --- a/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py +++ b/lldb/test/tools/lldb-mi/breakpoint/TestMiBreak.py @@ -21,7 +21,7 @@ class MiBreakTestCase(lldbmi_testcase.MiTestCaseBase): 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 @@ class MiBreakTestCase(lldbmi_testcase.MiTestCaseBase): 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") diff --git a/lldb/test/tools/lldb-mi/breakpoint/main.cpp b/lldb/test/tools/lldb-mi/breakpoint/main.cpp index 22e2e344951..262ebc1b5f0 100644 --- a/lldb/test/tools/lldb-mi/breakpoint/main.cpp +++ b/lldb/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 } diff --git a/lldb/test/tools/lldb-mi/control/TestMiExec.py b/lldb/test/tools/lldb-mi/control/TestMiExec.py index cf067a5a1b6..9c3b1d2348c 100644 --- a/lldb/test/tools/lldb-mi/control/TestMiExec.py +++ b/lldb/test/tools/lldb-mi/control/TestMiExec.py @@ -430,9 +430,8 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): #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\"") diff --git a/lldb/tools/lldb-mi/MICmdCmdBreak.cpp b/lldb/tools/lldb-mi/MICmdCmdBreak.cpp index 0a4c823b696..a3dc404eacb 100644 --- a/lldb/tools/lldb-mi/MICmdCmdBreak.cpp +++ b/lldb/tools/lldb-mi/MICmdCmdBreak.cpp @@ -232,7 +232,7 @@ CMICmdCmdBreakInsert::Execute(void) 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: |