在写一个小型的操作系统内核,使用go语言,plan9汇编中有如下代码:
TEXT ·sys_clone(SB), NOSPLIT, $0
MOVL $SYS_clone, AX
MOVL pc+0(FP), DX
MOVL stack+4(FP), CX
INT $0x80
// In parent, return.
CMPL AX, $0
JEQ 3(PC)
MOVL AX, tid+8(FP)
RET
NOP SP // tell vet SP changed - stop checking offsets
JMP DX
当下一句是INT $0x80时,继续next或者step就会遇到问题:
求助大家,帮帮孩子吧!
参考一下:https://blog.csdn.net/zoomdy/article/details/17249165
[lyl@localhost src]$ file build/kernel-386.bin
build/kernel-386.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
[lyl@localhost src]$ gdb --version
GNU gdb (GDB) Fedora 7.12-24.fc25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
调试环境:Fedora 25 X86平台
刚进去调试的时候没有异常,但step到INT $0x80的时候突然就 “cannot find bounds of current function”。
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632