From ec1f689d0db9e1839e1b5a8f67f12d19f56c85e3 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 29 Jun 2005 22:20:38 -0400 Subject: [PATCH] Easier remote debugging at boot time. sim/system.cc: Add a global variable that will tell the remote debugger to wait when a given CPU is is registered. --HG-- extra : convert_revision : a093c9331daa675d4b59a321e53a5da6ea292c40 --- sim/system.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.30.2