This is an archive of the discontinued LLVM Phabricator instance.

[lldb][gui] Update TreeItem children's m_parent on move
ClosedPublic

Authored by kpdev42 on Aug 15 2023, 3:34 AM.

Details

Summary

Before this patch, any time TreeItem is copied in Resize method, its
parent is not updated, which can cause crashes when, for example, thread
window with multiple hierarchy levels is updated. Makes TreeItem
move-only, removes TreeItem's m_delegate extra self-assignment by making
it a pointer, adds code to fix up children's parent on move constructor
and operator=

~~~

Huawei RRI, OS Lab

Diff Detail

Event Timeline

kpdev42 created this revision.Aug 15 2023, 3:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2023, 3:34 AM
kpdev42 requested review of this revision.Aug 15 2023, 3:34 AM
clayborg accepted this revision.Aug 15 2023, 3:04 PM
clayborg added inline comments.
lldb/test/API/commands/gui/spawn-threads/TestGuiSpawnThreads.py
39
This revision is now accepted and ready to land.Aug 15 2023, 3:04 PM
This revision was automatically updated to reflect the committed changes.
kpdev42 marked an inline comment as done.Aug 16 2023, 3:13 AM