Summary: | Unable to debug Hello World C++ program | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Casteyde.Christian <casteyde.christian> |
Component: | CPP Debugger | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Casteyde.Christian
2004-02-08 16:52:57 UTC
Some comment that may be related: removing the libtool-shell worked for me, but the 'run'-argument specified in debugger options isn't set, i.e. if a command-line argument is needed, say a filename. The debuggerpart runs the executable without this argument: With 'libtool' (and program arguments set): --- /bin/sh -c /home/franke/cvs/sibsim/package/debug/libtool gdb /home/franke/cvs/sibsim/package/debug/src/sibsim -fullname -nx -quiet (gdb) set edit off (gdb) set confirm off Excess command line arguments ignored. ("-nx" ...) GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"... "/home/franke/cvs/sibsim/package/debug/src/sibsim": No such file or directory. /home/franke/cvs/sibsim/package/"-fullname": No such file or directory. (gdb) (gdb) --- Without 'libtool' (and program arguments set): --- gdb /home/franke/cvs/sibsim/package/debug/src/sibsim -fullname -nx -quiet (gdb) set edit off (gdb) set confirm off (gdb) (gdb) (gdb) set print static-members off (gdb) tty /dev/pts/3 (gdb) set width 0 (gdb) set height 0 (gdb) set stop-on 1 (gdb) handle SIG32 pass nostop noprint (gdb) handle SIG43 pass nostop noprint (gdb) set print asm-demangle on (gdb) cd /home/franke/cvs/sibsim/package/debug/src (gdb) run [<-------- argument not set here] [New Thread 16384 (LWP 15917)] Stopped due to shared library event (gdb) continue [Switching to Thread 16384 (LWP 15917)] Stopped due to shared library event (gdb) continue Stopped due to shared library event (gdb) continue Program exited with code 01. -- "Removing the libtool in project debugging options does solve the problem, but the template is STILL false." Technically, no. The template is correct, but the debugger plugin code is wrong. See also bug #58999 Hmmm I've read bug #58999 and this is a duplicate of that bug but I'm not sure there is a problem in the debugger code. At least i can't see it. Here's the code (minus extra lines) that start the debugger if (!shell.isEmpty()) { *dbgProcess_ << "/bin/sh" << "-c" << shell + " " +config_gdbPath_ + "gdb " + application + " -fullname -nx -quiet"; } else { *dbgProcess_ << config_gdbPath_ + "gdb" << application << "-fullname" << "-nx" << "-quiet"; } *dbgProcess_ << "/bin/sh" << "-c" << shell + " " +config_gdbPath_ + "gdb " + application + " -fullname -nx -quiet"; And this is what it produces /bin/sh -c /home/franke/cvs/sibsim/package/debug/libtool gdb /home/franke/cvs/sibsim/package/debug/src/sibsim -fullname -nx -quiet This looks fine to me as a startup command for libtool but we get the error message "Excess command line arguments ignored. ("-nx" ...)" Now Roger mentions a problem with seeing '"--fullname"' but I don't see this and Christians output above also doesn't show this type of problem as the strings seem to be expanded properly. But there is a problem :( What should we try next? Send bits of code and an explanation to everyone else that's in the dark, please :-) jbb OK, I retract comment #2. The template IS wrong. Sort of. It appears that when the debugger plugin doesn't find any settings at all it "invents" what it feels is a reasonable default - this is when the libtool option is put in despite not existing in the template. So, for the "template workaround" to work, the template needs to be explicit in not wanting a debugging shell. I'll try to fix the template(s) now.. (The larger problem (I guess from reading bug #58999) is that even with the libtool option, it should work. But does not. Correct?) /me really needs to read up on libtool... This should hopefully work now, with the updated admin files released with 3.0.1. Assuming fixed. |