in kernel fault handler, show preceeding symbol, not closest
This commit is contained in:
parent
1fe143ebea
commit
4fee088b62
@ -497,15 +497,13 @@ page_fault(
|
||||
size_t d;
|
||||
if (a <= r->eip) {
|
||||
d = r->eip - a;
|
||||
} else {
|
||||
d = a - r->eip;
|
||||
}
|
||||
if (d < distance) {
|
||||
closest = key;
|
||||
distance = d;
|
||||
addr = a;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(hash_keys);
|
||||
|
||||
debug_print(ERROR, "\033[1;31mClosest symbol to faulting address:\033[0m %s [0x%x]", closest, addr);
|
||||
|
Loading…
Reference in New Issue
Block a user