摘要: gdb默认无法调试宏函数,需要做以下特殊处理 1. 把项目中的宏函数展开 修改Makefile,产生所有中间文件: gcc -E -P *.c -o *.i 使用 -P 的原因是去掉 linemarkers,因为linemarker会给gdb提供调试信息,linemarker存在的话,gdb在调试可 阅读全文
posted @ 2022-08-07 23:24 yinhuachen 阅读(696) 评论(0) 推荐(1) 编辑
摘要: 1. hexdump 一个例子:hexdump -e '2/4 "%08x " "\n"' build/dummy-riscv64-nemu.bin 2. xxd https://unix.stackexchange.com/questions/282215/how-to-view-a-binary 阅读全文
posted @ 2022-08-07 21:42 yinhuachen 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 看这里:https://en.wikichip.org/wiki/risc-v/registers 阅读全文
posted @ 2022-08-07 18:42 yinhuachen 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #: ##:粘连两个符号 答案来源:https://blog.csdn.net/qq_37858386/article/details/78919163 阅读全文
posted @ 2022-08-07 18:13 yinhuachen 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 使用好 gcc 和 objdump 的组合 来源:https://stackoverflow.com/questions/70154049/how-can-i-resolve-risc-v-assembly-pseudo-instructions-to-true-risc-v-instruction 阅读全文
posted @ 2022-08-07 14:15 yinhuachen 阅读(56) 评论(0) 推荐(0) 编辑