From 8f21b175209ccd6c576e7d379e35ecb2debed123 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 25 Jul 2015 17:16:27 -0400 Subject: [PATCH] Debugger: Add more helpers to Team. ClearImages(): - Removes all existing images from the team's image list and notifies callers. To be used in case of an exec(). ClearSignalDispositionMappings(): - Remove any existing custom signal disposition mappings. This is intended to be used in preparation for loading new ones from a team after exec() is called. --- src/apps/debugger/model/Team.cpp | 15 +++++++++++++++ src/apps/debugger/model/Team.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/apps/debugger/model/Team.cpp b/src/apps/debugger/model/Team.cpp index b22477872e..58c60a7123 100644 --- a/src/apps/debugger/model/Team.cpp +++ b/src/apps/debugger/model/Team.cpp @@ -277,6 +277,14 @@ Team::Images() const } +void +Team::ClearImages() +{ + while (!fImages.IsEmpty()) + RemoveImage(fImages.First()); +} + + bool Team::AddStopImageName(const BString& name) { @@ -377,6 +385,13 @@ Team::GetSignalDispositionMappings() const } +void +Team::ClearSignalDispositionMappings() +{ + fCustomSignalDispositions.clear(); +} + + bool Team::AddBreakpoint(Breakpoint* breakpoint) { diff --git a/src/apps/debugger/model/Team.h b/src/apps/debugger/model/Team.h index 9891172093..d2620e9647 100644 --- a/src/apps/debugger/model/Team.h +++ b/src/apps/debugger/model/Team.h @@ -137,6 +137,7 @@ public: Image* ImageByID(image_id imageID) const; Image* ImageByAddress(target_addr_t address) const; const ImageList& Images() const; + void ClearImages(); bool AddStopImageName(const BString& name); void RemoveStopImageName(const BString& name); @@ -161,6 +162,8 @@ public: const SignalDispositionMappings& GetSignalDispositionMappings() const; + void ClearSignalDispositionMappings(); + bool AddBreakpoint(Breakpoint* breakpoint); // takes over reference (also on error) void RemoveBreakpoint(Breakpoint* breakpoint);