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

Ilia K ki.stfu at gmail.com
Thu Jan 29 15:12:47 PST 2015


This patch fixes *stopped notification for remote target when started with eLaunchFlagStopAtEntry (for example, using "process launch -s").

See explanation below:
```
Target::Launch (ProcessLaunchInfo &launch_info, Stream *stream)
{
...
if (state != eStateConnected && platform_sp && platform_sp->CanDebugProcess ())
{
   ...
}
else
{
   ...
   if (m_process_sp)
      error = m_process_sp->Launch (launch_info);
}

if (error.Success())
{
    if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
    {
        ....
    }
    -- missing event if eLaunchFlagStopAtEntry is set --
    m_process_sp->RestoreProcessEvents ();
}
...
return error
```

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7273

Files:
  source/Target/Process.cpp

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)
+                            m_private_state_broadcaster.BroadcastEvent(event_sp);
                     }
                     else if (state == eStateExited)
                     {

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


More information about the lldb-commits mailing list