cvs commit: src/sys/ia64/ia64 trap.c
Marcel Moolenaar
marcel at FreeBSD.org
Mon Jun 27 23:51:38 GMT 2005
marcel 2005-06-27 23:51:38 UTC
FreeBSD src repository
Modified files:
sys/ia64/ia64 trap.c
Log:
Handle B-unit break instructions. The break.b is unique in that the
immediate is not saved by the architecture. Any of the break.{mifx}
instructions have their immediate saved in cr.iim on interruption.
Consequently, when we handle the break interrupt, we end up with a
break value of 0 when it was a break.b. The immediate is important
because it distinguishes between different uses of the break and
which are defined by the runtime specification.
The bottomline is that when the GNU debugger replaces a B-unit
instruction with a break instruction in the inferior, we would not
send the process a SIGTRAP when we encounter it, because the value
is not one we recognize as a debugger breakpoint.
This change adds logic to decode the bundle in which the break
instruction lives whenever the break value is 0. The assumption
being that it's a break.b and we fetch the immediate directly out
of the instruction. If the break instruction was not a break.b,
but any of break.{mifx} with an immediate of 0, we would be doing
unnecessary work. But since a break 0 is invalid, this is not a
problem and it will still result in a SIGILL being sent to the
process.
Approved by: re (scottl)
Revision Changes Path
1.113 +50 -1 src/sys/ia64/ia64/trap.c
More information about the cvs-src
mailing list