GDB integration problem

Andreas Pakulat apaku at gmx.de
Sun Mar 11 09:46:53 UTC 2007


On 10.03.07 22:32:37, Matt Rogers wrote:
> On Saturday 10 March 2007 07:54, Shane R wrote:
> > I am setting a breakpoint via KDevelop but GDB won't pick it up no matter
> > (gdb) set stop-on 1
> > (gdb) handle SIG32 pass nostop noprint
> > (gdb) handle SIG41 pass nostop noprint
> > (gdb) handle SIG42 pass nostop noprint
> > (gdb) handle SIG43 pass nostop noprint
> > (gdb) set print asm-demangle on
> > (gdb) set output-radix 10
> > (gdb) cd /home/shane/workspace/neatl/BIN
> > (gdb) break /home/shane/workspace/neatl/neatl.cpp:16
> > No source file named /home/shane/workspace/neatl/neatl.cpp.
> > (gdb) run
> > Stopped due to shared library event
> > (gdb) break /home/shane/workspace/neatl/neatl.cpp:16
> > No source file named /home/shane/workspace/neatl/neatl.cpp.
> > (gdb) continue
> > Stopped due to shared library event
> > (gdb) break /home/shane/workspace/neatl/neatl.cpp:16
> > No source file named /home/shane/workspace/neatl/neatl.cpp.
> > (gdb) continue
> >
> > The important part is that it can't find the source file but the file is
> > definitely there.
> >
> > If I run GDB from the command line it can find the file. If I run a simpler
> > test project the breakpoint works. What the &^*^&*^ is going on? I am quite
> > new to Linux development so I am sure it is something very stupid that I am
> > doing.
> >
> > Below is my makefile. Don't laugh if I am doing anything really stupid. I
> > have gone over every line of it and verifed that all the files are where
> > the makefile believes they are. Also the program compiles and runs. Just
> > GDB when run via KDevelop can't find them!! I am using KDevelop 3.3.4 in
> > Gnome Ubuntu.
> 
> Open the "Project Options" dialog, and scroll down to the "Run Options" page. 
> Have you entered a working directory into the working directory field? If 
> not, try adding the root directory of your project to that field (in your 
> case the directory to add would be "/home/shane/workspace/neatl") and see if 
> that allows gcc to find the sources.
> 
> If that works, you should probably file a bug on bugs.kde.org saying basically 
> the same thing that you say in this email: that the gdb integration doesn't 
> add the project's source directories to gdb's list of directories to search  
> in for sources when setting breakpoints.

Unless I'm totally mistaken the filenames are built into the binary as
absolute pathnames. Thus if gdb doesn't find the source files this
indicates a gdb bug as Vladimir suggests.

Andreas

-- 
Never give an inch!




More information about the KDevelop-devel mailing list