加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何在GDB中运行.sh(shell脚本)文件?

发布时间:2020-12-15 17:02:02 所属栏目:安全 来源:网络整理
导读:我有一个名为’simple’的脚本文件.我可以使用./simple运行它,一切正常. 我需要在GDB中运行此文件以回溯一个特定参数的更改方式以及调用的函数.当我尝试 (gdb) file simple “/home/examples/simple”: not in executable format: File format not recognize
我有一个名为’simple’的脚本文件.我可以使用./simple运行它,一切正常.

我需要在GDB中运行此文件以回溯一个特定参数的更改方式以及调用的函数.当我尝试

(gdb) file simple

“/home/examples/simple”: not in executable format: File format not recognized

(gdb) r simple

Starting program: simple

No executable file specified.

Use the “file” or “exec-file” command.`

我怎么能克服这个?

GDB是编译语言(如C/C++)的调试器,不适用于shell脚本.如果需要调试Bash脚本,可以使用 -x flag.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读