Fixes the crash occurring when target.process.thread.trace-thread is enabled.
The cause of the crash was the call of a virtual method during object construction, as shown below:
virtual Process.UpdateThreadList()
└── ProcessGDBRemote.UpdateThreadList()
└── new ThreadGDBRemote()
└── new Thread()
└── new ThreadPlanBase()
├── new ThreadPlanAssemblyTracer()
└── virtual ThreadPlanAssemblyTracer::EnableTracing()
└── virtual ThreadPlanTracer::TracingStarted()
└── virtual Thread::GetRegisterContext() ← Virtual method call of Thread under construction!
└── __cxa_pure_virtual()This patch also contains an attempt to make the tracing API a bit better and more clear.
Generated against llvm-8.0.0 git tag (commit SHA: d2298e74235598f15594fe2c99bbac870a507c59).