for patch discussion.
Thanks,
Tao Liu
On Sat, Feb 14, 2026 at 12:52 AM neilfsun <loyou85(a)gmail.com> wrote:
When using "dis -lr xxx+0x1", it is not correctly shown, for example:
crash> dis -lr rb_next+0x1
/kernel/lib/rbtree.c: 445
0xffffffff8133ff60 <rb_next>: push %rbp
However, dis -lr rb+next+0x4 is correctly shown,
crash> dis -lr rb_next+0x4
/kernel/lib/rbtree.c: 445
0xffffffff8133ff60 <rb_next>: push %rbp
/kernel/lib/rbtree.c: 448
0xffffffff8133ff61 <rb_next+0x1>: mov (%rdi),%rdx
/kernel/lib/rbtree.c: 445
0xffffffff8133ff64 <rb_next+0x4>: mov %rsp,%rbp
The reverse mode only disassembled (target - function_start) bytes, which
was insufficient to reach the target instruction.
Signed-off-by: neilfsun <neilfsun(a)tencent.com>
Signed-off-by: Feng Sun <loyou85(a)gmail.com>
---
kernel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel.c b/kernel.c
index bb148d0..72d7559 100644
--- a/kernel.c
+++ b/kernel.c
@@ -2120,7 +2120,7 @@ cmd_dis(void)
if (reverse)
sprintf(buf5, "x/%ldi 0x%lx",
- (target - req->addr) ? target - req->addr : 1,
+ req->flags & GNU_FUNCTION_ONLY ? 1: req->addr2
- req->addr,
req->addr);
else
sprintf(buf5, "x/%ldi 0x%lx",
--
2.52.0
--
Crash-utility mailing list -- devel(a)lists.crash-utility.osci.io
To unsubscribe send an email to devel-leave(a)lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines:
https://github.com/crash-utility/crash/wiki