summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2021-10-01 05:26:11 +1000
committer GitHub <noreply@github.com>2021-10-01 05:26:11 +1000
commit360d3a5950f0649270822e2db1ea25028eabd18b (patch)
tree8019fee8da58f31e84889088935c09ff3eec4cd6 /src/devices/machine
parent6eee76c1a0c7e4f317bf55dde5ddb2d25356b6be (diff)
debugger: Extended target address syntax to include device/address space. (#8630)
Added a validity check to ensure address space names are tag-like and unique, since they're now used as identifiers in debugger commands. Extended the syntax for target addresses to allow them to be qualified with a colon followed by an optional device tag and/or address space name. If only the device needs to be specified, a debugger CPU number may also be used. This makes commands like bpset and wpset more flexible, as they can operate on CPUs other than the currently visible CPU. Commands like find, fill, dump and load are more flexible as they can access any space of any device. Removed now-redundant CPU parameters from many commands, and renamed pcatmemp to pcatmem for consistency with other commands. Extended region syntax for saver/loadr to support tags relative to the visible CPU (e.g. you can use "." for the region with the same name as the visible CPU, or "^sibling" syntax). Added an optional root device parameter to memdump. Changed interpretation of Boolean values to support numeric expressions as well as true/false strings and literal 1/0. Added checks that the specified device is CPU-like to various commands that require a CPU (e.g. focus). Previously these commands would crash or trigger an assertion failure if a tag for a non-CPU devices was specified. Fixed the cpunum symbol so it uses the same rules for determining what is or isn't a CPU as parameter parsing. Made device_t sanitise subtags better. Previously you could cause an assertion failure or crash MAME by giving it unexpected relative tags via Lua or the debugger. Added help topic alias support, and reworked the data structures to improve the performance of looking up debugger commands and help topics. Removed the "ref" parameter from debugger command functions (std::bind can hold extra argument values for you if you need them). Also added an error message if duplicate debugger commands are registered. Updated help for commands that changed syntax, and also updated summaries for some commands that had changed in the past without corresponding help updates.
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/acorn_memc.cpp6
-rw-r--r--src/devices/machine/acorn_memc.h2
-rw-r--r--src/devices/machine/sun4c_mmu.cpp4
-rw-r--r--src/devices/machine/sun4c_mmu.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/machine/acorn_memc.cpp b/src/devices/machine/acorn_memc.cpp
index 030834e8152..01d9af73d7e 100644
--- a/src/devices/machine/acorn_memc.cpp
+++ b/src/devices/machine/acorn_memc.cpp
@@ -32,7 +32,7 @@ acorn_memc_device::acorn_memc_device(const machine_config &mconfig, const char *
: device_t(mconfig, ACORN_MEMC, tag, owner, clock)
, device_memory_interface(mconfig, *this)
, m_vidc(*this, finder_base::DUMMY_TAG)
- , m_space_config("MEMC", ENDIANNESS_LITTLE, 32, 26, 0)
+ , m_space_config("memc", ENDIANNESS_LITTLE, 32, 26, 0)
, m_abort_w(*this)
, m_sirq_w(*this)
, m_output_dram_rowcol(false)
@@ -51,7 +51,7 @@ device_memory_interface::space_config_vector acorn_memc_device::memory_space_con
};
}
-void acorn_memc_device::memc_map_debug_commands(int ref, const std::vector<std::string> &params)
+void acorn_memc_device::memc_map_debug_commands(const std::vector<std::string> &params)
{
uint64_t offset;
if (params.size() != 1 || !machine().debugger().commands().validate_number_parameter(params[0], offset))
@@ -103,7 +103,7 @@ void acorn_memc_device::device_start()
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
using namespace std::placeholders;
- machine().debugger().console().register_command("memc_map", CMDFLAG_NONE, 0, 1, 1, std::bind(&acorn_memc_device::memc_map_debug_commands, this, _1, _2));
+ machine().debugger().console().register_command("memc_map", CMDFLAG_NONE, 1, 1, std::bind(&acorn_memc_device::memc_map_debug_commands, this, _1));
}
}
diff --git a/src/devices/machine/acorn_memc.h b/src/devices/machine/acorn_memc.h
index f0b687ac195..930e7477b19 100644
--- a/src/devices/machine/acorn_memc.h
+++ b/src/devices/machine/acorn_memc.h
@@ -60,7 +60,7 @@ protected:
virtual space_config_vector memory_space_config() const override;
private:
- void memc_map_debug_commands(int ref, const std::vector<std::string> &params);
+ void memc_map_debug_commands(const std::vector<std::string> &params);
uint32_t dram_address(uint32_t address);
bool is_valid_access(int page, bool write);
uint32_t invalid_access(bool is_write, offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
diff --git a/src/devices/machine/sun4c_mmu.cpp b/src/devices/machine/sun4c_mmu.cpp
index fce37a92824..feadefe0566 100644
--- a/src/devices/machine/sun4c_mmu.cpp
+++ b/src/devices/machine/sun4c_mmu.cpp
@@ -151,7 +151,7 @@ void sun4_mmu_base_device::device_start()
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
using namespace std::placeholders;
- machine().debugger().console().register_command("l2p", CMDFLAG_NONE, 0, 1, 1, std::bind(&sun4_mmu_base_device::l2p_command, this, _1, _2));
+ machine().debugger().console().register_command("l2p", CMDFLAG_NONE, 1, 1, std::bind(&sun4_mmu_base_device::l2p_command, this, _1));
}
m_cache_word_size = m_cache_line_size >> 2;
@@ -985,7 +985,7 @@ bool sun4_mmu_base_device::translate(uint32_t &addr)
return entry.valid;
}
-void sun4_mmu_base_device::l2p_command(int ref, const std::vector<std::string> &params)
+void sun4_mmu_base_device::l2p_command(const std::vector<std::string> &params)
{
uint64_t addr, offset;
diff --git a/src/devices/machine/sun4c_mmu.h b/src/devices/machine/sun4c_mmu.h
index d9fa7a80783..9152705a905 100644
--- a/src/devices/machine/sun4c_mmu.h
+++ b/src/devices/machine/sun4c_mmu.h
@@ -138,7 +138,7 @@ protected:
void type0_timeout_r(const uint32_t offset);
void type0_timeout_w(const uint32_t offset);
bool translate(uint32_t &addr);
- void l2p_command(int ref, const std::vector<std::string> &params);
+ void l2p_command(const std::vector<std::string> &params);
uint32_t vaddr_to_cache_line(uint32_t vaddr);
enum