summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/express.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-19 06:46:17 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-19 06:46:17 +0000
commit42c9aeff3943f2e6779d3d125fc014cd96d16d71 (patch)
tree8d681b294d01bf526dd808ed95337cab1b98d101 /src/emu/debug/express.c
parent3fdd1d460aa7b752956237d5e9c8a9ebecf409b9 (diff)
Cleaned up device and sound interfaces to match the CPU
interfaces when handling strings. Namely, the generic get_info functions allocate a temporary string and the device in question copies its string to the target, instead of assigning a const char *. Updated all device and sound cores to operate this way. Added the concept of a cpu_state_table, which is supplied by the CPU cores and which describes all the register state accessible to the debugger and other subsystems. The format of the table is such that most data can be simply fetched from memory without the further involvement of the CPU core, including the display of common formats. Extensibility points are available for custom display and for importing/exporting the data to intermediate variables for more complicated scenarios. Updated the ADSP21xx, TMS340x0, and i86 cores to use this. Removed the old debugger register list, which was never used. Replaced it with using ordering from the cpu_state_table. Renamed REG_PC -> REG_GENPC, REG_SP -> REG_GENSP, and REG_PREVIOUSPC -> REG_GENPCBASE. Updated a few spots that were using these directly. Moved these definitions into the end of the register area rather than leaving them outside which put them in a weird range.
Diffstat (limited to 'src/emu/debug/express.c')
-rw-r--r--src/emu/debug/express.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c
index ccba47c0547..61c20861abc 100644
--- a/src/emu/debug/express.c
+++ b/src/emu/debug/express.c
@@ -1953,6 +1953,8 @@ int symtable_add(symbol_table *table, const char *name, const symbol_entry *entr
int strindex;
int all_digits, i;
+ assert_always(entry->table == table, "Mismatched symbol tables");
+
/* we cannot add numeric symbols */
all_digits = TRUE;
for (i = 0; name[i]; i++)
@@ -2018,6 +2020,7 @@ int symtable_add_register(symbol_table *table, const char *name, void *symref, s
symbol.type = SMT_REGISTER;
symbol.info.reg.getter = getter;
symbol.info.reg.setter = setter;
+ symbol.table = table;
return symtable_add(table, name, &symbol);
}
@@ -2036,6 +2039,7 @@ int symtable_add_function(symbol_table *table, const char *name, void *symref, U
symbol.info.func.minparams = minparams;
symbol.info.func.maxparams = maxparams;
symbol.info.func.execute = execute;
+ symbol.table = table;
return symtable_add(table, name, &symbol);
}
@@ -2052,6 +2056,7 @@ int symtable_add_value(symbol_table *table, const char *name, UINT64 value)
symbol.ref = NULL;
symbol.type = SMT_VALUE;
symbol.info.gen.value = value;
+ symbol.table = table;
return symtable_add(table, name, &symbol);
}