[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] Using Eclipse/CDT with GDB.
|
I would suggest to switch to Eclipse 2.1 and download the latest build.
Mikhail
----- Original Message -----
From: "Jon Wilson" <jdw100@xxxxxxxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Tuesday, May 06, 2003 11:54 AM
Subject: Re: [cdt-debug-dev] Using Eclipse/CDT with GDB.
> Yes, I can confirm that seems to be my problem! Just moved everything to
> another directory. Which version do you recommend using? Is there a
> patched version of this which is reasonably stable? I don't mind
> changing versions of Eclipse??? This information would be really useful
> on the webpage, possibly in the FAQ, it seems like such a silly problem
> to get stuck on, without any specific error message. If a fix cannot be
> released, then people could really do with knowing about it. Especially
> since programs are generally found in "c:\program files\" and eclipse
> defaults to saving in its workspace folder!
> Thanks very much for you help!
> Jon Wilson
>
> Mikhail Khodjaiants (QNX) wrote:
>
> >The full path of your executable contains space character. This is a bug
in
> >the version of CDT you are using.
> >
> >----- Original Message -----
> >From: "Jon Wilson" <jdw100@xxxxxxxxxxxxxxx>
> >To: "Gustafson, Geoffrey R" <geoffrey.r.gustafson@xxxxxxxxx>
> >Cc: <cdt-debug-dev@xxxxxxxxxxx>
> >Sent: Tuesday, May 06, 2003 5:06 AM
> >Subject: Re: [cdt-debug-dev] Using Eclipse/CDT with GDB.
> >
> >
> >
> >
> >>I don't think there is anything wrong with the build. I have done a
> >>project->rebuild all...
> >>
> >>mingw32-make -f Makefile clean all
> >>rm -rf hello.exe hello.o
> >>mingw32-make hello
> >>mingw32-make[1]: Entering directory `C:/Program
> >>Files/eclipse/workspace/Test'
> >>gcc -g3 -c hello.cpp
> >>gcc -g3 -o hello.exe
hello.o -L"C:\MinGW\lib\gcc-lib\mingw32\3.2" -lstdc++
> >>mingw32-make[1]: Leaving directory `C:/Program
> >>
> >>
> >Files/eclipse/workspace/Test'
> >
> >
> >>So the "-g3" is coming up and I haven't messed up with the makefile...
> >>Then with gdb everything seems quite happy...
> >>
> >>C:\Program Files\eclipse\workspace\Test>gdb hello.exe
> >>GNU gdb 5.2.1
> >>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 "i686-pc-mingw32"...
> >>(gdb) b main
> >>Breakpoint 1 at 0x4012b5: file hello.cpp, line 6.
> >>(gdb) run
> >>Starting program: C:\Program Files\eclipse\workspace\Test/hello.exe
> >>
> >>Breakpoint 1, main () at hello.cpp:6
> >>6 cout << "Hello World!\n";
> >>(gdb) n
> >>7 cin >> buff;
> >>(gdb) n
> >>8 return (0);
> >>(gdb) n
> >>9 }
> >>(gdb) n
> >>0x00401165 in __mingw_CRTStartup ()
> >>(gdb) n
> >>Single stepping until exit from function __mingw_CRTStartup,
> >>which has no line number information.
> >>
> >>Program exited normally.
> >>(gdb)
> >>
> >>I have also tried both options for the debugger in eclipse.
> >>Thanks.
> >>Jon Wilson
> >>
> >>Gustafson, Geoffrey R wrote:
> >>
> >>
> >>
> >>>I'm an Eclipse newbie, so I may not be helpful... :)
> >>>
> >>>It sounds like maybe you built from the command line and saw that gdb
> >>>worked from the command line? Try building from Eclipse and seeing if
> >>>gdb works from the command line.
> >>>
> >>>Delete your hello.exe, then build from Eclipse. Then go use the
> >>>hello.exe that Eclipse built under gdb command line. This will help
> >>>prove whether or not there are actually symbols in your Eclipse-built
> >>>hello.exe.
> >>>
> >>>You should just be able to do:
> >>>gdb hello.exe
> >>>
> >>>
> >>>
> >>>
> >>>>b main
> >>>>run
> >>>>n
> >>>>
> >>>>
> >>>>
> >>>>
> >>>etc to see it work.
> >>>
> >>>Assuming you either already did that, or you did it now and it works
> >>>fine, then yeah there must be something wrong with how the debugger is
> >>>getting run in Eclipse.
> >>>
> >>>I have only tried it with cygwin, not min/gw by itself. So that might
be
> >>>the difference.
> >>>
> >>>The only other thing I know to check is go into "Run..." and under your
> >>>run configuration for hello.exe, make sure the Debugger you have
> >>>selected is "Cygwin GDB Debugger" instead of just "GDB Debugger". I
> >>>don't think it really means "Cygwin", it means "do something special
for
> >>>Windows".
> >>>
> >>>Hope that helps, but if not I'll try using mingw tomorrow.
> >>>
> >>>Geoff Gustafson
> >>>
> >>>-----Original Message-----
> >>>From: Jon Wilson [mailto:jdw100@xxxxxxxxxxxxxxx]
> >>>Sent: Monday, May 05, 2003 4:52 PM
> >>>To: cdt-debug-dev@xxxxxxxxxxx
> >>>Subject: Re: [cdt-debug-dev] Using Eclipse/CDT with GDB.
> >>>
> >>>
> >>>Just updated gdb to 5.2.1, get the same error "gdb --version" is 5.2.1,
> >>>not using the old version by mistake.
> >>>Compile without "-g3" and when running (from CLI)...
> >>>gdb --exec=hello.exe --symbols=hello.exe
> >>> get (no debugging symbols found)
> >>>with "-g3" gdb seems quite happy.
> >>>Not really used GDB at CLI before. Have I missed something in the
> >>>options pane or something maybe?
> >>>I don't get my hello.exe listed under C/C++ application->search in the
> >>>main tab of the debug. Doing C/C++ local debug.
> >>>Any help very useful. An updated FAQ would come in very useful! Using
> >>>WinXP and Java 1.4.1_02 if that matters.
> >>>Thanks for you help.
> >>>Jon Wilson
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>_______________________________________________
> >>cdt-debug-dev mailing list
> >>cdt-debug-dev@xxxxxxxxxxx
> >>http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> >>
> >>
> >>
> >
> >_______________________________________________
> >cdt-debug-dev mailing list
> >cdt-debug-dev@xxxxxxxxxxx
> >http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> >
> >
> >
>
>
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>