问题遇到的现象和发生背景
我想查看main函数之前发生了什么,main函数是怎样被调用的,在Visual Studio 中可以在堆栈窗口转到源代码,之后我想看看gcc编译下的main函数是怎么被调用的,我就利用vscode查看,但是堆栈窗口显示未知源,似乎只能转到汇编代码,请问怎么能转到源代码?
操作环境、软件版本等信息
vs2022,vscode1.8
尝试过的解决方法
配置launch.json,
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
},
{
"description": "显示非用户代码",
"text": "-interpreter-exec console \"set unwindonsignal on\"",
"ignoreFailures": true
},
{
"description": "Disable Just-In-Time Compilation",
"text": "-interpreter-exec console \"set jit off\"",
"ignoreFailures": true
}
]