<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thank you very much for your replies! <div class=""><br class=""></div><div class="">I took a look at <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">ThreadPlanTracer</span></font> and found out that the crash reason was the call of a virtual method during object construction:</div><div class=""><br class=""></div><div class=""><div class=""><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">virtual Process.UpdateThreadList()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">└── ProcessGDBRemote.UpdateThreadList()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> └── new ThreadGDBRemote()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> └── new Thread()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> └── new ThreadPlanBase()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> ├── new ThreadPlanAssemblyTracer()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> └── virtual ThreadPlanAssemblyTracer::EnableTracing()</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> └── virtual ThreadPlanTracer::TracingStarted()</span></font></div><div class=""><font face="FiraCode-Regular" style="font-style: normal;" class=""> └── virtual Thread::GetRegisterContext() </font><b class=""><font face="SFProText-Regular" style="font-style: normal;" class="">← Virtual method call of </font><font face="FiraCode-Regular" style="font-style: normal;" class="">Thread</font><font face="SFProText-Regular" style="font-style: normal;" class=""> under construction!</font></b></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class=""> └── __cxa_pure_virtual()</span></font></div></div><div class=""><br class=""></div><div class="">I believe I fixed the bug and also tried to make the tracing API a little better.</div><div class=""><br class=""></div><div class="">In order to correct the logic, I had to add a call to <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">Thread::GetTraceEnabledState()</span></font> (somewhat expensive) in <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">Thread::ShouldStop()</span></font>, which looks like a hot path and thus I was a bit hesitant about it. Ideally, changing a setting (here: <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">target.process.thread.trace-thread</span></font>) should trigger a callback, however I couldn’t find any such mechanism ―does it exist?</div><div class=""><br class=""></div><div class="">You may find the relevant patch attached. It was generated against <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">llvm-8.0.0</span></font> git tag (commit SHA: <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">d2298e74235598f15594fe2c99bbac870a507c59</span></font>).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">― Vangelis</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">P.S.:</b> How can I submit this patch for review?</div><div class=""><br class=""></div><div class=""></div></div></body></html>