- fix compile and segfault problems when configuring debugger and smp

This commit is contained in:
Christophe Bothamy 2003-08-24 10:30:07 +00:00
parent d29016ff20
commit 68f3624f66
3 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: debugstuff.cc,v 1.29 2003-08-04 16:03:09 akrisak Exp $
// $Id: debugstuff.cc,v 1.30 2003-08-24 10:30:07 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -152,7 +152,7 @@ BX_CPU_C::debug(Bit32u offset)
char char_buf[256];
unsigned isize;
if (BX_CPU(which_cpu)->protectedMode) { // 16bit & 32bit protected mode
if (BX_CPU_THIS_PTR protectedMode) { // 16bit & 32bit protected mode
Base=BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.base;
}
else {

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: dbg_main.cc,v 1.108 2003-08-12 11:23:10 akrisak Exp $
// $Id: dbg_main.cc,v 1.109 2003-08-24 10:30:07 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -5175,7 +5175,7 @@ bx_dbg_info_ivt_command(bx_num_range r)
return;
}
for (i = r.from; i < r.to; i++)
{ BX_MEM(simulator)->dbg_fetch_mem(cpu.idtr.base + i * 4, sizeof(buff), buff);
{ BX_MEM(0)->dbg_fetch_mem(cpu.idtr.base + i * 4, sizeof(buff), buff);
#ifdef BX_LITTLE_ENDIAN
seg = *(Bit16u*)(&buff[2]);
off = *(Bit16u*)(&buff[0]);
@ -5183,7 +5183,7 @@ bx_dbg_info_ivt_command(bx_num_range r)
seg = (buff[3] << 8) | buff[2];
off = (buff[1] << 8) | buff[0];
#endif
BX_MEM(simulator)->dbg_fetch_mem(cpu.idtr.base + ((seg << 4) + off), sizeof(buff), buff);
BX_MEM(0)->dbg_fetch_mem(cpu.idtr.base + ((seg << 4) + off), sizeof(buff), buff);
dbg_printf("INT# %02x > %04X:%04X (%08X) %s%s\n", i, seg, off, cpu.idtr.base + ((seg << 4) + off), bx_dbg_ivt_desc(i), (buff[0] == 0xcf) ? " ; dummy iret" : "");
}
if (tail == 1) dbg_printf ( "You can list individual entries with 'info ivt NUM' or groups with 'info ivt NUM NUM'\n");

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: logio.cc,v 1.41 2003-05-27 18:19:12 vruppert Exp $
// $Id: logio.cc,v 1.42 2003-08-24 10:30:07 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -182,7 +182,7 @@ iofunctions::out(int f, int l, const char *prefix, const char *fmt, va_list ap)
fprintf(logfd, "%011lld", bx_pc_system.time_ticks());
break;
case 'i':
fprintf(logfd, "%08x", BX_CPU(0)->dword.eip);
fprintf(logfd, "%08x", BX_CPU(0)==NULL?0:BX_CPU(0)->dword.eip);
break;
case 'e':
fprintf(logfd, "%c", c);