* "path" does not seem to work correctly
@ 2007-07-17 10:54 Mandar Mitra
2007-07-17 12:43 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Mandar Mitra @ 2007-07-17 10:54 UTC (permalink / raw)
To: gdb
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: "path" does not seem to work correctly
2007-07-17 10:54 "path" does not seem to work correctly Mandar Mitra
@ 2007-07-17 12:43 ` Daniel Jacobowitz
2007-07-17 13:46 ` Mandar Mitra
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-07-17 12:43 UTC (permalink / raw)
To: mandar.mitra; +Cc: gdb
On Tue, Jul 17, 2007 at 03:46:19AM +0000, Mandar Mitra wrote:
> But when I run "gdb smart", or "file smart" inside gdb, it still picks
> up the optimized executable from diropt/bin.
I believe that's what is supposed to happen:
`path DIRECTORY'
Add DIRECTORY to the front of the `PATH' environment variable
(the
search path for executables) that will be passed to your program.
The value of `PATH' used by GDB does not change.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: "path" does not seem to work correctly
2007-07-17 12:43 ` Daniel Jacobowitz
@ 2007-07-17 13:46 ` Mandar Mitra
0 siblings, 0 replies; 3+ messages in thread
From: Mandar Mitra @ 2007-07-17 13:46 UTC (permalink / raw)
To: mandar.mitra, gdb
On 7/17/07, Daniel Jacobowitz <drow@false.org> wrote:
> `path DIRECTORY'
> Add DIRECTORY to the front of the `PATH' environment variable
> (the
> search path for executables) that will be passed to your program.
> The value of `PATH' used by GDB does not change.
Yes, I suppose I was reading out-of-date documentation from somewhere
on the web that suggested that this would change the path for both gdb
and the program.
Thanks for clearing that up,
Mandar.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-17 12:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-17 10:54 "path" does not seem to work correctly Mandar Mitra
2007-07-17 12:43 ` Daniel Jacobowitz
2007-07-17 13:46 ` Mandar Mitra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox