Skip to content

Commit

Permalink
Merge pull request #9456 from trevor403/breakpoint-loading
Browse files Browse the repository at this point in the history
Breakpoint from string flag parsing using token
  • Loading branch information
leoetlino authored Jan 27, 2021
2 parents 4ba9bb2 + 59058ba commit b886c70
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Source/Core/Core/PowerPC/BreakPoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ void BreakPoints::AddFromStrings(const TBreakPointsStr& bp_strings)
for (const std::string& bp_string : bp_strings)
{
TBreakPoint bp;
std::stringstream ss;
ss << std::hex << bp_string;
ss >> bp.address;
bp.is_enabled = bp_string.find('n') != bp_string.npos;
bp.log_on_hit = bp_string.find('l') != bp_string.npos;
bp.break_on_hit = bp_string.find('b') != bp_string.npos;
std::string flags;
std::istringstream iss(bp_string);
iss >> std::hex >> bp.address;
iss >> flags;
bp.is_enabled = flags.find('n') != flags.npos;
bp.log_on_hit = flags.find('l') != flags.npos;
bp.break_on_hit = flags.find('b') != flags.npos;
bp.is_temporary = false;
Add(bp);
}
Expand Down

0 comments on commit b886c70

Please sign in to comment.