> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 15:53:09 up 2:59, 2 users, load average: 0.33, 0.50, 0.44
This commit is contained in:
parent
15c0ad2cd5
commit
febe065b0f
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,8 @@ func_t *get_func(vaddr_t addr) {
|
||||||
int l = 0, r = func_table_len - 1;
|
int l = 0, r = func_table_len - 1;
|
||||||
while(l < r) {
|
while(l < r) {
|
||||||
int mid = l + (r - l) / 2;
|
int mid = l + (r - l) / 2;
|
||||||
if(func_table[mid].start <= addr) l = mid + 1;
|
if(func_table[mid].start <= addr) l = mid ;
|
||||||
else r = mid;
|
else r = mid - 1;
|
||||||
}
|
}
|
||||||
return &func_table[l-1];
|
return &func_table[l-1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue