[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] Using Eclipse/CDT with GDB.
|
>
> I am trying to get the GDB to work with eclipse. I have version
> 2.0.2 of eclipse and CDT
> org.eclipse.cdt-200212181146-win32_1.0.1.bin.dist.zip
> the latest stable version I think and the latest MingW (I can get the
> version if it matters).
>
> I have basically tried the sample cpp code on the FAQ and I have a
> slightly modified Makefile (which builds nonetheless), however, on
> debug, I get...
> "Unable to set temporary breakpoint in main. Reason: No symbol table
> loaded. Use "file" command. Continue?"
>
Is the version of mingw gdb at least gdb-5.2.1 and above ?
Do you have a .gdbinit in the way.
What happens if you do it on the command line ? i.e. run gdb on the executable.
> However I have included "-g3" in my makefile to get gcc to generate the
> debug information.
> Do you have any idea why this isn't working?
> Below are my source and makefile...
>
> LIBS = -L"C:\MinGW\lib\gcc-lib\mingw32\3.2" -lstdc++
> OBJ = hello.o
> CFLAGS = -g3
> GCC = gcc
>
> hello : $(OBJ)
> $(GCC) $(CFLAGS) -o hello.exe $(OBJ) $(LIBS)
>
> $(OBJ) : hello.cpp
> $(GCC) $(CFLAGS) -c hello.cpp
>
> all :
> ${MAKE} hello
>
> .PHONY : clean
> clean :
> rm -rf hello.exe $(OBJ)
> ///////////////////////////////////////////////////////////////////////////////////////////////
> #include <iostream>
> #include <cstdlib>
> using namespace std;
> int main()
> {
> char buff[128];
>
> cout << "Hello World!\n";
> cin >> buff;
> return (0);
> }