diff options
Diffstat (limited to 'src/osd/modules/debugger/osx')
-rw-r--r-- | src/osd/modules/debugger/osx/debugview.mm | 2 | ||||
-rw-r--r-- | src/osd/modules/debugger/osx/debugwindowhandler.h | 1 | ||||
-rw-r--r-- | src/osd/modules/debugger/osx/debugwindowhandler.mm | 15 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/osd/modules/debugger/osx/debugview.mm b/src/osd/modules/debugger/osx/debugview.mm index e793c649d9e..05d2e2dfc17 100644 --- a/src/osd/modules/debugger/osx/debugview.mm +++ b/src/osd/modules/debugger/osx/debugview.mm @@ -63,7 +63,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate) InactiveSelectedBackground = [[NSColor colorWithCalibratedWhite:0.875 alpha:1.0] retain]; InactiveSelectedCurrentBackground = [[NSColor colorWithCalibratedRed:0.875 green:0.5 blue:0.625 alpha:1.0] retain]; - NonWhiteCharacters = [[NSCharacterSet whitespaceAndNewlineCharacterSet] invertedSet]; + NonWhiteCharacters = [[[NSCharacterSet whitespaceAndNewlineCharacterSet] invertedSet] retain]; } diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.h b/src/osd/modules/debugger/osx/debugwindowhandler.h index e8d2d6eb08d..0fc40d9eb64 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.h +++ b/src/osd/modules/debugger/osx/debugwindowhandler.h @@ -38,6 +38,7 @@ extern NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification; - (void)activate; +- (IBAction)debugBreak:(id)sender; - (IBAction)debugRun:(id)sender; - (IBAction)debugRunAndHide:(id)sender; - (IBAction)debugRunToNextCPU:(id)sender; diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.mm b/src/osd/modules/debugger/osx/debugwindowhandler.mm index d99a9ec9961..fd11fa89152 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.mm +++ b/src/osd/modules/debugger/osx/debugwindowhandler.mm @@ -29,6 +29,10 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD @implementation MAMEDebugWindowHandler + (void)addCommonActionItems:(NSMenu *)menu { + [menu addItemWithTitle:@"Break" + action:@selector(debugBreak:) + keyEquivalent:@""]; + NSMenuItem *runParentItem = [menu addItemWithTitle:@"Run" action:@selector(debugRun:) keyEquivalent:[NSString stringWithFormat:@"%C", (short)NSF5FunctionKey]]; @@ -181,13 +185,22 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD } +- (IBAction)debugBreak:(id)sender { + if (machine->debug_flags & DEBUG_FLAG_ENABLED) + debug_cpu_get_visible_cpu(*machine)->debug()->halt_on_next_instruction("User-initiated break\n"); +} + + - (IBAction)debugRun:(id)sender { debug_cpu_get_visible_cpu(*machine)->debug()->go(); } - (IBAction)debugRunAndHide:(id)sender { - [[NSNotificationCenter defaultCenter] postNotificationName:MAMEHideDebuggerNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:MAMEHideDebuggerNotification + object:self + userInfo:[NSDictionary dictionaryWithObject:[NSValue valueWithPointer:machine] + forKey:@"MAMEDebugMachine"]]; debug_cpu_get_visible_cpu(*machine)->debug()->go(); } |