我有一个非常复杂的shell脚本,在其中调用我想通过GDB调试的C++程序.将c ++程序与shell分离是非常困难的,因为它有很多分支和很多环境变量设置.
有没有办法在这个shell脚本上调用GDB?看起来gdb需要我直接调用C++程序.
我正在 pyenv 管理的 virtualenv 中工作
$ which python
/Users/me/.pyenv/shims/python
Run Code Online (Sandbox Code Playgroud)
/Users/me/.pyenv/shims/python是一个 shell 脚本,gdb 不起作用
"0x7ffeeb614570s": not in executable format: file format not recognized
Run Code Online (Sandbox Code Playgroud)
如何在/sf/answers/186496271/的 python 脚本上使用 gdb 来调试我的 C 扩展的段错误?
/sf/answers/3710511241/建议gdb -ex r --args bash python crash.py,但它不起作用,同样的错误
"0x7ffee0aa4530s": not in executable format: file format not recognized
Run Code Online (Sandbox Code Playgroud)