Reputation: 205
I suspect my gdb is accessing the wrong program location when I try to run it with "gdb [executable-name]". Is there anything I can do to have gdb output the location of the executable that's being debugged?
Upvotes: 1
Views: 1634
Reputation: 213859
I suspect my gdb is accessing the wrong program location when I try to run it with "gdb [executable-name]".
GDB will look for ./executable-name
, and then search $PATH
.
GDB info file
will tell you what binary it's currently using.
P.S. If in doubt, simply pass the absolute path to your binary explicitly: gdb /path/to/executable-name
.
Upvotes: 1