29、树莓派编程:调试、内存访问与ARM汇编指令详解

树莓派编程:调试、内存访问与ARM汇编指令详解

1. 调试会话示例

以下是一个调试会话的示例,展示了如何单步执行程序并显示寄存器内容:

Breakpoint 1 at 0x10074: file t1a.s, line 7.
(gdb) r 1
Starting program: /home/pi/Desktop/t1a 1
Breakpoint 1, _start () at t1a.s:7
7  _start: mov  r0,#23  @ Just three dummy operations for debugging
(gdb) si 1
8          mov  r1,#v1
9          add  r2,r0,r1
11         ldr  r1,=banner  @ Test display function (r1 has address of a string)
12         mov  r2,#15  @ Number of characters to print 13 plus two newlines)
13         mov  r0,#1  @ Tell the OS we want to print on console display
14         mov  r7,#4  @ Tell the OS we want to perform a print operation
15         svc  0  @ Call the operating system to do the printing
Test printing
17         adr  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值