mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
Use nitems to get the correct number of registers to read when dumping
them. Previously this would walk past the end of the array and print whatever happened to be after the trapframe struct. MFC after: 1 week Sponsored by: DARPA, AFRL
This commit is contained in:
parent
1535414c25
commit
2e620e70f9
1 changed files with 1 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ print_registers(struct trapframe *frame)
|
|||
{
|
||||
u_int reg;
|
||||
|
||||
for (reg = 0; reg < 31; reg++) {
|
||||
for (reg = 0; reg < nitems(frame->tf_x); reg++) {
|
||||
printf(" %sx%d: %16lx\n", (reg < 10) ? " " : "", reg,
|
||||
frame->tf_x[reg]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue