This is the mail archive of the gdb@sources.redhat.com 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]

Re: what is the $cdir and $cwd?


Hello Gan,

On Sat, Nov 27, 2004 at 05:26:04PM -0800, gan_xiao_jun@yahoo.com wrote:
> Is the $cwd the current working directory of the
> target?

I haven't used $cwd in remote debugging, but I think it should be the
current working directory on the host.


> And the $cdir the directory is in which the source
> file was compiled into object code?

Yes.


> And how the $cdir save to obj files (add -g when
> compile or others flags)?

At least -g seems to do that.


> Sometime even I use -g,
> when I use
> strings file.o
> I also can't find the source file name in the result,
> it that mean the source file name is not contained in
> file.o?

Seems that strings does not scan debugging sections by default; try
"strings -a file.o".


> How can I control the directory saved to obj files as
> absolute path or relative
> path?

Use absolute or relative path at the gcc command line.


With kind regards,
Baurjan.


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