mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-16 23:43:13 +00:00
Merge pull request #9456 from trevor403/breakpoint-loading
Breakpoint from string flag parsing using token
This commit is contained in:
commit
b886c70a43
@ -65,12 +65,13 @@ void BreakPoints::AddFromStrings(const TBreakPointsStr& bp_strings)
|
|||||||
for (const std::string& bp_string : bp_strings)
|
for (const std::string& bp_string : bp_strings)
|
||||||
{
|
{
|
||||||
TBreakPoint bp;
|
TBreakPoint bp;
|
||||||
std::stringstream ss;
|
std::string flags;
|
||||||
ss << std::hex << bp_string;
|
std::istringstream iss(bp_string);
|
||||||
ss >> bp.address;
|
iss >> std::hex >> bp.address;
|
||||||
bp.is_enabled = bp_string.find('n') != bp_string.npos;
|
iss >> flags;
|
||||||
bp.log_on_hit = bp_string.find('l') != bp_string.npos;
|
bp.is_enabled = flags.find('n') != flags.npos;
|
||||||
bp.break_on_hit = bp_string.find('b') != bp_string.npos;
|
bp.log_on_hit = flags.find('l') != flags.npos;
|
||||||
|
bp.break_on_hit = flags.find('b') != flags.npos;
|
||||||
bp.is_temporary = false;
|
bp.is_temporary = false;
|
||||||
Add(bp);
|
Add(bp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user