0

I would like to be able to run hp-systray from gdb to get a stacktrace and help fix a very annoying bug that's been around for a while now. However, if I try to run

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

as per the Ubuntu Wiki's article on getting a backtrace, I get the following output:

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

Furthermore, using gdb's run command returns the following:

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

Running hp-systray on its own in the terminal works as expected, so how can I get it to run from gdb?

1 Answer 1

1

hp-systray is a python script, so try:

$ gdb --args python /usr/bin/hp-systray
1
  • Thanks much! I also added on the 2>&1 | tee ~/gdb-hp-systray.txt bit from above and it still worked perfectly fine. Mar 6, 2012 at 9:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .