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]

Re: trouble locating source files through relative paths


On Tue, Aug 23, 2005 at 10:49:11AM -0400, Daniel Jacobowitz wrote:
> On Tue, Aug 23, 2005 at 07:40:28AM -0400, Bob Rossi wrote:
> > On Tue, Aug 23, 2005 at 07:31:38AM -0400, Bob Rossi wrote:
> > > On Tue, Aug 23, 2005 at 03:03:29PM +1000, Craig Jeffree wrote:
> > > > On Fri, 2005-08-19 at 08:43 -0400, Bob Rossi wrote:
> > > > > What was the 'dir' command that you issued? What compiler are you using?
> > > > > Do you know what debug format you are using? (stabs or dwarf)?
> > > > 
> > > > The dir command that I issued was:
> > > > (gdb) dir /staff/taam/taam/bin/x86-Linux/nostrip/
> > > > Source directories searched: /staff/taam/taam/bin/x86-Linux/nostrip:
> > > > $cdir:$cwd
> > > > 
> > > > I'm using gcc 3.2.3 with the default debug format for x86-Linux (dwarf2
> > > > I believe).
> > > 
> > > Is this problem reproducable in a small example?
> > 
> > Geez, actually, I did just reproduce the problem. It seems that the only
> > current solution to get it to work is to do as you said, put the path to
> > where the include file is, not to where the relative path to it is.
> > 
> > I'll look into this.
> 
> Great!  Yeah, I've seen this one before - I posted a (less thorough!)
> analysis of it back when openp.exp was posted.  I would _love_ to see
> this fixed.  IIRC, you can also trigger it by using -I../include and
> trying to list code in a header file; I had a test case in the
> gdb-patches archives somewhere but never had time to track it down.

Exactly, this is how I reproduced it. Trying to open code in a header
via ../inc. The funny thing is, 'info sources' finds the file after the
dir command is added. This tells me that psymtab_to_fullname is working.

What's not working is the list command. That could be the problem.

Bob Rossi


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