summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-06-08 20:43:41 +0200
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-06-08 20:43:59 +0200
commit0ae82382cbffe288df9f0902666c60139d1d0520 (patch)
tree6e6ed976f2518f4d01adeba3a42782758f76610a /src/emu
parenta3af73bafcac0f94de44430b6e2b521aac5481a9 (diff)
Fix build on MSVC thanks to Rene, also fix debug_break crashes
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/debugger.cpp3
-rw-r--r--src/emu/debugger.h6
-rw-r--r--src/emu/machine.cpp11
-rw-r--r--src/emu/machine.h1
4 files changed, 17 insertions, 4 deletions
diff --git a/src/emu/debugger.cpp b/src/emu/debugger.cpp
index ca7f86030d1..52031ff7753 100644
--- a/src/emu/debugger.cpp
+++ b/src/emu/debugger.cpp
@@ -93,8 +93,7 @@ void debugger_interrupt_hook(device_t *device, int irqline)
void debugger_manager::debug_break()
{
- if ((m_machine.debug_flags & DEBUG_FLAG_ENABLED) != 0)
- m_cpu->get_visible_cpu()->debug()->halt_on_next_instruction("Internal breakpoint\n");
+ m_cpu->get_visible_cpu()->debug()->halt_on_next_instruction("Internal breakpoint\n");
}
diff --git a/src/emu/debugger.h b/src/emu/debugger.h
index 786df8b27d5..564e24c6cb2 100644
--- a/src/emu/debugger.h
+++ b/src/emu/debugger.h
@@ -9,8 +9,10 @@
#pragma once
-#ifndef EMU_DEBUGGER_H
-#define EMU_DEBUGGER_H
+#ifndef __DEBUGGER_H__
+#define __DEBUGGER_H__
+
+#include "emu.h"
class debugger_commands;
class debugger_cpu;
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 5485e2f56e1..0bb7ac0ba37 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -728,6 +728,17 @@ void running_machine::add_logerror_callback(logerror_callback callback)
//-------------------------------------------------
+// debug_break - breaks into the debugger, if
+// enabled
+//-------------------------------------------------
+
+void running_machine::debug_break()
+{
+ if ((debug_flags & DEBUG_FLAG_ENABLED) != 0)
+ debugger().debug_break();
+}
+
+//-------------------------------------------------
// base_datetime - retrieve the time of the host
// system; useful for RTC implementations
//-------------------------------------------------
diff --git a/src/emu/machine.h b/src/emu/machine.h
index c15a26d3bb0..55af0512525 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -212,6 +212,7 @@ public:
void call_notifiers(machine_notification which);
void add_logerror_callback(logerror_callback callback);
void set_ui_active(bool active) { m_ui_active = active; }
+ void debug_break();
// TODO: Do saves and loads still require scheduling?
void immediate_save(const char *filename);