Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » dbg debugger is not working properly(and google won't help me)
icon9.gif  dbg debugger is not working properly [message #1248793] Mon, 17 February 2014 17:13 Go to next message
Anja Friede is currently offline Anja FriedeFriend
Messages: 3
Registered: February 2014
Junior Member
Hi community,

i don't get gdb to work like it should. I had different errors, but now I think i am close to a solution (which i don't find).

My breakpoints are ignored and the error belonging is this (for all breakpoints there is one message):
16-break-insert /home/ponder/workspace/dtm/trunk/dtm/main.c:114
16^error,msg="No source file named /home/ponder/workspace/dtm/trunk/dtm/main.c."
(gdb)

But the mentioned path and file are exactly the right place where my sourcecode is stored.

Just to make sure: i used the -g and the -O0 option, i installed glibc-debuginfo (4.18-4.4.1) also the 32bit version and i am running an opensuse 13.1 x64 system

I imported this project and the Makefile was already there.
I don't have any Debug folder in this project, maybe that is the reason? Why is it not made? The debugegr is running through the hole code and also stops if i click on the suspend button. I never see the code just a "disassembly" message.

Does anybody has any ideas? If you need more information, please just ask.

Thanks in advance!
Anja
Re: dbg debugger is not working properly [message #1248825 is a reply to message #1248793] Mon, 17 February 2014 17:52 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Did you specify the right executable in the Main subtab of your launch?
You can look at what is being sent as a parameter to the command -file-exec-and-symbols

Marc
Re: dbg debugger is not working properly [message #1249762 is a reply to message #1248825] Tue, 18 February 2014 15:48 Go to previous messageGo to next message
Anja Friede is currently offline Anja FriedeFriend
Messages: 3
Registered: February 2014
Junior Member
Hi Marc,

thank you for your answer, but I am not sure if i got you right.

I loaded my sourcecode in gdb in my console.

gdb$ file /home/ponder/workspace/dtm/trunk/dtm/main
Reading symbols from /home/ponder/workspace/dtm/trunk/dtm/main...done.
gdb$ info args
No frame selected.
gdb$ exec-file
No executable file now.
gdb$ symbol-file /home/ponder/workspace/dtm/trunk/dtm/main
Reading symbols from /home/ponder/workspace/dtm/trunk/dtm/main...done.


But if i let it run it runs without any problems through the whole code.
I Did not write the code by myself, i just wanted to understand it (with some help of the debugger).

The executable in my maintab of my debug config is the same as in my normal launch conig. I read, that there should be a debug folder where it points to, but in my project the debug folder does not exist, and i don't know if i have to create it manually.

Sorry for being such a noob Embarrassed
Anja

[Updated on: Tue, 18 February 2014 18:09]

Report message to a moderator

Re: dbg debugger is not working properly [message #1255498 is a reply to message #1249762] Mon, 24 February 2014 14:03 Go to previous message
Anja Friede is currently offline Anja FriedeFriend
Messages: 3
Registered: February 2014
Junior Member
Hi community,

until now i have not find my problems. I now try to debug in my console and it is not working either. So, maybe my Makefile is wrong?

.SUFFIXES: .c .u
CC= g++

LIB=../lib
GSLWRAP_LIB=../gslwrap
LOCAL_DIR=../local

CFLAGS = -g -o0 -I ${LIB} -I ${LIB}/math -I ${GSLWRAP_LIB}/include -I	\
  ${GSLWRAP_LIB}/include/gslwrap -I ${LOCAL_DIR}/include -I	\
  ${LIB}/util/gflags-1.1/src/gflags

GDB_CFLAGS = -ggdb -I ${LIB} -I ${LIB}/math -I ${GSLWRAP_LIB}/include	\
  -I ${GSLWRAP_LIB}/include/gslwrap -I ${LOCAL_DIR}/include -I		\
  ${LIB}/util/gflags-1.1/src/gflags

BASE_INCLUDES = -I ${LIB}

LDFLAGS = -L${LOCAL_DIR}/lib -L${LOCAL_DIR}/lib/stl -lgsl -lm -lgslcblas
LOBJECTS = ss-lm.o gsl-wrappers.o data.o param.o util.o lda-seq.o	\
  lda.o params.o main.o

GFLAGS = gflags.o gflags_reporting.o gflags_completions.o

all:	main

gflags:	${LIB}/util/gflags-1.1/src/gflags.cc
	$(CC) -c $(CFLAGS) \
        ${LIB}/util/gflags-1.1/src/gflags.cc \
        ${LIB}/util/gflags-1.1/src/gflags_reporting.cc \
        ${LIB}/util/gflags-1.1/src/gflags_completions.cc

main:	$(LOBJECTS) gflags
	$(CC) $(CFLAGS) $(LOBJECTS) $(GFLAGS) -o main $(LDFLAGS)

dbg:	$(LOBJECTS) gflags
	$(CC) $(GDB_CFLAGS) $(LOBJECTS) $(GFLAGS) -o main $(LDFLAGS)

clean:
	-rm -f *.o
	-rm -f main


I really really appreciate any help!!

Thank you for reading,
Anja
Previous Topic:Cannot create GDB Hardware Debugging cofiguration
Next Topic:Generating CDT projects files from g++ makefile
Goto Forum:
  


Current Time: Fri Sep 20 12:48:35 GMT 2024

Powered by FUDForum. Page generated in 0.03646 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top