[Lldb-commits] [lldb] r156994 - /lldb/trunk/source/Host/common/Host.cpp
Filipe Cabecinhas
filcab at filcab.net
Fri May 18 10:31:08 PDT 2012
But how would that avoid using the cached dummy target after it's destroyed?
The problem is this: (lldbtest.py:TestBase.tearDown()):
# Delete the target(s) from the debugger as a general cleanup step.
# This includes terminating the process for each target, if any.
# We'd like to reuse the debugger for our next test without incurring
# the initialization overhead.
targets = []
for target in self.dbg:
if target:
targets.append(target)
process = target.GetProcess()
if process:
rc = self.invoke(process, "Kill")
self.assertTrue(rc.Success(), PROCESS_KILLED)
for target in targets:
self.dbg.DeleteTarget(target)
What we can do is:
Restore the method as it was before, but add a check for g_dummy_target_sp->IsValid()
Implement the Target::IsValid() method that would, for example, check a m_valid boolean that would be set to false on Destroy().
What do you think?
Regards,
Filipe
On Friday, May 18, 2012 at 6:11 PM, Greg Clayton wrote:
>
More information about the lldb-commits
mailing list