debug的配置文件
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "gdb-multiarch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/program.elf",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb-multiarch",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Connect to remote target",
"text": "target remote 127.0.0.1:1234",
"ignoreFailures": true
},
{
"description": "Set target architecture to RISC-V",
"text": "set architecture riscv:rv64",
"ignoreFailures": true
},
],
"logging": {
"exceptions":true,
"moduleLoad": false,
"programOutput": true,
"trace": true,
"engineLogging": true
},
}
]
}
debug效果
如何显示内存呢?
我使用的是这个插件:
risc-v 默认是小端排序,现实的也是小端
内存显示的配置页面:
这个是1个字节排序结果
这个是8个字节排序结果
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。