吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 626|回复: 3
收起左侧

[求助] vscode调试时,如何查看非用户代码?或查看gcc编译后main函数之前的源码

[复制链接]
xcj123 发表于 2024-1-29 17:39
vscode调试时,如何查看非用户代码?或查看gcc编译后main函数之前的源码
  • c++
  • vscode

问题遇到的现象和发生背景我想查看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
  •                     }
  •                ]


image.png
(]GPX_O`X]NV6QTW0JZC93W.png

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

sai609 发表于 2024-1-29 18:10
pycharm点击导入函数,暂缓一秒钟,就弹出来
老伙计 发表于 2024-1-30 10:43
       你只能看到你自己写的代码,main() 之前的代码都是预编译好的 obj 文件,编译的时候被静态连接到了我们的 exe 中,所以,根本不可能有源代码看。
 楼主| xcj123 发表于 2024-1-30 16:58
老伙计 发表于 2024-1-30 10:43
你只能看到你自己写的代码,main() 之前的代码都是预编译好的 obj 文件,编译的时候被静态连接到了 ...

用visual studio可以看到的
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-12 11:12

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表