diff options
author | 2020-11-30 12:01:14 +1100 | |
---|---|---|
committer | 2020-11-30 12:01:14 +1100 | |
commit | 1bdf8d272a32d161e11c96984bf3614de3210003 (patch) | |
tree | aca314836043ffb5303de52ceaba860bf0860133 /plugins/gdbstub/init.lua | |
parent | f3454cee2f5fbfff068f53c3716ba187ea4b1492 (diff) |
frontend: Lua engine improvements.
Added methods for enabling and disabling breakpoints and watchpoints,
and made debugger views update when breakpoints/watchpoints are
manipulated from Lua. Made breakpoints and watchpoints objects rather
than tables. (It’s not possible to enable/disable a breakpoint or
watchpoint from the object itself, you have to go through its owners'
debug interface.)
Exposed more device_t members for dealing with child/sibling tags and
devices. Also provided a way to get regions/shares/banks from a device
using relative tags rather than going through the memory manager with
absolute tags.
Diffstat (limited to 'plugins/gdbstub/init.lua')
-rw-r--r-- | plugins/gdbstub/init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/gdbstub/init.lua b/plugins/gdbstub/init.lua index e34b0dcfb5d..f2292bc0027 100644 --- a/plugins/gdbstub/init.lua +++ b/plugins/gdbstub/init.lua @@ -45,8 +45,8 @@ function gdbstub.startplugin() if not cpu then print("gdbstub: maincpu not found") end - if not regmaps[cpu:shortname()] then - print("gdbstub: no register map for cpu " .. cpu:shortname()) + if not regmaps[cpu.shortname] then + print("gdbstub: no register map for cpu " .. cpu.shortname) cpu = nil end consolelog = debugger.consolelog @@ -98,7 +98,7 @@ function gdbstub.startplugin() consolelast = #consolelog if #consolelog > last and msg:find("Stopped at", 1, true) then local point = tonumber(msg:match("Stopped at breakpoint ([0-9]+)")) - local map = regmaps[cpu:shortname()] + local map = regmaps[cpu.shortname] running = false if not point then point = tonumber(msg:match("Stopped at watchpoint ([0-9]+")) @@ -152,7 +152,7 @@ function gdbstub.startplugin() if packet then packet:gsub("}(.)", function(s) return string.char(string.byte(s) ~ 0x20) end) local cmd = packet:sub(1, 1) - local map = regmaps[cpu:shortname()] + local map = regmaps[cpu.shortname] if cmd == "g" then local regs = {} for reg, idx in pairs(map.togdb) do |