diff options
Diffstat (limited to 'src/emu/debug/debugcmd.h')
-rw-r--r-- | src/emu/debug/debugcmd.h | 191 |
1 files changed, 86 insertions, 105 deletions
diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h index fd0bcea673a..134f838f8a7 100644 --- a/src/emu/debug/debugcmd.h +++ b/src/emu/debug/debugcmd.h @@ -24,27 +24,6 @@ class debugger_commands public: debugger_commands(running_machine &machine, debugger_cpu &cpu, debugger_console &console); - // validates a parameter as a boolean value - bool validate_boolean_parameter(const std::string ¶m, bool &result); - - // validates a parameter as a numeric value - bool validate_number_parameter(std::string_view param, u64 &result); - - // validates a parameter as a device - bool validate_device_parameter(std::string_view param, device_t *&result); - - // validates a parameter as a CPU - bool validate_cpu_parameter(std::string_view param, device_t *&result); - - // validates a parameter as an address space identifier - bool validate_device_space_parameter(std::string_view param, int spacenum, address_space *&result); - - // validates a parameter as a target address and retrieves the given address space and address - bool validate_target_address_parameter(std::string_view param, int spacenum, address_space *&space, u64 &addr); - - // validates a parameter as a memory region name and retrieves the given region - bool validate_memory_region_parameter(std::string_view param, memory_region *&result); - private: struct global_entry { @@ -87,11 +66,6 @@ private: u8 disabled = 0U; }; - device_t &get_device_search_base(std::string_view ¶m); - device_t *get_cpu_by_index(u64 cpunum); - bool debug_command_parameter_expression(std::string_view param, parsed_expression &result); - bool debug_command_parameter_command(const char *param); - bool cheat_address_is_valid(address_space &space, offs_t address); u64 get_cpunum(); @@ -99,86 +73,93 @@ private: u64 global_get(global_entry *global); void global_set(global_entry *global, u64 value); - int mini_printf(char *buffer, const char *format, int params, u64 *param); + bool mini_printf(std::ostream &stream, const std::vector<std::string_view> ¶ms); template <typename T> - void execute_index_command(std::vector<std::string> const ¶ms, T &&apply, char const *unused_message); - - void execute_help(const std::vector<std::string> ¶ms); - void execute_print(const std::vector<std::string> ¶ms); - void execute_printf(const std::vector<std::string> ¶ms); - void execute_logerror(const std::vector<std::string> ¶ms); - void execute_tracelog(const std::vector<std::string> ¶ms); - void execute_tracesym(const std::vector<std::string> ¶ms); - void execute_cls(const std::vector<std::string> ¶ms); - void execute_quit(const std::vector<std::string> ¶ms); - void execute_do(const std::vector<std::string> ¶ms); - void execute_step(const std::vector<std::string> ¶ms); - void execute_over(const std::vector<std::string> ¶ms); - void execute_out(const std::vector<std::string> ¶ms); - void execute_go(const std::vector<std::string> ¶ms); - void execute_go_vblank(const std::vector<std::string> ¶ms); - void execute_go_interrupt(const std::vector<std::string> ¶ms); - void execute_go_exception(const std::vector<std::string> ¶ms); - void execute_go_time(const std::vector<std::string> ¶ms); - void execute_go_privilege(const std::vector<std::string> ¶ms); - void execute_focus(const std::vector<std::string> ¶ms); - void execute_ignore(const std::vector<std::string> ¶ms); - void execute_observe(const std::vector<std::string> ¶ms); - void execute_suspend(const std::vector<std::string> ¶ms); - void execute_resume(const std::vector<std::string> ¶ms); - void execute_next(const std::vector<std::string> ¶ms); - void execute_cpulist(const std::vector<std::string> ¶ms); - void execute_comment_add(const std::vector<std::string> ¶ms); - void execute_comment_del(const std::vector<std::string> ¶ms); - void execute_comment_save(const std::vector<std::string> ¶ms); - void execute_comment_list(const std::vector<std::string> ¶ms); - void execute_comment_commit(const std::vector<std::string> ¶ms); - void execute_bpset(const std::vector<std::string> ¶ms); - void execute_bpclear(const std::vector<std::string> ¶ms); - void execute_bpdisenable(bool enable, const std::vector<std::string> ¶ms); - void execute_bplist(const std::vector<std::string> ¶ms); - void execute_wpset(int spacenum, const std::vector<std::string> ¶ms); - void execute_wpclear(const std::vector<std::string> ¶ms); - void execute_wpdisenable(bool enable, const std::vector<std::string> ¶ms); - void execute_wplist(const std::vector<std::string> ¶ms); - void execute_rpset(const std::vector<std::string> ¶ms); - void execute_rpclear(const std::vector<std::string> ¶ms); - void execute_rpdisenable(bool enable, const std::vector<std::string> ¶ms); - void execute_rplist(const std::vector<std::string> ¶ms); - void execute_statesave(const std::vector<std::string> ¶ms); - void execute_stateload(const std::vector<std::string> ¶ms); - void execute_rewind(const std::vector<std::string> ¶ms); - void execute_save(int spacenum, const std::vector<std::string> ¶ms); - void execute_saveregion(const std::vector<std::string> ¶ms); - void execute_load(int spacenum, const std::vector<std::string> ¶ms); - void execute_loadregion(const std::vector<std::string> ¶ms); - void execute_dump(int spacenum, const std::vector<std::string> ¶ms); - void execute_strdump(int spacenum, const std::vector<std::string> ¶ms); - void execute_cheatrange(bool init, const std::vector<std::string> ¶ms); - void execute_cheatnext(bool initial, const std::vector<std::string> ¶ms); - void execute_cheatlist(const std::vector<std::string> ¶ms); - void execute_cheatundo(const std::vector<std::string> ¶ms); - void execute_dasm(const std::vector<std::string> ¶ms); - void execute_find(int spacenum, const std::vector<std::string> ¶ms); - void execute_fill(int spacenum, const std::vector<std::string> ¶ms); - void execute_trace(const std::vector<std::string> ¶ms, bool trace_over); - void execute_traceflush(const std::vector<std::string> ¶ms); - void execute_history(const std::vector<std::string> ¶ms); - void execute_trackpc(const std::vector<std::string> ¶ms); - void execute_trackmem(const std::vector<std::string> ¶ms); - void execute_pcatmem(int spacenum, const std::vector<std::string> ¶ms); - void execute_snap(const std::vector<std::string> ¶ms); - void execute_source(const std::vector<std::string> ¶ms); - void execute_map(int spacenum, const std::vector<std::string> ¶ms); - void execute_memdump(const std::vector<std::string> ¶ms); - void execute_symlist(const std::vector<std::string> ¶ms); - void execute_softreset(const std::vector<std::string> ¶ms); - void execute_hardreset(const std::vector<std::string> ¶ms); - void execute_images(const std::vector<std::string> ¶ms); - void execute_mount(const std::vector<std::string> ¶ms); - void execute_unmount(const std::vector<std::string> ¶ms); - void execute_input(const std::vector<std::string> ¶ms); - void execute_dumpkbd(const std::vector<std::string> ¶ms); + void execute_index_command(std::vector<std::string_view> const ¶ms, T &&apply, char const *unused_message); + + void execute_help(const std::vector<std::string_view> ¶ms); + void execute_print(const std::vector<std::string_view> ¶ms); + void execute_printf(const std::vector<std::string_view> ¶ms); + void execute_logerror(const std::vector<std::string_view> ¶ms); + void execute_tracelog(const std::vector<std::string_view> ¶ms); + void execute_tracesym(const std::vector<std::string_view> ¶ms); + void execute_cls(const std::vector<std::string_view> ¶ms); + void execute_quit(const std::vector<std::string_view> ¶ms); + void execute_do(const std::vector<std::string_view> ¶ms); + void execute_step(const std::vector<std::string_view> ¶ms); + void execute_over(const std::vector<std::string_view> ¶ms); + void execute_out(const std::vector<std::string_view> ¶ms); + void execute_go(const std::vector<std::string_view> ¶ms); + void execute_go_vblank(const std::vector<std::string_view> ¶ms); + void execute_go_interrupt(const std::vector<std::string_view> ¶ms); + void execute_go_exception(const std::vector<std::string_view> ¶ms); + void execute_go_time(const std::vector<std::string_view> ¶ms); + void execute_go_privilege(const std::vector<std::string_view> ¶ms); + void execute_go_branch(bool sense, const std::vector<std::string_view> ¶ms); + void execute_go_next_instruction(const std::vector<std::string_view> ¶ms); + void execute_focus(const std::vector<std::string_view> ¶ms); + void execute_ignore(const std::vector<std::string_view> ¶ms); + void execute_observe(const std::vector<std::string_view> ¶ms); + void execute_suspend(const std::vector<std::string_view> ¶ms); + void execute_resume(const std::vector<std::string_view> ¶ms); + void execute_next(const std::vector<std::string_view> ¶ms); + void execute_cpulist(const std::vector<std::string_view> ¶ms); + void execute_time(const std::vector<std::string_view> ¶ms); + void execute_comment_add(const std::vector<std::string_view> ¶ms); + void execute_comment_del(const std::vector<std::string_view> ¶ms); + void execute_comment_save(const std::vector<std::string_view> ¶ms); + void execute_comment_list(const std::vector<std::string_view> ¶ms); + void execute_comment_commit(const std::vector<std::string_view> ¶ms); + void execute_bpset(const std::vector<std::string_view> ¶ms); + void execute_bpclear(const std::vector<std::string_view> ¶ms); + void execute_bpdisenable(bool enable, const std::vector<std::string_view> ¶ms); + void execute_bplist(const std::vector<std::string_view> ¶ms); + void execute_wpset(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_wpclear(const std::vector<std::string_view> ¶ms); + void execute_wpdisenable(bool enable, const std::vector<std::string_view> ¶ms); + void execute_wplist(const std::vector<std::string_view> ¶ms); + void execute_rpset(const std::vector<std::string_view> ¶ms); + void execute_rpclear(const std::vector<std::string_view> ¶ms); + void execute_rpdisenable(bool enable, const std::vector<std::string_view> ¶ms); + void execute_rplist(const std::vector<std::string_view> ¶ms); + void execute_epset(const std::vector<std::string_view> ¶ms); + void execute_epclear(const std::vector<std::string_view> ¶ms); + void execute_epdisenable(bool enable, const std::vector<std::string_view> ¶ms); + void execute_eplist(const std::vector<std::string_view> ¶ms); + void execute_statesave(const std::vector<std::string_view> ¶ms); + void execute_stateload(const std::vector<std::string_view> ¶ms); + void execute_rewind(const std::vector<std::string_view> ¶ms); + void execute_save(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_saveregion(const std::vector<std::string_view> ¶ms); + void execute_load(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_loadregion(const std::vector<std::string_view> ¶ms); + void execute_dump(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_strdump(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_cheatrange(bool init, const std::vector<std::string_view> ¶ms); + void execute_cheatnext(bool initial, const std::vector<std::string_view> ¶ms); + void execute_cheatlist(const std::vector<std::string_view> ¶ms); + void execute_cheatundo(const std::vector<std::string_view> ¶ms); + void execute_dasm(const std::vector<std::string_view> ¶ms); + void execute_find(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_fill(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_trace(const std::vector<std::string_view> ¶ms, bool trace_over); + void execute_traceflush(const std::vector<std::string_view> ¶ms); + void execute_history(const std::vector<std::string_view> ¶ms); + void execute_trackpc(const std::vector<std::string_view> ¶ms); + void execute_trackmem(const std::vector<std::string_view> ¶ms); + void execute_pcatmem(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_snap(const std::vector<std::string_view> ¶ms); + void execute_source(const std::vector<std::string_view> ¶ms); + void execute_map(int spacenum, const std::vector<std::string_view> ¶ms); + void execute_memdump(const std::vector<std::string_view> ¶ms); + void execute_symlist(const std::vector<std::string_view> ¶ms); + void execute_softreset(const std::vector<std::string_view> ¶ms); + void execute_hardreset(const std::vector<std::string_view> ¶ms); + void execute_images(const std::vector<std::string_view> ¶ms); + void execute_mount(const std::vector<std::string_view> ¶ms); + void execute_unmount(const std::vector<std::string_view> ¶ms); + void execute_input(const std::vector<std::string_view> ¶ms); + void execute_dumpkbd(const std::vector<std::string_view> ¶ms); running_machine& m_machine; debugger_console& m_console; |