Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yandex, Yahoo!

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » GDB and EOS2
Forum Rules | Mark all | Recent Posts

GDB and EOS2
< Newer Topic :: Older Topic > Gibberish!

Pages:<< prev 1 next >>
Post is unread #1 Jun 27, 2006, 8:09 pm   Last edited Jun 28, 2006, 5:41 pm by Sanami
Go to the top of the page
Go to the bottom of the page

Sanami

GroupMembers
Posts3
JoinedApr 25, 2004

I have a problem with my EOS2 code crashing when a mprog or sedit is used wrong. When I go into gdb and try to find the problem all I get is something that looks like this:


Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
Using host libthread_db library "/lib/libthread_db.so.1".
Loaded system supplied DSO at 0x694000
Core was generated by `../bin/abyss 8456'.
Program terminated with signal 11, Segmentation fault.
#0 0x0071c907 in ?? ()
(gdb) bt
#0 0x0071c907 in ?? ()
#1 0x00000009 in ?? ()
#2 0x00000025 in ?? ()
#3 0x3b305b1b in ?? ()
#4 0x37333b31 in ?? ()
#5 0xbfea006d in ?? ()
#6 0x0809e191 in ?? ()
#7 0x0937d400 in ?? ()
#8 0xbfea194c in ?? ()
#9 0x007e2158 in ?? ()
#10 0x0937a288 in ?? ()
#11 0x0000000d in ?? ()
#12 0xb7cf61b1 in ?? ()
#13 0xbfea1928 in ?? ()
#14 0x08094ca8 in ?? ()
#15 0x00000000 in ?? ()


Any suggestions on how to get it to something I could possible understand?


       
Post is unread #2 Jun 28, 2006, 6:09 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Post your Makefile. Specifically the part where the -g flag is at. The first thing we need to know is are the debugging symbols being added.

If they are, then what you have here is a corrupted stack. Pinning down a corrupted stack isn't easy when the first frame is a NULL pointer. You may need to drag Valgrind into this.
       
Post is unread #3 Jun 28, 2006, 5:40 pm   Last edited Jun 28, 2006, 6:23 pm by Sanami
Go to the top of the page
Go to the bottom of the page

Sanami

GroupMembers
Posts3
JoinedApr 25, 2004

My core is in my log dicrectory my executable is in bin dirc and source files in src. As long as i give the right path is that ok?

Ok so heres my Makefile:

#Changes By Kizeren of Abyss



CC = gcc
PROF = -ggdb
OPTOMIZ = -O2 -DNOCRYPT
DEBUG = -g3
WARN = -Wall
#C_FLAGS = $(PROF) $(OPTOMIZ) $(WARN) $(DEBUG)
C_FLAGS = -c -O -Wall -g3
L_FLAGS = -g3
IMC = 1
SYSTEM =



C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c comm.c const.c \
db.c fight.c handler.c magic.c save.c special.c update.c remort.c \
bit.c mem.c olc.c olc_act.c olc_save.c string.c mob_commands.c \
mob_prog.c gr_magic.c id.c chat_new.c interp.c random_obj.c war.c \
chat_act.c ore_prog.c quest.c raceskill.c act_room.c track.c scan.c \
marry.c change.c sha256.c



ifdef IMC
C_FILES := imc.c $(C_FILES)
O_FILES := imc.o $(O_FILES)
C_FLAGS := $(C_FLAGS) -DIMC -DIMCMERC
endif


O_FILES := $(patsubst %.c,o/%.o,$(C_FILES))


abyss: $(O_FILES)
# @echo "."
@echo "^[[1;35mBuilding ^[[1;31mAbyss ^[[1;32mMud^[[0;37m"
rm -f ../bin/abyss
$(CC) $(L_FLAGS) -o ../bin/abyss $(O_FILES) -lcrypt
@echo "Done."

clean:
rm -f o/*.o
rm -f ../bin/abyss
make

.c,o/%.o: merc.h
# @echo -n "."
$(CC) -c $(C_FLAGS) $(SYSTEM) $<



o/%.o: %.c
# @echo "Compling Abyss....."
$(CC) -c $(C_FLAGS) $< -o $@
       
Post is unread #4 Jun 28, 2006, 8:40 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

The -g3 in your C_FLAGS is more than good enough. So your stack is being corrupted somehow. You need to get Valgrind involved.
       
Pages:<< prev 1 next >>