Skip to content

Commit

Permalink
Debugger: Add more helpers to Team.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anevilyak committed Jul 26, 2015
1 parent 209cd3d commit 8f21b17
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/apps/debugger/model/Team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ Team::Images() const
}


void
Team::ClearImages()
{
while (!fImages.IsEmpty())
RemoveImage(fImages.First());
}


bool
Team::AddStopImageName(const BString& name)
{
Expand Down Expand Up @@ -377,6 +385,13 @@ Team::GetSignalDispositionMappings() const
}


void
Team::ClearSignalDispositionMappings()
{
fCustomSignalDispositions.clear();
}


bool
Team::AddBreakpoint(Breakpoint* breakpoint)
{
Expand Down
3 changes: 3 additions & 0 deletions src/apps/debugger/model/Team.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class Team {
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);
Expand All @@ -161,6 +162,8 @@ class Team {
const SignalDispositionMappings&
GetSignalDispositionMappings() const;

void ClearSignalDispositionMappings();

bool AddBreakpoint(Breakpoint* breakpoint);
// takes over reference (also on error)
void RemoveBreakpoint(Breakpoint* breakpoint);
Expand Down

0 comments on commit 8f21b17

Please sign in to comment.