设置变量:
set $abc=0x123456
使用变量:
p /x $abc 按照16进制打印
场景:可以设置一些变量地址
然后set命令放到~/.gitinit 的启动脚本中
或者如果是vsc放到配置文件的 setupCommands中加变量
"setupCommands":[
{
"description": "描述",
"text": "set $abc=0x123456",
}
]
更多vsc的配置参考:https://code.visualstudio.com/docs/cpp/launch-json-reference#_setupcommands
注意vscode中需要加-exec

本文介绍了如何在VSC(VisualStudioCode)的配置文件如launch.json的setupCommands中设置和使用变量,如`set$abc=0x123456`,并以16进制形式打印。特别提到了gitinit的脚本和VSCode配置的相关链接.
756

被折叠的 条评论
为什么被折叠?



