diff --git a/dev/ide_atareg.h b/dev/ide_atareg.h index a3a2bd604..5320529c8 100644 --- a/dev/ide_atareg.h +++ b/dev/ide_atareg.h @@ -33,7 +33,14 @@ #ifndef _DEV_ATA_ATAREG_H_ #define _DEV_ATA_ATAREG_H_ +#if defined(linux) +#include +#else +#include +#endif + #define ATA_BYTE_ORDER LITTLE_ENDIAN + /* * Drive parameter structure for ATA/ATAPI. * Bit fields: WDC_* : common to ATA/ATAPI diff --git a/dev/ide_ctrl.cc b/dev/ide_ctrl.cc index 964bd01c2..defeb641b 100644 --- a/dev/ide_ctrl.cc +++ b/dev/ide_ctrl.cc @@ -103,6 +103,8 @@ IdeController::IdeController(Params *p) // setup the disks attached to controller memset(disks, 0, sizeof(IdeDisk *) * 4); + dev[0] = 0; + dev[1] = 0; if (params()->disks.size() > 3) panic("IDE controllers support a maximum of 4 devices attached!\n"); diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh index 417531cc3..d061f868e 100644 --- a/sim/syscall_emul.hh +++ b/sim/syscall_emul.hh @@ -37,6 +37,9 @@ #include #include +#ifdef __CYGWIN32__ +#include // for O_BINARY +#endif #include "base/intmath.hh" // for RoundUp #include "mem/functional/functional.hh" diff --git a/sim/system.cc b/sim/system.cc index 6f7d53f6b..47ffc4b01 100644 --- a/sim/system.cc +++ b/sim/system.cc @@ -203,6 +203,8 @@ System::breakpoint() return remoteGDB[0]->trap(ALPHA_KENTRY_INT); } +int rgdb_wait = -1; + int System::registerExecContext(ExecContext *xc, int id) { @@ -229,7 +231,8 @@ System::registerExecContext(ExecContext *xc, int id) * Uncommenting this line waits for a remote debugger to connect * to the simulator before continuing. */ - //gdbl->accept(); + if (rgdb_wait != -1 && rgdb_wait == id) + gdbl->accept(); if (remoteGDB.size() <= id) { remoteGDB.resize(id + 1);