This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"path" does not seem to work correctly


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]