[Lldb-commits] [PATCH] D50912: Don't cancel the current IOHandler when we push a handler for an utility function run.

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 21 15:01:53 PDT 2018


teemperor added inline comments.


================
Comment at: include/lldb/Target/Process.h:435
+  bool IsRunningUtilityFunction() const {
+    return m_last_natural_stop_id != m_stop_id;
+  }
----------------
@jingham That might be wrong, but I'm not sure what exactly each member variable is tracking.

For reference, those are the values in the two different situations:
When running from the utility function:
```
  (lldb_private::ProcessModID) $0 = {
  m_stop_id = 15
  m_last_natural_stop_id = 15
  m_resume_id = 15
  m_memory_id = 12
  m_last_user_expression_resume = 15
  m_running_user_expression = 1
  m_last_natural_stop_event = std::__1::shared_ptr<lldb_private::Event>::element_type @ 0x00007fc9afd5c790 strong=1 weak=1 {                                                                              
    __ptr_ = 0x00007fc9afd5c790
  }
```

When running an user expression:
```
  (lldb_private::ProcessModID) $0 = {
  m_stop_id = 16
  m_last_natural_stop_id = 15
  m_resume_id = 16
  m_memory_id = 31
  m_last_user_expression_resume = 16
  m_running_user_expression = 1
  m_last_natural_stop_event = std::__1::shared_ptr<lldb_private::Event>::element_type @ 0x00007ff93576a850 strong=1 weak=1 {                                                                              
    __ptr_ = 0x00007ff93576a850
  }
  }
```


https://reviews.llvm.org/D50912





More information about the lldb-commits mailing list