Using gdb with emacs

Eli Zaretskii eliz@is.elta.co.il
Sun Sep 9 10:41:00 GMT 2001


> From: Per Bothner <per@bothner.com>
> Date: 09 Sep 2001 10:15:02 -0700
> 
> Emacs knows the full absolute pathname of the file you are
> setting a breakpoint on.  It should pass that to gdb, period.  If I
> set a breakpoint using a fully qualified absolute filename, gdb should
> be able to figure out which file I mean, period.

I don't see how can GDB do what you want; perhaps I'm missing
something.

The debug info recorded in the executable says that one of the source
files is ../foo/bar/baz.c.  How can GDB know that a file you are
visiting, whose absolute file name is /home/user/project/foo/bar/baz.c,
is that file?

What I suggested is to tell GUD that the project directory is
/home/user/project/build.  Armed with that knowledge, we could modify
GUD to produce a file name relative to /home/user/project/build, and
the result will allow GDB to identify that file in its data base.



More information about the Gdb mailing list