sim: don't ignore SIG_TRAP
Review Request #3074 - Created Aug. 23, 2015 and submitted
Information | |
---|---|
Steve Reinhardt | |
gem5 | |
default | |
Reviewers | |
Default | |
Changeset 11062:fbce13fdad11
---------------------------
sim: don't ignore SIG_TRAPBy ignoring SIG_TRAP, using --debug-break <N> 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 <N> 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.
Ship It!
I think this makes sense, but I think this might breaks some of the assumptions of the Debug::breakpoint() call. This call seems to be sprinkled across NSGigE and Sinic devices. It seems like the author of those devices assumed that Debug::breakpoint() would be a no-op if a debugger isn't connected. Do we need to get rid of those calls before this change goes in? Or is the assumption that those devices are broken and no longer in use?
Change Summary:
Extended prior patch to (1) delete the calls to Debug::breakpoint() Andreas pointed out and (2) update --debug-break help message.
Diff: |
Revision 2 (+5 -16) |
---|
Description: |
|
---|
Ship It!