in kernel fault handler, show preceeding symbol, not closest

This commit is contained in:
K. Lange 2018-09-25 16:44:20 +09:00
parent 1fe143ebea
commit 4fee088b62

View File

@ -497,13 +497,11 @@ 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;
if (d < distance) {
closest = key;
distance = d;
addr = a;
}
}
}
free(hash_keys);