[Lldb-commits] [PATCH] Fix a missing "*stopped" notification in LLDB-MI after "process launch -s" in case of remote-macosx

Ilia K ki.stfu at gmail.com
Thu Feb 5 10:48:24 PST 2015


Update patch:

- Enable test_lldbmi_stopped_when_stopatentry_local test
- Fix and enable test_lldbmi_stopped_when_stopatentry_remote test

Patch ready for submitting. All tests pass on OS X.

@abidh, Can you check these tests on Linux, please?


http://reviews.llvm.org/D7273

Files:
  source/Target/Process.cpp
  test/tools/lldb-mi/TestMiNotification.py

Index: source/Target/Process.cpp
===================================================================
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -3121,6 +3121,11 @@
                             StartPrivateStateThread ();
 
                         m_stop_info_override_callback = GetTarget().GetArchitecture().GetStopInfoOverrideCallback();
+
+                        // Target was stopped at entry as was intended. Need to notify the listeners
+                        // about it.
+                        if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == true)
+                            HandlePrivateEvent(event_sp);
                     }
                     else if (state == eStateExited)
                     {
Index: test/tools/lldb-mi/TestMiNotification.py
===================================================================
--- test/tools/lldb-mi/TestMiNotification.py
+++ test/tools/lldb-mi/TestMiNotification.py
@@ -49,7 +49,6 @@
 
     @lldbmi_test
     @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
-    @unittest2.skip("reviews.llvm.org/D7273: requires this patch")
     def test_lldbmi_stopped_when_stopatentry_local(self):
         """Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (local)."""
 
@@ -64,11 +63,10 @@
         self.expect("\^done")
 
         # Test that *stopped is printed
-        self.expect("\*stopped,reason=\"signal-received\",signal=\"17\",thread-id=\"1\",stopped-threads=\"all\"")
+        self.expect("\*stopped,reason=\"signal-received\",signal=\"17\",stopped-threads=\"all\"")
 
     @lldbmi_test
     @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
-    @unittest2.skip("reviews.llvm.org/D7273: requires this patch")
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     def test_lldbmi_stopped_when_stopatentry_remote(self):
         """Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (remote)."""
@@ -103,7 +101,12 @@
             self.expect("\^done")
 
             # Test that *stopped is printed
-            self.expect("\*stopped,reason=\"signal-received\",signal=\"17\",thread-id=\"1\",stopped-threads=\"all\"")
+            self.expect("\*stopped,reason=\"signal-received\",signal=\"17\",stopped-threads=\"all\"")
+
+            # Exit
+            self.runCmd("-gdb-exit")
+            self.runCmd("") #FIXME lldb-mi hangs here on Linux; extra return is needed
+            self.expect("\^exit")
 
         finally:
             # Clean up

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7273.19419.patch
Type: text/x-patch
Size: 2586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150205/81ac4647/attachment.bin>


More information about the lldb-commits mailing list