[Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run
Ilia K via lldb-commits
lldb-commits at lists.llvm.org
Sat Sep 26 03:32:12 PDT 2015
ki.stfu requested changes to this revision.
ki.stfu added a comment.
This revision now requires changes to proceed.
Update the summary + a few inline comments below.
================
Comment at: test/tools/lldb-mi/startup_options/TestMiStartupOptions.py:13-31
@@ -12,3 +12,21 @@
@lldbmi_test
@skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
+ @skipIfFreeBSD # Failure presumably due to StopAtEntry most likely not implemented
+ def test_lldbmi_gdb_set_process_stopatentry_on(self):
+ """Test that 'lldb-mi --interpreter' can stop at entry."""
+
+ self.spawnLldbMi(args = None)
+
+ # Load executable
+ self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+ self.expect("\^done")
+
+ # Test that program is stopped at entry
+ self.runCmd("-exec-run --start")
+ self.expect("\^running")
+ self.expect("\*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",.*thread-id=\"1\",stopped-threads=\"all\"")
+
+ # Test that lldb-mi is ready to execute next commands
+ self.expect(self.child_prompt, exactly = True)
+
----------------
And move this test case to test/tools/lldb-mi/control/TestMiExec.py
================
Comment at: test/tools/lldb-mi/startup_options/TestMiStartupOptions.py:16
@@ +15,3 @@
+ @skipIfFreeBSD # Failure presumably due to StopAtEntry most likely not implemented
+ def test_lldbmi_gdb_set_process_stopatentry_on(self):
+ """Test that 'lldb-mi --interpreter' can stop at entry."""
----------------
Rename it to
```
def test_lldbmi_exec_run(self):
```
================
Comment at: test/tools/lldb-mi/startup_options/TestMiStartupOptions.py:28
@@ +27,3 @@
+ self.expect("\^running")
+ self.expect("\*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",.*thread-id=\"1\",stopped-threads=\"all\"")
+
----------------
Use lazy regex please:
```
self.expect("\*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",.*?thread-id=\"1\",stopped-threads=\"all\"")
```
================
Comment at: tools/lldb-mi/MICmdCmdExec.h:58
@@ -57,2 +57,3 @@
bool Acknowledge() override;
+ bool ParseArgs() override;
// From CMICmnBase
----------------
Please move it on few lines above for consistency with others:
```
bool ParseArgs() override;
bool Execute() override;
[...]
```
Repository:
rL LLVM
http://reviews.llvm.org/D12977
More information about the lldb-commits
mailing list