Miscellaneous patches for Tattam's External Debugger.

- Now compiles for plain ia-32
- Fixed some printf formatting for ia32 only.
- Update to latest Win32 DLL
- Added an ICEBP (Undoc 0xF8, INT 01) facility.
- updated to use latest VGA refresh routine
This commit is contained in:
Peter Tattam 2002-11-04 05:27:26 +00:00
parent d9c8cb51f5
commit 1bb5040031
6 changed files with 20 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.cc,v 1.69 2002-10-25 12:36:42 bdenney Exp $
// $Id: cpu.cc,v 1.70 2002-11-04 05:27:25 ptrumpet Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -865,22 +865,18 @@ BX_CPU_C::revalidate_prefetch_q(void)
#endif
#if BX_SUPPORT_X86_64
#if BX_EXTERNAL_DEBUGGER
void
BX_CPU_C::ask (int level, const char *prefix, const char *fmt, va_list ap)
{
#if BX_EXTERNAL_DEBUGGER
char buf1[1024];
vsprintf (buf1, fmt, ap);
printf ("%s %s\n", prefix, buf1);
trap_debugger(1);
#else
this->logfunctions::ask(level,prefix,fmt,ap);
#endif
//this->logfunctions::ask(level,prefix,fmt,ap);
}
#if BX_EXTERNAL_DEBUGGER
void
BX_CPU_C::trap_debugger (bx_bool callnow)
{
@ -890,10 +886,7 @@ BX_CPU_C::trap_debugger (bx_bool callnow)
}
}
#endif
#endif // #if BX_SUPPORT_X86_64
#endif // #if BX_EXTERNAL_DEBUGGER
#if BX_DEBUGGER

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.h,v 1.110 2002-10-28 18:36:53 yakovlev Exp $
// $Id: cpu.h,v 1.111 2002-11-04 05:27:25 ptrumpet Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1544,7 +1544,9 @@ union {
//Bit32s daddr_upper; // upper bits must be canonical (-virtmax --> + virtmax)
// instruction upper 32 bits - not used any longer
//Bit32s iaddr_upper; // upper bits must be canonical (-virtmax --> + virtmax)
#endif
#if BX_EXTERNAL_DEBUGGER
void ask (int level, const char *prefix, const char *fmt, va_list ap);
#endif

View File

@ -106,7 +106,7 @@ void bx_external_debugger(BX_CPU_C *cpu)
if (call_debugger != NULL) debug_loaded = 2;
}
if (debug_loaded == 2) {
bx_vga.timer();
DEV_vga_refresh();
call_debugger(&regs,cpu->mem->vector,cpu->mem->len);
}
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: paging.cc,v 1.36 2002-10-25 12:36:43 bdenney Exp $
// $Id: paging.cc,v 1.37 2002-11-04 05:27:25 ptrumpet Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -977,7 +977,11 @@ page_fault_not_present:
// Invalidate TLB entry.
BX_CPU_THIS_PTR TLB.entry[TLB_index].lpf = BX_INVALID_TLB_ENTRY;
#if BX_EXTERNAL_DEBUGGER
printf("page fault for address %08x%08x\n",(Bit32u)(laddr >> 32),(Bit32u)(laddr & 0xffffffff));
#if BX_SUPPORT_X86_64
printf("page fault for address %08x%08x\n",(Bit32u)(laddr >> 32),(Bit32u)(laddr & 0xffffffff));
#else
printf("page fault for address %08xx\n",(laddr >> 32));
#endif
#endif
exception(BX_PF_EXCEPTION, error_code, 0);
return(0); // keep compiler happy

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: soft_int.cc,v 1.12 2002-09-28 00:54:05 kevinlawton Exp $
// $Id: soft_int.cc,v 1.13 2002-11-04 05:27:26 ptrumpet Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -96,6 +96,10 @@ BX_CPU_C::INT1(bxInstruction_c *i)
BX_CPU_THIS_PTR show_flag |= Flag_int;
#endif
#if BX_EXTERNAL_DEBUGGER
trap_debugger(0);
#endif
interrupt(1, 1, 0, 0);
BX_INSTR_FAR_BRANCH(CPU_ID, BX_INSTR_IS_INT,
BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value,