[all-commits] [llvm/llvm-project] 27893f: Call WatchpointList::RemoveAll in Target::Destroy.
jimingham via All-commits
all-commits at lists.llvm.org
Wed Jul 27 15:15:22 PDT 2022
Author: Jim Ingham <jingham at apple.com>
Date: 2022-07-27 (Wed, 27 Jul 2022)
Call WatchpointList::RemoveAll in Target::Destroy.
I noticed that the test TestSetWatchpoint.py was failing every so often
on macOS. The failure was in the last assert, that after destroying the
SBTarget containing it, the SBWatchpoint was still saying it was valid.
IsValid in this case just meant the watchpoint weak pointer could be turned
into a shared pointer. The watchpoint shared pointers have two strong references
in general, one to the "Target::m_last_created_watchpoint", and one in the
Target::m_watchpoint_list. Target::Destroy reset the last created watchpoint
but neglected to call RemoveAll on the watchpoint list (it does the analogous
work for the internal & external breakpoint lists...) This patch does the
equivalent cleanup for the watchpoint list.
More information about the All-commits