Hi.
I have an trouble: some day under root user I compile program in /tmp/a
directory. Next, I remove /tmp/a, logout from root into regular user,
and tries to compile again same program, but now in my own home
directory (from clean source code - no ojbect files, no libtool
dependencies - only .cpp files). Then I started GDB, and tries to debug
my program. I was confused:
---------------8<----------------------------------------------
Breakpoint 1, main (argc=2, argv=0x7fffdf192608) at cgateway.cpp:120
120 TAgent::postAgent(cmd, channel.c_str(),
data, size);
(gdb) step
TAgent::postAgent (cmd=111, channel=0x50c3a8 "acm", retchannel=0x0,
data=0x0, size=0, bAutoRemove=true, tid=0,
safeData=0x0, safeDataSize=0) at Agent.cpp:132
132 Agent.cpp: No such file or directory
in Agent.cpp
(gdb)
---------------8<----------------------------------------------
When I restore /tmp/a directory, put where source code and start again GDB:
---------------8<----------------------------------------------
Breakpoint 1, main (argc=2, argv=0x7fffdb2aa728) at cgateway.cpp:120
120 TAgent::postAgent(cmd, channel.c_str(),
data, size);
(gdb) step
TAgent::postAgent (cmd=111, channel=0x50c3a8 "acm", retchannel=0x0,
data=0x0, size=0, bAutoRemove=true, tid=0,
safeData=0x0, safeDataSize=0) at Agent.cpp:132
132 bool TAgent::postAgent(unsigned int cmd, const char* channel,
const char* retchannel, void* data, size_t size, bool bAutoRemove, const
pthread_t tid, void* safeData, size_t safeDataSize)
(gdb)
---------------8<----------------------------------------------
I tries to get some info from GDB:
(gdb) show directories
Source directories searched: $cdir:$cwd
(gdb)
But no one hint to find /tmp/a directory.
Could you tell me, how GDB knows about /tmp/a directory?
Thanks.