Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 40 additions & 15 deletions src/osd/modules/debugger/debugosx.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

// TODO:
// * Automatic scrolling for console and log views
// * Using alpha for disabled foreground colours doesn't really work
// * New windows created from auxiliary windows should inherit focus rather than pointing at current CPU
// * Keyboard shortcuts in error log windows
// * Keyboard shortcuts in error log and devices windows
// * Don't accept keyboard input while the game is running
// * Interior focus rings - standard/exterior focus rings look really ugly here
// * Improve automatic window sizing - it isn't working all that well
// * Updates causing debug views' widths to change are sometimes obscured by the scroll views' opaque backgrounds
// * Scroll views with content narrower than clipping area are flaky under Tiger - nothing I can do about this


Expand All @@ -30,8 +30,8 @@
#include "osdsdl.h"
#include "debug_module.h"

#import "osx/debugosxdebugconsole.h"
#import "osx/debugosxdebugwindowhandler.h"
#import "osx/debugconsole.h"
#import "osx/debugwindowhandler.h"


//============================================================
Expand All @@ -54,14 +54,8 @@
[m_console release];
}

virtual int init()
{
return 0;
}

virtual void exit()
{
}
virtual int init();
virtual void exit();

virtual void init_debugger(running_machine &machine);
virtual void wait_for_debugger(device_t &device, bool firststop);
Expand All @@ -74,13 +68,41 @@ virtual void exit()

MODULE_DEFINITION(DEBUG_OSX, debugger_osx)

//============================================================
// debugger_osx::init
//============================================================

int debugger_osx::init()
{
return 0;
}

//============================================================
// debugger_osx::exit
//============================================================

void debugger_osx::exit()
{
if (m_console)
{
NSDictionary *info = [NSDictionary dictionaryWithObject:[NSValue valueWithPointer:m_machine]
forKey:@"MAMEDebugMachine"];
[[NSNotificationCenter defaultCenter] postNotificationName:MAMEHideDebuggerNotification
object:m_console
userInfo:info];
[m_console release];
m_console = nil;
m_machine = NULL;
}
}

//============================================================
// debugger_osx::init_debugger
//============================================================

void debugger_osx::init_debugger(running_machine &machine)
{
m_machine = &machine;
m_machine = &machine;
}

//============================================================
Expand All @@ -94,9 +116,12 @@ virtual void exit()
m_console = [[MAMEDebugConsole alloc] initWithMachine:*m_machine];

// make sure the debug windows are visible
if (firststop) {
if (firststop)
{
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:[NSValue valueWithPointer:&device],
@"MAMEDebugDevice",
[NSValue valueWithPointer:m_machine],
@"MAMEDebugMachine",
nil];
[[NSNotificationCenter defaultCenter] postNotificationName:MAMEShowDebuggerNotification
object:m_console
Expand Down
14 changes: 7 additions & 7 deletions src/osd/modules/debugger/debugqt.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
#include "debugger.h"
#include "modules/lib/osdobj_common.h"

#include "qt/debugqtlogwindow.h"
#include "qt/debugqtmainwindow.h"
#include "qt/debugqtdasmwindow.h"
#include "qt/debugqtmemorywindow.h"
#include "qt/debugqtbreakpointswindow.h"
#include "qt/debugqtdeviceswindow.h"
#include "qt/debugqtdeviceinformationwindow.h"
#include "qt/logwindow.h"
#include "qt/mainwindow.h"
#include "qt/dasmwindow.h"
#include "qt/memorywindow.h"
#include "qt/breakpointswindow.h"
#include "qt/deviceswindow.h"
#include "qt/deviceinformationwindow.h"

class debug_qt : public osd_module, public debug_module
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxbreakpointsview.h - MacOS X Cocoa debug window handling
// breakpointsview.h - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
//============================================================

#import "debugosx.h"
#import "debugosxdebugview.h"

#import "debugview.h"

#include "emu.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxbreakpointsview.m - MacOS X Cocoa debug window handling
// breakpointsview.m - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
//============================================================

#import "debugosxbreakpointsview.h"
#import "breakpointsview.h"

#include "debug/debugvw.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxconsoleview.h - MacOS X Cocoa debug window handling
// consoleview.h - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
//============================================================

#import "debugosx.h"
#import "debugosxdebugview.h"

#import "debugview.h"

#include "emu.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxconsoleview.m - MacOS X Cocoa debug window handling
// consoleview.m - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
//============================================================

#import "debugosxconsoleview.h"
#import "consoleview.h"

#include "debug/debugvw.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxdebugcommandhistory.h - MacOS X Cocoa debug window handling
// debugcommandhistory.h - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxdebugcommandhistory.m - MacOS X Cocoa debug window handling
// debugcommandhistory.m - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
Expand All @@ -13,7 +13,7 @@
// MAMEDebugView class
//============================================================

#import "debugosxdebugcommandhistory.h"
#import "debugcommandhistory.h"


@implementation MAMEDebugCommandHistory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
// copyright-holders:Vas Crabb
//============================================================
//
// debugosxdebugconsole.h - MacOS X Cocoa debug window handling
// debugconsole.h - MacOS X Cocoa debug window handling
//
// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
//============================================================

#import "debugosx.h"
#import "debugosxdebugwindowhandler.h"

#import "debugwindowhandler.h"

#include "emu.h"

Expand Down Expand Up @@ -40,6 +41,10 @@
- (IBAction)debugNewDisassemblyWindow:(id)sender;
- (IBAction)debugNewErrorLogWindow:(id)sender;
- (IBAction)debugNewPointsWindow:(id)sender;
- (IBAction)debugNewDevicesWindow:(id)sender;

- (void)debugNewMemoryWindowForSpace:(address_space *)space device:(device_t *)device expression:(NSString *)expression;
- (void)debugNewDisassemblyWindowForSpace:(address_space *)space device:(device_t *)device expression:(NSString *)expression;

- (void)showDebugger:(NSNotification *)notification;
- (void)auxiliaryWindowWillClose:(NSNotification *)notification;
Expand Down
Loading