diff options
author | Vas Crabb <vas@vastheman.com> | 2021-10-18 08:22:21 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2021-10-18 08:22:21 +1100 |
commit | 40a30af10f05f6567f717e4d1004f7bae01b85a2 (patch) | |
tree | 13990300ff0940a5195192a6d76a55df58fa5c5a /src/osd | |
parent | 0a82b82684115f7d5334e65cef8c4297a50c4e19 (diff) |
Still more user experience improvements:
Changed the default mapping for UI select to not trigger on Alt+Enter
fullscreen toggle. (Fullscreen toggle still doesn't work in menus -
actually fixing that is complicated.)
frontend: Made the about box wrap text properly, made the title and
backtrack menu item always visible, and added a footer with the VCS
revision.
frontend: Don't highlight the favourites and info toolbar buttons if
there's no selection (can happen if filters produce no results). Also
made the info viewer appear even if no info is available - it's less
confusing to see an empty menu than wonder why clicking the button does
nothing.
debugger: Added a register points view to the GUI debuggers, to go with
the breakpoints and watchpoints views.
debugger: Extended [brw]p(clear|(en|dis)able) commands to accept
multiple arguments to perform the same action on multiple
(break|watch|register)points at once. Also made rplist accept a CPU for
showing a single CPU's register points ([bw]plist already support this).
docs: Updated registerpoints debugger commands page, and updated other
pages for latest extensions to syntax.
Diffstat (limited to 'src/osd')
-rw-r--r-- | src/osd/modules/debugger/osx/pointsviewer.mm | 38 | ||||
-rw-r--r-- | src/osd/modules/debugger/osx/registerpointsview.h | 23 | ||||
-rw-r--r-- | src/osd/modules/debugger/osx/registerpointsview.mm | 27 | ||||
-rw-r--r-- | src/osd/modules/debugger/qt/breakpointswindow.cpp | 24 | ||||
-rw-r--r-- | src/osd/modules/debugger/win/debugwininfo.h | 1 | ||||
-rw-r--r-- | src/osd/modules/debugger/win/pointswininfo.cpp | 15 |
6 files changed, 117 insertions, 11 deletions
diff --git a/src/osd/modules/debugger/osx/pointsviewer.mm b/src/osd/modules/debugger/osx/pointsviewer.mm index 8bd4dad3a1b..ca3d9b356a0 100644 --- a/src/osd/modules/debugger/osx/pointsviewer.mm +++ b/src/osd/modules/debugger/osx/pointsviewer.mm @@ -10,6 +10,7 @@ #import "pointsviewer.h" #import "breakpointsview.h" +#import "registerpointsview.h" #import "watchpointsview.h" #include "util/xmlfile.h" @@ -18,9 +19,9 @@ @implementation MAMEPointsViewer - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c { - MAMEDebugView *breakView, *watchView; - NSScrollView *breakScroll, *watchScroll; - NSTabViewItem *breakTab, *watchTab; + MAMEDebugView *breakView, *watchView, *registerView; + NSScrollView *breakScroll, *watchScroll, *registerScroll; + NSTabViewItem *breakTab, *watchTab, *registerTab; NSPopUpButton *actionButton; NSRect subviewFrame; @@ -44,6 +45,9 @@ [[[subviewButton menu] addItemWithTitle:@"All Watchpoints" action:NULL keyEquivalent:@""] setTag:1]; + [[[subviewButton menu] addItemWithTitle:@"All Registerpoints" + action:NULL + keyEquivalent:@""] setTag:2]; [subviewButton sizeToFit]; subviewFrame = [subviewButton frame]; subviewFrame.origin.x = subviewFrame.size.height; @@ -82,7 +86,7 @@ [breakTab setView:breakScroll]; [breakScroll release]; - // create the breakpoints view + // create the watchpoints view watchView = [[MAMEWatchpointsView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) machine:*machine]; watchScroll = [[NSScrollView alloc] initWithFrame:[breakScroll frame]]; @@ -98,6 +102,22 @@ [watchTab setView:watchScroll]; [watchScroll release]; + // create the registerpoints view + registerView = [[MAMERegisterpointsView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) + machine:*machine]; + registerScroll = [[NSScrollView alloc] initWithFrame:[breakScroll frame]]; + [registerScroll setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; + [registerScroll setHasHorizontalScroller:YES]; + [registerScroll setHasVerticalScroller:YES]; + [registerScroll setAutohidesScrollers:YES]; + [registerScroll setBorderType:NSNoBorder]; + [registerScroll setDrawsBackground:NO]; + [registerScroll setDocumentView:registerView]; + [registerView release]; + registerTab = [[NSTabViewItem alloc] initWithIdentifier:@""]; + [registerTab setView:registerScroll]; + [registerScroll release]; + // create a tabless tabview for the two subviews tabs = [[NSTabView alloc] initWithFrame:[breakScroll frame]]; [tabs setTabViewType:NSNoTabsNoBorder]; @@ -106,6 +126,8 @@ [breakTab release]; [tabs addTabViewItem:watchTab]; [watchTab release]; + [tabs addTabViewItem:registerTab]; + [registerTab release]; [[window contentView] addSubview:tabs]; [tabs release]; @@ -124,8 +146,12 @@ hasHorizontalScroller:YES hasVerticalScroller:YES borderType:[watchScroll borderType]]; - NSSize const desired = NSMakeSize(std::max(breakDesired.width, watchDesired.width), - std::max(breakDesired.height, watchDesired.height)); + NSSize const registerDesired = [NSScrollView frameSizeForContentSize:[registerView maximumFrameSize] + hasHorizontalScroller:YES + hasVerticalScroller:YES + borderType:[registerScroll borderType]]; + NSSize const desired = NSMakeSize(std::max({ breakDesired.width, watchDesired.width, registerDesired.width }), + std::max({ breakDesired.height, watchDesired.height, registerDesired.height })); [self cascadeWindowWithDesiredSize:desired forView:tabs]; // don't forget the result diff --git a/src/osd/modules/debugger/osx/registerpointsview.h b/src/osd/modules/debugger/osx/registerpointsview.h new file mode 100644 index 00000000000..58faf954416 --- /dev/null +++ b/src/osd/modules/debugger/osx/registerpointsview.h @@ -0,0 +1,23 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +//============================================================ +// +// registerpointsview.h - MacOS X Cocoa debug window handling +// +//============================================================ + +#import "debugosx.h" + +#import "debugview.h" + + +#import <Cocoa/Cocoa.h> + + +@interface MAMERegisterpointsView : MAMEDebugView +{ +} + +- (id)initWithFrame:(NSRect)f machine:(running_machine &)m; + +@end diff --git a/src/osd/modules/debugger/osx/registerpointsview.mm b/src/osd/modules/debugger/osx/registerpointsview.mm new file mode 100644 index 00000000000..a701fe733ce --- /dev/null +++ b/src/osd/modules/debugger/osx/registerpointsview.mm @@ -0,0 +1,27 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +//============================================================ +// +// registerpointsview.m - MacOS X Cocoa debug window handling +// +//============================================================ + +#import "registerpointsview.h" + +#include "debug/debugvw.h" + + +@implementation MAMERegisterpointsView + +- (id)initWithFrame:(NSRect)f machine:(running_machine &)m { + if (!(self = [super initWithFrame:f type:DVT_REGISTER_POINTS machine:m wholeLineScroll:YES])) + return nil; + return self; +} + + +- (void)dealloc { + [super dealloc]; +} + +@end diff --git a/src/osd/modules/debugger/qt/breakpointswindow.cpp b/src/osd/modules/debugger/qt/breakpointswindow.cpp index 4f581137476..6af8fe7ba36 100644 --- a/src/osd/modules/debugger/qt/breakpointswindow.cpp +++ b/src/osd/modules/debugger/qt/breakpointswindow.cpp @@ -5,8 +5,6 @@ #include "debug/debugcon.h" #include "debug/debugcpu.h" -#include "debug/dvbpoints.h" -#include "debug/dvwpoints.h" #include <QtWidgets/QActionGroup> #include <QtWidgets/QHBoxLayout> @@ -48,16 +46,25 @@ BreakpointsWindow::BreakpointsWindow(running_machine &machine, QWidget *parent) // QActionGroup *typeGroup = new QActionGroup(this); typeGroup->setObjectName("typegroup"); + QAction *typeBreak = new QAction("Breakpoints", this); typeBreak->setObjectName("typebreak"); + typeBreak->setCheckable(true); + typeBreak->setActionGroup(typeGroup); + typeBreak->setShortcut(QKeySequence("Ctrl+1")); + QAction *typeWatch = new QAction("Watchpoints", this); typeWatch->setObjectName("typewatch"); - typeBreak->setCheckable(true); typeWatch->setCheckable(true); - typeBreak->setActionGroup(typeGroup); typeWatch->setActionGroup(typeGroup); - typeBreak->setShortcut(QKeySequence("Ctrl+1")); typeWatch->setShortcut(QKeySequence("Ctrl+2")); + + QAction *typeRegister = new QAction("Registerpoints", this); + typeRegister->setObjectName("typeregister"); + typeRegister->setCheckable(true); + typeRegister->setActionGroup(typeGroup); + typeRegister->setShortcut(QKeySequence("Ctrl+3")); + typeBreak->setChecked(true); connect(typeGroup, &QActionGroup::triggered, this, &BreakpointsWindow::typeChanged); @@ -89,6 +96,11 @@ void BreakpointsWindow::typeChanged(QAction* changedTo) m_breakpointsView = new DebuggerView(DVT_WATCH_POINTS, m_machine, this); setWindowTitle("Debug: All Watchpoints"); } + else if (changedTo->text() == "Registerpoints") + { + m_breakpointsView = new DebuggerView(DVT_REGISTER_POINTS, m_machine, this); + setWindowTitle("Debug: All Registerpoints"); + } // Re-register QVBoxLayout *layout = findChild<QVBoxLayout *>("vlayout"); @@ -110,6 +122,8 @@ void BreakpointsWindowQtConfig::buildFromQWidget(QWidget *widget) m_bwType = 0; else if (typeGroup->checkedAction()->text() == "Watchpoints") m_bwType = 1; + else if (typeGroup->checkedAction()->text() == "Registerpoints") + m_bwType = 2; } diff --git a/src/osd/modules/debugger/win/debugwininfo.h b/src/osd/modules/debugger/win/debugwininfo.h index b930189fffa..80561dd2a05 100644 --- a/src/osd/modules/debugger/win/debugwininfo.h +++ b/src/osd/modules/debugger/win/debugwininfo.h @@ -97,6 +97,7 @@ protected: ID_SHOW_BREAKPOINTS, ID_SHOW_WATCHPOINTS, + ID_SHOW_REGISTERPOINTS, ID_CLEAR_LOG, diff --git a/src/osd/modules/debugger/win/pointswininfo.cpp b/src/osd/modules/debugger/win/pointswininfo.cpp index eb2ca1875e2..93926a697ae 100644 --- a/src/osd/modules/debugger/win/pointswininfo.cpp +++ b/src/osd/modules/debugger/win/pointswininfo.cpp @@ -31,6 +31,7 @@ pointswin_info::pointswin_info(debugger_windows_interface &debugger) : HMENU const optionsmenu = CreatePopupMenu(); AppendMenu(optionsmenu, MF_ENABLED, ID_SHOW_BREAKPOINTS, TEXT("Breakpoints\tCtrl+1")); AppendMenu(optionsmenu, MF_ENABLED, ID_SHOW_WATCHPOINTS, TEXT("Watchpoints\tCtrl+2")); + AppendMenu(optionsmenu, MF_ENABLED, ID_SHOW_REGISTERPOINTS, TEXT("Registerpoints\tCtrl+3")); AppendMenu(GetMenu(window()), MF_ENABLED | MF_POPUP, (UINT_PTR)optionsmenu, TEXT("Options")); // compute a client rect @@ -69,6 +70,10 @@ bool pointswin_info::handle_key(WPARAM wparam, LPARAM lparam) case '2': SendMessage(window(), WM_COMMAND, ID_SHOW_WATCHPOINTS, 0); return true; + + case '3': + SendMessage(window(), WM_COMMAND, ID_SHOW_REGISTERPOINTS, 0); + return true; } } @@ -83,6 +88,7 @@ void pointswin_info::update_menu() HMENU const menu = GetMenu(window()); CheckMenuItem(menu, ID_SHOW_BREAKPOINTS, MF_BYCOMMAND | (m_views[0]->type() == DVT_BREAK_POINTS ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(menu, ID_SHOW_WATCHPOINTS, MF_BYCOMMAND | (m_views[0]->type() == DVT_WATCH_POINTS ? MF_CHECKED : MF_UNCHECKED)); + CheckMenuItem(menu, ID_SHOW_REGISTERPOINTS, MF_BYCOMMAND | (m_views[0]->type() == DVT_REGISTER_POINTS ? MF_CHECKED : MF_UNCHECKED)); } @@ -111,6 +117,15 @@ bool pointswin_info::handle_command(WPARAM wparam, LPARAM lparam) win_set_window_text_utf8(window(), "All Watchpoints"); recompute_children(); return true; + + case ID_SHOW_REGISTERPOINTS: + m_views[0].reset(); + m_views[0].reset(new debugview_info(debugger(), *this, window(), DVT_REGISTER_POINTS)); + if (!m_views[0]->is_valid()) + m_views[0].reset(); + win_set_window_text_utf8(window(), "All Registerpoints"); + recompute_children(); + return true; } break; } |