From 28a0e5a165842bb3e5bed144cc5b64437810e4fb Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sun, 17 Jan 2016 18:27:46 -0800 Subject: sim: don't ignore SIG_TRAP By ignoring SIG_TRAP, using --debug-break when not connected to a debugger becomes a no-op. Apparently this was intended to be a feature, though the rationale is not clear. If we don't ignore SIG_TRAP, then using --debug-break when not connected to a debugger causes the simulation process to terminate at tick N. This is occasionally useful, e.g., if you just want to collect a trace for a specific window of execution then you can combine this with --debug-start to do exactly that. In addition to not ignoring the signal, this patch also updates the --debug-break help message and deletes a handful of unprotected calls to Debug::breakpoint() that relied on the prior behavior. --- src/dev/net/ns_gige.cc | 3 --- src/dev/net/sinic.cc | 1 - 2 files changed, 4 deletions(-) (limited to 'src/dev/net') diff --git a/src/dev/net/ns_gige.cc b/src/dev/net/ns_gige.cc index a1dc23b50..3bf048972 100644 --- a/src/dev/net/ns_gige.cc +++ b/src/dev/net/ns_gige.cc @@ -951,7 +951,6 @@ NSGigE::cpuIntrPost(Tick when) intrTick = when; if (intrTick < curTick()) { - Debug::breakpoint(); intrTick = curTick(); } @@ -1725,7 +1724,6 @@ NSGigE::txKick() tcp->sum(cksum(tcp)); txTcpChecksums++; } else { - Debug::breakpoint(); warn_once("TCPPKT set, but not UDP!\n"); } } @@ -1735,7 +1733,6 @@ NSGigE::txKick() ip->sum(cksum(ip)); txIpChecksums++; } else { - Debug::breakpoint(); warn_once("IPPKT set, but not UDP!\n"); } } diff --git a/src/dev/net/sinic.cc b/src/dev/net/sinic.cc index d0adb1016..fc75c9ebe 100644 --- a/src/dev/net/sinic.cc +++ b/src/dev/net/sinic.cc @@ -527,7 +527,6 @@ Base::cpuIntrPost(Tick when) intrTick = when; if (intrTick < curTick()) { - Debug::breakpoint(); intrTick = curTick(); } -- cgit v1.2.3