summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/i386
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-12-01 05:34:53 +1100
committer Vas Crabb <vas@vastheman.com>2017-12-01 05:34:53 +1100
commit199f92a2b0fa29da5ce52fce8114a4331dd3466b (patch)
tree308c7f414d3410b0862a57b05c971724ce36b65a /src/devices/cpu/i386
parent19addd3df55fd79735653c6894835c4ac5fce45c (diff)
(nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get
rid of reference constants in the debugger in favour of capturing the value in the bind/lambda (less ugly casting)
Diffstat (limited to 'src/devices/cpu/i386')
-rw-r--r--src/devices/cpu/i386/i386.cpp33
1 files changed, 5 insertions, 28 deletions
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 637af658c6e..15379c18d7b 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -3171,36 +3171,13 @@ uint64_t i386_device::debug_virttophys(symbol_table &table, int params, const ui
return result;
}
-uint64_t i386_debug_segbase(symbol_table &table, void *ref, int params, const uint64_t *param)
-{
- i386_device *i386 = (i386_device *)(ref);
- return i386->debug_segbase(table, params, param);
-}
-
-uint64_t i386_debug_seglimit(symbol_table &table, void *ref, int params, const uint64_t *param)
-{
- i386_device *i386 = (i386_device *)(ref);
- return i386->debug_seglimit(table, params, param);
-}
-
-uint64_t i386_debug_segofftovirt(symbol_table &table, void *ref, int params, const uint64_t *param)
-{
- i386_device *i386 = (i386_device *)(ref);
- return i386->debug_segofftovirt(table, params, param);
-}
-
-static uint64_t i386_debug_virttophys(symbol_table &table, void *ref, int params, const uint64_t *param)
-{
- i386_device *i386 = (i386_device *)(ref);
- return i386->debug_virttophys(table, params, param);
-}
-
void i386_device::device_debug_setup()
{
- debug()->symtable().add("segbase", (void *)this, 1, 1, i386_debug_segbase);
- debug()->symtable().add("seglimit", (void *)this, 1, 1, i386_debug_seglimit);
- debug()->symtable().add("segofftovirt", (void *)this, 2, 2, i386_debug_segofftovirt);
- debug()->symtable().add("virttophys", (void *)this, 1, 1, i386_debug_virttophys);
+ using namespace std::placeholders;
+ debug()->symtable().add("segbase", 1, 1, std::bind(&i386_device::debug_segbase, this, _1, _2, _3));
+ debug()->symtable().add("seglimit", 1, 1, std::bind(&i386_device::debug_seglimit, this, _1, _2, _3));
+ debug()->symtable().add("segofftovirt", 2, 2, std::bind(&i386_device::debug_segofftovirt, this, _1, _2, _3));
+ debug()->symtable().add("virttophys", 1, 1, std::bind(&i386_device::debug_virttophys, this, _1, _2, _3));
}
/*************************************************************************/