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: Compilation directories


On Wednesday 06 October 2004 15:39, Daniel Jacobowitz wrote:
> On Wed, Oct 06, 2004 at 10:36:49AM +0200, José Miguel wrote:
> > On Wednesday 06 October 2004 04:18, Daniel Jacobowitz wrote:
> > > There is no way to do it.  $cdir isn't a convenience variable, because
> > > there's no way for convenience variables to represent strings today.
> > > It's just text substitution in the source path searching.
> >
> > So, is there any way to work with absolute paths? I mean, if I'm
> > debugging a program
> >  mcore-elf-gdb sample.elf
> > and I type
> >  info sources
> > I get no information about paths
> >  main.c, set_led.c
> > This is always that way although executable file and sources are in
> > different directories. I know gdb knows where to find the source files
> > because if I type
> >  info source main
> > gdb asks me
> >  Current source file is main.c
> >  Compilation directory is /home/matt/proyecto/gnusample
> >  Located in /home/matt/proyecto/gnusample/main.c
> > Then, my question is if there's a way to get something like
> >  info sources
> >  /home/matt/proyecto/gnusample/main.c,
> > /home/matt/proyecto/gnusample/set_led.c I'm trying to make a front end
> > for gdb, so if I want to show the source files I need to know where to
> > find them.
>
> I recommend you use GDB 6.2, and the MI command
> -file-list-exec-source-files.  You want the "fullname" portion of the
> output.

That's exactly what I want. Thank you very much.

Jose Miguel


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