如何从 gdb 运行 hp-systray?

如何从 gdb 运行 hp-systray?

我希望能够运行hp-systraygdb获取堆栈跟踪并帮助修复一个非常烦人的漏洞这已经存在一段时间了。但是,如果我尝试运行

gdb hp-systray 2>&1 | tee ~/gdb-hp-systray.txt

根据 Ubuntu Wiki 的文章在获取回溯时,我得到以下输出:

GNU gdb (Ubuntu/Linaro 7.4-0ubuntu1) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/usr/bin/hp-systray": not in executable format: File format not recognized

此外,使用gdb命令run将返回以下内容:

(gdb) run
Starting program:  
No executable file specified.
Use the "file" or "exec-file" command.

hp-systray在终端上自行运行可以按预期进行,那么我该如何让它运行呢gdb

答案1

hp-systray是一个 Python 脚本,因此请尝试:

$ gdb --args python /usr/bin/hp-systray

相关内容