summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/cheat.cpp19
-rw-r--r--src/frontend/mame/cheat.h2
-rw-r--r--src/frontend/mame/luaengine.cpp10
3 files changed, 8 insertions, 23 deletions
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp
index 00f8c9d67fd..daf6461b0f4 100644
--- a/src/frontend/mame/cheat.cpp
+++ b/src/frontend/mame/cheat.cpp
@@ -79,9 +79,7 @@
#include "ui/ui.h"
#include "ui/menu.h"
-#include "debugger.h"
#include "emuopts.h"
-#include "debug/debugcpu.h"
#include <cstring>
#include <iterator>
@@ -679,7 +677,7 @@ void cheat_script::script_entry::output_argument::save(emu_file &cheatfile) cons
cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, std::string const &filename, util::xml::data_node const &cheatnode)
: m_manager(manager)
- , m_symbols(&globaltable)
+ , m_symbols(manager.machine(), &globaltable)
, m_state(SCRIPT_STATE_OFF)
, m_numtemp(DEFAULT_TEMP_VARIABLES)
, m_argindex(0)
@@ -1058,7 +1056,7 @@ constexpr int cheat_manager::CHEAT_VERSION;
cheat_manager::cheat_manager(running_machine &machine)
: m_machine(machine)
, m_disabled(true)
- , m_symtable()
+ , m_symtable(machine)
{
// if the cheat engine is disabled, we're done
if (!machine.options().cheat())
@@ -1081,19 +1079,6 @@ cheat_manager::cheat_manager(running_machine &machine)
m_symtable.add("frombcd", 1, 1, execute_frombcd);
m_symtable.add("tobcd", 1, 1, execute_tobcd);
- // we rely on the debugger expression callbacks; if the debugger isn't
- // enabled, we must jumpstart them manually
- if ((machine.debug_flags & DEBUG_FLAG_ENABLED) == 0)
- {
- m_cpu = std::make_unique<debugger_cpu>(machine);
- m_cpu->configure_memory(m_symtable);
- }
- else
- {
- // configure for memory access (shared with debugger)
- machine.debugger().cpu().configure_memory(m_symtable);
- }
-
// load the cheats
reload();
}
diff --git a/src/frontend/mame/cheat.h b/src/frontend/mame/cheat.h
index b81225faf15..b8f3e89a4e5 100644
--- a/src/frontend/mame/cheat.h
+++ b/src/frontend/mame/cheat.h
@@ -14,7 +14,6 @@
#pragma once
#include "debug/express.h"
-#include "debug/debugcpu.h"
#include "ui/text.h"
#include "xmlfile.h"
@@ -345,7 +344,6 @@ private:
int8_t m_lastline; // last line used for output
bool m_disabled; // true if the cheat engine is disabled
symbol_table m_symtable; // global symbol table
- std::unique_ptr<debugger_cpu> m_cpu; // debugger interface for cpus/memory
// constants
static constexpr int CHEAT_VERSION = 1;
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 8d3bd043ce0..993a3eeb428 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -14,6 +14,7 @@
#include "debugger.h"
#include "debug/debugcon.h"
#include "debug/debugcpu.h"
+#include "debug/points.h"
#include "debug/textbuf.h"
#include "drivenum.h"
#include "emuopts.h"
@@ -1577,8 +1578,8 @@ void lua_engine::initialize()
debugger_type.set("consolelog", sol::property([](debugger_manager &debug) { return wrap_textbuf(debug.console().get_console_textbuf()); }));
debugger_type.set("errorlog", sol::property([](debugger_manager &debug) { return wrap_textbuf(debug.console().get_errorlog_textbuf()); }));
debugger_type.set("visible_cpu", sol::property(
- [](debugger_manager &debug) { debug.cpu().get_visible_cpu(); },
- [](debugger_manager &debug, device_t &dev) { debug.cpu().set_visible_cpu(&dev); }));
+ [](debugger_manager &debug) { debug.console().get_visible_cpu(); },
+ [](debugger_manager &debug, device_t &dev) { debug.console().set_visible_cpu(&dev); }));
debugger_type.set("execution_state", sol::property(
[](debugger_manager &debug) {
return debug.cpu().is_stopped() ? "stop" : "run";
@@ -1616,7 +1617,7 @@ void lua_engine::initialize()
* debug:bpset(addr, [opt] cond, [opt] act) - set breakpoint on addr, cond and act are debugger
* expressions. returns breakpoint index
* debug:bpclr(idx) - clear break
- * debug:bplist()[] - table of breakpoints (k=index, v=device_debug::breakpoint)
+ * debug:bplist()[] - table of breakpoints (k=index, v=debug_breakpoint)
* debug:wpset(space, type, addr, len, [opt] cond, [opt] act) - set watchpoint, cond and act
* are debugger expressions.
* returns watchpoint index
@@ -1636,8 +1637,9 @@ void lua_engine::initialize()
device_debug_type.set("bpclr", &device_debug::breakpoint_clear);
device_debug_type.set("bplist", [this](device_debug &dev) {
sol::table table = sol().create_table();
- for(const device_debug::breakpoint &bpt : dev.breakpoint_list())
+ for(const auto &bpp : dev.breakpoint_list())
{
+ const debug_breakpoint &bpt = *bpp.second;
sol::table bp = sol().create_table();
bp["enabled"] = bpt.enabled();
bp["address"] = bpt.address();