diff options
author | 2016-03-12 12:31:13 +0100 | |
---|---|---|
committer | 2016-03-12 12:31:13 +0100 | |
commit | a026a582f1a0ea8c1ede3acaddacef506ef3f3b0 (patch) | |
tree | e31573822f2359677de519f9f3b600d98e8764cd /src/osd/modules/debugger/osx/debugwindowhandler.mm | |
parent | 477d2abd43984f076b7e45f5527591fa8fd0d241 (diff) | |
parent | dcab55bf53b94713a6f72e9633f5101c8dd6c08c (diff) |
Merge pull request #15 from mamedev/master
Sync to base master
Diffstat (limited to 'src/osd/modules/debugger/osx/debugwindowhandler.mm')
-rw-r--r-- | src/osd/modules/debugger/osx/debugwindowhandler.mm | 15 |
1 files changed, 14 insertions, 1 deletions
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(); } |