summaryrefslogtreecommitdiffstats
path: root/src/osd/modules/debugger/qt/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/debugger/qt/mainwindow.cpp')
-rw-r--r--src/osd/modules/debugger/qt/mainwindow.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/osd/modules/debugger/qt/mainwindow.cpp b/src/osd/modules/debugger/qt/mainwindow.cpp
index e366ba77247..4020578635d 100644
--- a/src/osd/modules/debugger/qt/mainwindow.cpp
+++ b/src/osd/modules/debugger/qt/mainwindow.cpp
@@ -213,7 +213,7 @@ bool MainWindow::eventFilter(QObject* obj, QEvent* event)
void MainWindow::toggleBreakpointAtCursor(bool changedTo)
{
debug_view_disasm *const dasmView = downcast<debug_view_disasm*>(m_dasmFrame->view()->view());
- if (dasmView->cursor_visible() && (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()))
+ if (dasmView->cursor_visible() && (m_machine->debugger().cpu().get_visible_cpu() == dasmView->source()->device()))
{
offs_t const address = downcast<debug_view_disasm *>(dasmView)->selected_address();
device_debug *const cpuinfo = dasmView->source()->device()->debug();
@@ -241,7 +241,7 @@ void MainWindow::toggleBreakpointAtCursor(bool changedTo)
{
command = string_format("bpclear 0x%X", bpindex);
}
- debug_console_execute_command(*m_machine, command.c_str(), 1);
+ m_machine->debugger().console().execute_command(command.c_str(), true);
}
refreshAll();
@@ -251,7 +251,7 @@ void MainWindow::toggleBreakpointAtCursor(bool changedTo)
void MainWindow::enableBreakpointAtCursor(bool changedTo)
{
debug_view_disasm *const dasmView = downcast<debug_view_disasm*>(m_dasmFrame->view()->view());
- if (dasmView->cursor_visible() && (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()))
+ if (dasmView->cursor_visible() && (m_machine->debugger().cpu().get_visible_cpu() == dasmView->source()->device()))
{
offs_t const address = dasmView->selected_address();
device_debug *const cpuinfo = dasmView->source()->device()->debug();
@@ -265,7 +265,7 @@ void MainWindow::enableBreakpointAtCursor(bool changedTo)
{
INT32 const bpindex = bp->index();
std::string command = string_format(bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", bpindex);
- debug_console_execute_command(*m_machine, command.c_str(), 1);
+ m_machine->debugger().console().execute_command(command.c_str(), true);
}
}
@@ -276,11 +276,11 @@ void MainWindow::enableBreakpointAtCursor(bool changedTo)
void MainWindow::runToCursor(bool changedTo)
{
debug_view_disasm* dasmView = downcast<debug_view_disasm*>(m_dasmFrame->view()->view());
- if (dasmView->cursor_visible() && (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()))
+ if (dasmView->cursor_visible() && (m_machine->debugger().cpu().get_visible_cpu() == dasmView->source()->device()))
{
offs_t address = downcast<debug_view_disasm*>(dasmView)->selected_address();
std::string command = string_format("go 0x%X", address);
- debug_console_execute_command(*m_machine, command.c_str(), 1);
+ m_machine->debugger().console().execute_command(command.c_str(), true);
}
}
@@ -315,14 +315,12 @@ void MainWindow::executeCommand(bool withClear)
// A blank command is a "silent step"
if (command == "")
{
- debug_cpu_get_visible_cpu(*m_machine)->debug()->single_step();
+ m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step();
return;
}
// Send along the command
- debug_console_execute_command(*m_machine,
- command.toLocal8Bit().data(),
- true);
+ m_machine->debugger().console().execute_command(command.toLocal8Bit().data(), true);
// Add history & set the index to be the top of the stack
addToHistory(command);
@@ -348,7 +346,7 @@ void MainWindow::mountImage(bool changedTo)
device_image_interface *img = iter.byindex(imageIndex);
if (img == nullptr)
{
- debug_console_printf(*m_machine, "Something is wrong with the mount menu.\n");
+ m_machine->debugger().console().printf("Something is wrong with the mount menu.\n");
refreshAll();
return;
}
@@ -361,7 +359,7 @@ void MainWindow::mountImage(bool changedTo)
if (img->load(filename.toUtf8().data()) != IMAGE_INIT_PASS)
{
- debug_console_printf(*m_machine, "Image could not be mounted.\n");
+ m_machine->debugger().console().printf("Image could not be mounted.\n");
refreshAll();
return;
}
@@ -377,7 +375,7 @@ void MainWindow::mountImage(bool changedTo)
const QString newTitle = baseString + QString(" : ") + QString(img->filename());
parentMenuItem->setTitle(newTitle);
- debug_console_printf(*m_machine, "Image %s mounted successfully.\n", filename.toUtf8().data());
+ m_machine->debugger().console().printf("Image %s mounted successfully.\n", filename.toUtf8().data());
refreshAll();
}
@@ -401,7 +399,7 @@ void MainWindow::unmountImage(bool changedTo)
const QString newTitle = baseString + QString(" : ") + QString("[empty slot]");
parentMenuItem->setTitle(newTitle);
- debug_console_printf(*m_machine, "Image successfully unmounted.\n");
+ m_machine->debugger().console().printf("Image successfully unmounted.\n");
refreshAll();
}
@@ -409,7 +407,7 @@ void MainWindow::unmountImage(bool changedTo)
void MainWindow::dasmViewUpdated()
{
debug_view_disasm *const dasmView = downcast<debug_view_disasm*>(m_dasmFrame->view()->view());
- bool const haveCursor = dasmView->cursor_visible() && (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device());
+ bool const haveCursor = dasmView->cursor_visible() && (m_machine->debugger().cpu().get_visible_cpu() == dasmView->source()->device());
bool haveBreakpoint = false;
bool breakpointEnabled = false;
if (haveCursor)