summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/debugimgui.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-05-25 11:15:39 -0400
committer AJR <ajrhacker@users.noreply.github.com>2020-05-25 11:15:39 -0400
commit0fa6e7eb86d3b247c46f840ef230c9331f3cc948 (patch)
treee01509e44adcff62a7d8e087c58572fce6b90e13 /src/osd/modules/debugger/debugimgui.cpp
parentad7a31ad57b09e1e0e9bb1adb03767f9dd386605 (diff)
Debugger expression and memory access overhaul
- Memory references in expressions no longer default to the console's visible CPU if no device name was specified, except when entered through the console itself. Expressions in view windows now use the context of the currently selected device instead. - The pcatmem debug command and similar qt mouseover function now produce an error message if the initial address translation fails. Related internal changes (nw) - The debugger_cpu class no longer interprets memory accesses. The existing routines have been moved into symbol_table (which used to invoke them as callbacks), and reimplemented in most other places. Thecode duplication is a bit messy, but could be potentially improved in the future with new utility classes. - The cheat engine no longer needs to hook into the debugger_cpu class or instantiate a dummy instance of it. - The inclusion of debug/express.h within emu.h has been undone. Some debugging structures now need unique_ptr to wrap the resulting incomplete classes; hopefully the performance impact of this is negligible. Another direct consequence is that the breakpoint, watchpoint and registerpoint classes are no longer inside device_debug and have their own source file. - The breakpoint list is now a std::multimap, using the addresses as keys to hopefully expedite lookup. - The visible CPU pointer has been removed from the debugger_cpu class, being now considered a property of the console instead. - Many minor bits of code have been simplified.
Diffstat (limited to 'src/osd/modules/debugger/debugimgui.cpp')
-rw-r--r--src/osd/modules/debugger/debugimgui.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/osd/modules/debugger/debugimgui.cpp b/src/osd/modules/debugger/debugimgui.cpp
index c1e3a4de21d..296b148c5db 100644
--- a/src/osd/modules/debugger/debugimgui.cpp
+++ b/src/osd/modules/debugger/debugimgui.cpp
@@ -375,36 +375,36 @@ void debug_imgui::handle_keys()
else
{
m_machine->schedule_soft_reset();
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go();
}
}
if(ImGui::IsKeyPressed(ITEM_ID_F5,false))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go();
m_running = true;
}
if(ImGui::IsKeyPressed(ITEM_ID_F6,false))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go_next_device();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go_next_device();
m_running = true;
}
if(ImGui::IsKeyPressed(ITEM_ID_F7,false))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go_interrupt();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go_interrupt();
m_running = true;
}
if(ImGui::IsKeyPressed(ITEM_ID_F8,false))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go_vblank();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go_vblank();
if(ImGui::IsKeyPressed(ITEM_ID_F9,false))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step_out();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step_out();
if(ImGui::IsKeyPressed(ITEM_ID_F10,false))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step_over();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step_over();
if(ImGui::IsKeyPressed(ITEM_ID_F11,false))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step();
if(ImGui::IsKeyPressed(ITEM_ID_F12,false))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go();
m_hide = true;
}
@@ -484,7 +484,7 @@ void debug_imgui::handle_console(running_machine* machine)
// if console input is empty, then do a single step
if(strlen(view_main_console->console_input) == 0)
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step();
view_main_console->exec_cmd = false;
history_pos = view_main_console->console_history.size();
return;
@@ -1248,33 +1248,33 @@ void debug_imgui::draw_console()
ImGui::Separator();
if(ImGui::MenuItem("Run", "F5"))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go();
m_running = true;
}
if(ImGui::MenuItem("Go to next CPU", "F6"))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go_next_device();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go_next_device();
m_running = true;
}
if(ImGui::MenuItem("Run until next interrupt", "F7"))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go_interrupt();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go_interrupt();
m_running = true;
}
if(ImGui::MenuItem("Run until VBLANK", "F8"))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go_vblank();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go_vblank();
if(ImGui::MenuItem("Run and hide debugger", "F12"))
{
- m_machine->debugger().cpu().get_visible_cpu()->debug()->go();
+ m_machine->debugger().console().get_visible_cpu()->debug()->go();
m_hide = true;
}
ImGui::Separator();
if(ImGui::MenuItem("Single step", "F11"))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step();
if(ImGui::MenuItem("Step over", "F10"))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step_over();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step_over();
if(ImGui::MenuItem("Step out", "F9"))
- m_machine->debugger().cpu().get_visible_cpu()->debug()->single_step_out();
+ m_machine->debugger().console().get_visible_cpu()->debug()->single_step_out();
ImGui::EndMenu();
}