From 01adaac4c7fc19f26563521f2ef4b5928a55cab1 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sat, 30 Jul 2005 10:11:40 +0000 Subject: [PATCH] Show cs:ip on illegal read/write Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2255 --- src/hardware/memory.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/hardware/memory.cpp b/src/hardware/memory.cpp index 1795de5b..3f30f55b 100644 --- a/src/hardware/memory.cpp +++ b/src/hardware/memory.cpp @@ -16,13 +16,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: memory.cpp,v 1.37 2005-03-25 11:52:32 qbix79 Exp $ */ +/* $Id: memory.cpp,v 1.38 2005-07-30 10:11:40 qbix79 Exp $ */ #include "dosbox.h" #include "mem.h" #include "inout.h" #include "setup.h" #include "paging.h" +#include "regs.h" #define PAGES_IN_BLOCK ((1024*1024)/MEM_PAGE_SIZE) #define MAX_MEMORY 64 @@ -60,11 +61,11 @@ public: flags=PFLAG_INIT|PFLAG_NOCODE; } Bitu readb(PhysPt addr) { - LOG_MSG("Illegal read from %x",addr); + LOG_MSG("Illegal read from %x, CS:IP %8x:%8x",addr,SegValue(cs),reg_eip); return 0; } void writeb(PhysPt addr,Bitu val) { - LOG_MSG("Illegal write to %x",addr); + LOG_MSG("Illegal write to %x, CS:IP %8x:%8x",addr,SegValue(cs),reg_eip); } HostPt GetHostPt(Bitu phys_page) { return 0; @@ -530,4 +531,12 @@ void MEM_Init(Section * sec) { /* shutdown function */ test = new MEMORY(sec); sec->AddDestroyFunction(&MEM_ShutDown); + + // initialize interrupt handlers to 0 + // this makes availible interrupts detectable even in compiler debug mode + // tyrian network helper app is suffering from this + // + // DISABLED IT BY DEFAULT. (qbix79). But the code is there in case + // somebody needs it + //for(Bitu icntr = 0; icntr <0xFF; icntr++) RealSetVec(icntr,0); }