summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.c
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-10-20 21:34:36 +0200
committer ImJezze <jezze@gmx.net>2015-10-20 21:34:36 +0200
commita7b8acbe3eebcf17367baa642375cfa47ae4ea85 (patch)
tree854b859d6176802c0278f4b00de3f7c774e02dda /src/emu/debug/debugcpu.c
parent4610935e796661874bb4ee7ec6536d9423aeb7be (diff)
parent74aae76c4e3e257f99d139c4febb5d86d1419e50 (diff)
Merge pull request #6 from mamedev/master
Sync to base master
Diffstat (limited to 'src/emu/debug/debugcpu.c')
-rw-r--r--src/emu/debug/debugcpu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index 2eeb2e1af72..22344cb2deb 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -19,8 +19,8 @@
#include "debugger.h"
#include "uiinput.h"
#include "xmlfile.h"
+#include "coreutil.h"
#include <ctype.h>
-#include <zlib.h>
/***************************************************************************
@@ -288,6 +288,8 @@ void debug_cpu_source_script(running_machine &machine, const char *file)
bool debug_comment_save(running_machine &machine)
{
+ bool comments_saved = false;
+
// if we don't have a root, bail
xml_data_node *root = xml_file_create();
if (root == NULL)
@@ -332,7 +334,10 @@ bool debug_comment_save(running_machine &machine)
emu_file file(machine.options().comment_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
file_error filerr = file.open(machine.basename(), ".cmt");
if (filerr == FILERR_NONE)
+ {
xml_file_write(root, file);
+ comments_saved = true;
+ }
}
}
catch (emu_exception &)
@@ -343,7 +348,7 @@ bool debug_comment_save(running_machine &machine)
// free and get out of here
xml_file_free(root);
- return true;
+ return comments_saved;
}
@@ -2746,7 +2751,7 @@ UINT32 device_debug::compute_opcode_crc32(offs_t pc) const
UINT32 numbytes = disassemble(diasmbuf, pc, opbuf, argbuf) & DASMFLAG_LENGTHMASK;
// return a CRC of the exact count of opcode bytes
- return crc32(0, opbuf, numbytes);
+ return core_crc32(0, opbuf, numbytes);
}