diff options
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
-rw-r--r-- | src/emu/debug/debugcpu.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index c4686c5566f..2b8595b3c30 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -1930,7 +1930,7 @@ void device_debug::instruction_hook(offs_t curpc) machine.debug_view().flush_osd_updates(); machine.manager().lua()->periodic_check(); - + // clear the memory modified flag and wait global->memory_modified = false; if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED) @@ -2231,10 +2231,9 @@ void device_debug::go_next_device() // debugger on the next instruction //------------------------------------------------- -void device_debug::halt_on_next_instruction(const char *fmt, ...) +void device_debug::halt_on_next_instruction_impl(util::format_argument_pack<std::ostream> &&args) { debugcpu_private *global = m_device.machine().debugcpu_data; - va_list arg; assert(m_exec != nullptr); @@ -2243,9 +2242,7 @@ void device_debug::halt_on_next_instruction(const char *fmt, ...) return; // output the message to the console - va_start(arg, fmt); - debug_console_vprintf(m_device.machine(), fmt, arg); - va_end(arg); + debug_console_vprintf(m_device.machine(), std::move(args)); // if we are live, stop now, otherwise note that we want to break there if (&m_device == global->livecpu) @@ -2680,7 +2677,6 @@ const char *device_debug::comment_text(offs_t addr) const bool device_debug::comment_export(xml_data_node &curnode) { // iterate through the comments - std::string crc_buf; for (const auto & elem : m_comment_set) { xml_data_node *datanode = xml_add_child(&curnode, "comment", xml_normalize_string(elem.m_text.c_str())); @@ -2688,8 +2684,7 @@ bool device_debug::comment_export(xml_data_node &curnode) return false; xml_set_attribute_int(datanode, "address", elem.m_address); xml_set_attribute_int(datanode, "color", elem.m_color); - strprintf(crc_buf,"%08X", elem.m_crc); - xml_set_attribute(datanode, "crc", crc_buf.c_str()); + xml_set_attribute(datanode, "crc", string_format("%08X", elem.m_crc).c_str()); } return true; } @@ -3051,14 +3046,14 @@ void device_debug::watchpoint_check(address_space &space, int type, offs_t addre if (type & WATCHPOINT_WRITE) { - strprintf(buffer, "Stopped at watchpoint %X writing %s to %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); + buffer = string_format("Stopped at watchpoint %X writing %s to %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); if (value_to_write >> 32) - strcatprintf(buffer, " (data=%X%08X)", (UINT32)(value_to_write >> 32), (UINT32)value_to_write); + buffer.append(string_format(" (data=%X%08X)", (UINT32)(value_to_write >> 32), (UINT32)value_to_write)); else - strcatprintf(buffer, " (data=%X)", (UINT32)value_to_write); + buffer.append(string_format(" (data=%X)", (UINT32)value_to_write)); } else - strprintf(buffer,"Stopped at watchpoint %X reading %s from %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); + buffer = string_format("Stopped at watchpoint %X reading %s from %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); debug_console_printf(space.machine(), "%s\n", buffer.c_str()); space.device().debug()->compute_debug_flags(); } @@ -3486,7 +3481,7 @@ void device_debug::tracer::update(offs_t pc) // print the address std::string buffer; int logaddrchars = m_debug.logaddrchars(); - strprintf(buffer,"%0*X: ", logaddrchars, pc); + buffer = string_format("%0*X: ", logaddrchars, pc); // print the disassembly std::string dasm; |