"path" does not seem to work correctly

Mandar Mitra mandar@isical.ac.in
Tue Jul 17 10:54:00 GMT 2007


Hello,

I have two versions of a program (called smart):
- one compiled with -g and located in .../src/bin
- the other compiled with -O2 (without -g) and located in .../diropt/bin

The diropt/bin directory comes first on my $PATH, but in my ~/.gdbinit
file, I've re-defined "path" so that the debuggable program comes
first:

(gdb) path
Executable and object file path: .../src/bin:/bin:...:diropt/bin:.

But when I run "gdb smart", or "file smart" inside gdb, it still picks
up the optimized executable from diropt/bin.

(gdb) file smart
Reading symbols from .../diropt/bin/smart...done.

Can someone give me some hint about what I'm doing wrong?

Thanks,
Mandar.



More information about the Gdb mailing list