GDB .... no debugging symbols found

H

Hug

Hello everybody

I try to use gdb to debug my program
but i have this message :

---------------------------
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 "i686-pc-linux-gnu"...(no debugging symbols found)...
------------------------------


When I type bt I have not informations, just that :
----------------------------------
#0 0x08053bd3 in strcpy ()
#1 0x081038c8 in ?? ()
#2 0x08051984 in strcpy ()
#3 0x0804dfe0 in strcpy ()
#4 0x0805aa73 in strcpy ()
#5 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
------------------------------------------------
not very helpful ;)


I can copy my Makefile to show and tell me where I am wrong:
------------------------------------------------------
### PROJECT MAKEFILE ##

EXEC := gwrap
LIBS := ireader owriter

### DO NOT EDIT PAST THIS POINT ###

# compiler flags
export CXX := g++
export CXXFLAGS := -g -Wall -O2
LDFLAGS := -s
CPPFLAGS := $(foreach lib,$(LIBS),-I$(lib))
RM := rm -f

# files
SRCS := $(wildcard *.cpp)
OBJS := $(SRCS:.cpp=.o)
ALIBS := $(foreach lib,$(LIBS),$(lib)/$(lib).a)

# Windows specific
ifeq ($(OS), Windows_NT)
RM := del
EXEC := $(EXEC).exe
ALIBS := $(subst /,\,$(ALIBS))
endif

# link
all: $(OBJS) $(ALIBS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(EXEC) $^


# library archive
%.a:
$(MAKE) $@ -C $(*D)

# depend
..PHONY: depend
depend:
$(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $(SRCS) >$@
-include depend

# clean
mostlyclean:
$(RM) $(OBJS) $(EXEC) depend
clean:
$(RM) $(OBJS) $(ALIBS) $(EXEC) depend
 
V

Victor Bazarov

Hug said:
Hello everybody

I try to use gdb to debug my program
but i have this message :

This is off-topic here. Please consider posting to a newsgroup
dedicated to the tool you're using or to the OS you're on.

V
 
M

modemer

Sure, this group is not the most suitable group for this question even
though you suppose C/C++ guys should have more experience on gdb or make.
Anyway, for saving your time, I try to answer this question here.

insert the following lines:
%.o:
$(CXX) $(CXXFLAGS) -c $<
 
T

Thomas Matthews

modemer said:
Sure, this group is not the most suitable group for this question even
though you suppose C/C++ guys should have more experience on gdb or make.
Anyway, for saving your time, I try to answer this question here.

insert the following lines:
%.o:
$(CXX) $(CXXFLAGS) -c $<

If I am using Borland Builder and their IDE,
I never see a makefile. The same is true when
I am using Visual Studio C++.

Nowadays, with IDE's everywhere, why would people
have much experience with make?

Why do you assume people have experience with
gdb? After all, isn't Microsoft C++ the world
leader and if you use their product you have no
need for anything else {heavy sarcasm here}.

BTW, please don't top-post. You've read the
articles and know the policy.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
M

modemer

Thomas Matthews said:
If I am using Borland Builder and their IDE,
I never see a makefile. The same is true when
I am using Visual Studio C++.

You couldn't see a makefile doesn't mean other people are same as you.
Nowadays, with IDE's everywhere, why would people
have much experience with make?

Why do you assume people have experience with
gdb? After all, isn't Microsoft C++ the world
leader and if you use their product you have no
need for anything else {heavy sarcasm here}.

Looks like Windows world is all of your world :)
BTW, please don't top-post. You've read the
articles and know the policy.

sorry, why do you assume people have read the articles and the policy?
 
T

Thomas Matthews

modemer said:
You couldn't see a makefile doesn't mean other people are same as you.
Did _you_ write this?
Seems like you believe that everybody should be using gdb.
Do you read what you write?
Looks like Windows world is all of your world :)
Actually, my world consists of 80% embedded systems,
5% Unix/Linux, and 10% Microsoft windows.

My compilers consist of:
Metaware High C/C++, Greenhills, ARM Ltd., Tasking,
Intel, Microsoft, Borland and GNU.

I just hate when people are not open-minded and
believe that everybody in the world has their
platform, or are ignorant and believe that their
platform is the only one that exists.
sorry, why do you assume people have read the articles and the policy?
Thanks for complying to the policy.
Now, read the FAQ. See below.

Do you always need to have the last word in a
discussion?

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
H

Hug

modemer said:
Sure, this group is not the most suitable group for this question even
though you suppose C/C++ guys should have more experience on gdb or make.
Anyway, for saving your time, I try to answer this question here.

insert the following lines:
%.o:
$(CXX) $(CXXFLAGS) -c $<

Thks a lot, you save a lot of my time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top