%eax
我是组装新手,这是我一直在做的总结,我打算在加载点之前设置一个断点$Number
,然后通过发出c
(继续)查看插入的值,但程序显示它已设置断点,当我运行它时,它只是没有达到断点
程序:
.data
Number:
.int 36
.text
.globl _start
_start:
movl $Number, %eax
movl $1, %eax
movl $0, %ebx
int $0x80
组装和链接
root@bt:~/Arena# ls
a.s
root@bt:~/Arena# as --gstabs a.s
root@bt:~/Arena# ld -o out a.out
root@bt:~/Arena# ./out
root@bt:~/Arena#
在广发银行
root@bt:~/Arena# gdb ./out
GNU gdb (GDB) 7.1-ubuntu
Copyri ... <blab> <blab> ...
Reading symbols from /root/Arena/out...done.
(gdb) list
1 .data
2 Number:
3 .int 36
4 .text
5 .globl _start
6 _start:
7 movl $Number, %eax
8 movl $1, %eax
9 movl $0, %ebx
10 int $0x80
(gdb) b 7
Breakpoint 1 at 0x8048074: file a.s, line 7.
(gdb) run
Starting program: /root/Arena/out
Program exited normally.
(gdb)