summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/osx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-03-12 12:31:13 +0100
committer ImJezze <jezze@gmx.net>2016-03-12 12:31:13 +0100
commita026a582f1a0ea8c1ede3acaddacef506ef3f3b0 (patch)
treee31573822f2359677de519f9f3b600d98e8764cd /src/osd/modules/debugger/osx
parent477d2abd43984f076b7e45f5527591fa8fd0d241 (diff)
parentdcab55bf53b94713a6f72e9633f5101c8dd6c08c (diff)
Merge pull request #15 from mamedev/master
Sync to base master
Diffstat (limited to 'src/osd/modules/debugger/osx')
-rw-r--r--src/osd/modules/debugger/osx/debugview.mm2
-rw-r--r--src/osd/modules/debugger/osx/debugwindowhandler.h1
-rw-r--r--src/osd/modules/debugger/osx/debugwindowhandler.mm15
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();
}