GDB integration problem

Matt Rogers mattr at kde.org
Sun Mar 11 04:32:37 UTC 2007


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
> what I do.
>
> It gives the following output:
>
> gdb /home/shane/workspace/neatl/BIN/neatl -fullname -quiet
> (gdb) set edit off
> (gdb) set confirm off
> Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
> (gdb) (gdb)
> (gdb) set print static-members off
> (gdb) tty /dev/pts/0
> (gdb) set width 0
> (gdb) set height 0
> (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.
>
> Thanks,
>
> Shane

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.

Thanks
-- 
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070310/b6ddf194/attachment.sig>


More information about the KDevelop-devel mailing list