diff --git a/kern/kdebug.c b/kern/kdebug.c index b66ab45..cc59033 100644 --- a/kern/kdebug.c +++ b/kern/kdebug.c @@ -180,6 +180,12 @@ debuginfo_eip(uintptr_t addr, struct Eipdebuginfo *info) // Look at the STABS documentation and to find // which one. // Your code here. + stab_binsearch(stabs, &lline, &rline, N_SLINE, addr); + if(lline <= rline) { + info->eip_line = stabs[lline].n_desc; + } else { + info->eip_line = -1; + } // Search backwards from the line number for the relevant filename