mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 07:22:41 +00:00
SCI: Fix wildcard selector breakpoints
0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7 in 2011 broke selector breakpoints of the type "ObjName::", which previously caught all selector sends of the named object. Thanks to TMM and snover for noticing.
This commit is contained in:
parent
61f07c13d3
commit
3554875c7a
@ -681,11 +681,14 @@ void Kernel::dissectScript(int scriptNumber, Vocabulary *vocab) {
|
||||
|
||||
bool SciEngine::checkSelectorBreakpoint(BreakpointType breakpointType, reg_t send_obj, int selector) {
|
||||
Common::String methodName = _gamestate->_segMan->getObjectName(send_obj);
|
||||
methodName += ("::" + getKernel()->getSelectorName(selector));
|
||||
methodName += "::" + getKernel()->getSelectorName(selector);
|
||||
|
||||
Common::List<Breakpoint>::const_iterator bpIter;
|
||||
for (bpIter = _debugState._breakpoints.begin(); bpIter != _debugState._breakpoints.end(); ++bpIter) {
|
||||
if ((*bpIter).type == breakpointType && (*bpIter).name == methodName) {
|
||||
if (bpIter->type != breakpointType)
|
||||
continue;
|
||||
if (bpIter->name == methodName ||
|
||||
(bpIter->name.hasSuffix("::") && methodName.hasPrefix(bpIter->name))) {
|
||||
_console->debugPrintf("Break on %s (in [%04x:%04x])\n", methodName.c_str(), PRINT_REG(send_obj));
|
||||
_debugState.debugging = true;
|
||||
_debugState.breakpointWasHit = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user