Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ Programming
➜ General
➜ GDB help
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lloyd graham
Canada (13 posts) Bio
|
Date
| Sun 17 Oct 2004 02:07 AM (UTC) |
Message
| I have been trying to use the gdb to debug my code I have done every thing in Nick's write up but for some reason when I go to access the file ( 1stmud.exe.stackdump ) it doesn’t recognize the file. I get
is not a core dump: file format not recognized
I looked and found that the stack dump needs awk so I try'd that but all I got was numbers I really need help either on how to use the awk, or what I need to do to get the core dump file on the gdb.
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 17 Oct 2004 02:40 AM (UTC) |
Message
| I found that too. If you execute under certain circumstances (eg. under Cygwin) you don't get a core dump, you just get a small text file that outlines the backtrace.
To debug, start the program under gdb, and then wait for it to crash, eg.
gdb smaug.exe |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lloyd graham
Canada (13 posts) Bio
|
Date
| Reply #2 on Sun 17 Oct 2004 08:49 AM (UTC) |
Message
| ok IM abile to run the gdb I still don't get a core dump and whenever I run the mud in gdb I get all the startup info but it then quickly shuts down and I get.
program exited with code 1
the mud keeps running but if I hit list in the gdb it keeps sending me to comm.c no matter what bug I hit I have a feeling something is going wrong this is what IM doing to get in
cygwin.exe
cd bla/bla/src
gdb 1stmud
(gdb) run
| Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #3 on Sun 17 Oct 2004 08:35 PM (UTC) |
Message
| Well, you likely need to run gdb from your area directory, and you will need to supply an argument for what port to run it on, unless your defaulting to 4000. Try this:
cygwin.exe
cd bla/bla/area
gdb ../src/1stmud
run <port number>
That should get it going. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Mon 18 Oct 2004 06:28 AM (UTC) |
Message
| If the MUD keeps running it sounds like you already have one going, it probably won't let you have two. Shut it down first, then run it under gdb. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lloyd graham
Canada (13 posts) Bio
|
Date
| Reply #5 on Tue 19 Oct 2004 01:11 AM (UTC) |
Message
| Ok I just cant get it for some reason and but I really need to know what is casing the crash so are there any other mud debuggers that you might sagest for windows | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #6 on Tue 19 Oct 2004 01:30 AM (UTC) Amended on Tue 19 Oct 2004 01:34 AM (UTC) by Nick Gammon
|
Message
| We need more information if we are going to help. Can you paste here exactly:
* What you typed; and
* What it responded
gdb is the logical debugger to use if you have compiled under Cygwin, so switching debuggers is probably not going to help. To give you an idea, this is the sort if thing I would expect to see (my input in bold):
[nick@mypc SmaugFUSS]$ ls
area Bugfixes.txt classes deity i3 races watch
asteroids building corpses doc log src
boards clans councils gods player system
[nick@mypc SmaugFUSS]$ cd area
[nick@mypc area]$ gdb ../src/smaug
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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 "i386-redhat-linux-gnu"...
(gdb) run 4000
Starting program: /home/nick/SmaugFUSS/src/smaug
Tue Oct 19 11:27:33 2004 :: Booting Database
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Tue Oct 19 11:27:33 2004 :: [*****] BOOT: ---------------------[ Boot Log ]--------------------
Tue Oct 19 11:27:33 2004 :: Loading commands
Tue Oct 19 11:27:33 2004 :: Loading sysdata configuration...
Tue Oct 19 11:27:33 2004 :: Loading socials
Tue Oct 19 11:27:33 2004 :: Loading skill table
Tue Oct 19 11:27:33 2004 :: Sorting skill table...
Tue Oct 19 11:27:33 2004 :: Remapping slots to sns
Tue Oct 19 11:27:33 2004 :: Loading classes
Tue Oct 19 11:27:33 2004 :: Loading races
Tue Oct 19 11:27:33 2004 :: Loading herb table
Tue Oct 19 11:27:33 2004 :: Loading tongues
Tue Oct 19 11:27:33 2004 :: Making wizlist
Tue Oct 19 11:27:33 2004 :: Initializing random number generator
Tue Oct 19 11:27:33 2004 :: Setting time and weather
Tue Oct 19 11:27:33 2004 :: Assigning gsn's
Tue Oct 19 11:27:33 2004 :: Reading in area files...
(help.are)
gods.are : Rooms: 1200 - 1201 Objs: 1200 - 1200 Mobs: 1200 - 1200
limbo.are : Rooms: 2 - 99 Objs: 2 - 99 Mobs: 1 - 99
newacad.are : Rooms: 10300 - 10499 Objs: 10300 - 10499 Mobs: 10300 - 10499
newgate.are : Rooms: 100 - 199 Objs: 100 - 199 Mobs: 100 - 199
newdark.are : Rooms: 21000 - 21499 Objs: 21000 - 21435 Mobs: 21000 - 21499
haon.are : Rooms: 6000 - 6156 Objs: 6000 - 6155 Mobs: 6000 - 6117
midennir.are : Rooms: 3500 - 3590 Objs: 3500 - 3550 Mobs: 3500 - 3550
sewer.are : Rooms: 7001 - 7445 Objs: 7190 - 7310 Mobs: 7000 - 7206
redferne.are : Rooms: 7900 - 7918 Objs: 7909 - 7911 Mobs: 7900 - 7900
grove.are : Rooms: 8901 - 8999 Objs: 8900 - 8919 Mobs: 8900 - 8911
dwarven.are : Rooms: 6500 - 6554 Objs: 6502 - 6519 Mobs: 6500 - 6517
daycare.are : Rooms: 6601 - 6651 Objs: 6600 - 6647 Mobs: 6600 - 6610
grave.are : Rooms: 3600 - 3651 Objs: 3600 - 3613 Mobs: 3600 - 3605
chapel.are : Rooms: 3405 - 3475 Objs: 3400 - 3430 Mobs: 3400 - 3416
astral.are : Rooms: 800 - 899 Objs: 800 - 899 Mobs: 800 - 899
Build.are : Rooms: 9500 - 9589 Objs: 0 - 0 Mobs: 0 - 0
pixie.are : Rooms: 2070 - 2099 Objs: 2070 - 2076 Mobs: 2070 - 2073
export.are : Rooms: 9810 - 9899 Objs: 9810 - 9899 Mobs: 9800 - 9899
srefuge.are : Rooms: 1500 - 1599 Objs: 1500 - 1599 Mobs: 1500 - 1599
manor.are : Rooms: 2400 - 2499 Objs: 2400 - 2499 Mobs: 2405 - 2484
unholy.are : Rooms: 2101 - 2172 Objs: 2101 - 2150 Mobs: 2101 - 2120
gallery.are : Rooms: 24800 - 24899 Objs: 24800 - 24899 Mobs: 24800 - 24899
Tue Oct 19 11:27:33 2004 :: Fixing exits
Tue Oct 19 11:27:33 2004 :: Initializing economy
Tue Oct 19 11:27:33 2004 :: Resetting areas
Tue Oct 19 11:27:33 2004 :: [*****] BUG: 'E' reset: can't give object 21055 to mob 21052.
Tue Oct 19 11:27:33 2004 :: [*****] BUG: 'E' reset: can't give object 21055 to mob 21052.
Tue Oct 19 11:27:33 2004 :: [*****] BUG: 'E' reset: can't give object 21055 to mob 21052.
Tue Oct 19 11:27:33 2004 :: Loading buildlist
Tue Oct 19 11:27:33 2004 :: ../gods/Admin
Tue Oct 19 11:27:33 2004 :: ../gods/Nick
Tue Oct 19 11:27:33 2004 :: ../gods/Helen
Tue Oct 19 11:27:33 2004 :: Loading boards
Tue Oct 19 11:27:33 2004 :: ../boards/immortal.brd
Tue Oct 19 11:27:33 2004 :: ../boards/highgod.brd
Tue Oct 19 11:27:33 2004 :: Loading clans
Tue Oct 19 11:27:33 2004 :: Loading clans...
Tue Oct 19 11:27:33 2004 :: vampire.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: druid.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: warrior.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: augurer.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: thief.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: cleric.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: mage.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: ranger.gui
Tue Oct 19 11:27:33 2004 :: Cannot open clan vault
Tue Oct 19 11:27:33 2004 :: $
Tue Oct 19 11:27:33 2004 :: Done clans
Tue Oct 19 11:27:33 2004 :: Loading councils
Tue Oct 19 11:27:33 2004 :: Loading councils...
Tue Oct 19 11:27:33 2004 :: $
Tue Oct 19 11:27:33 2004 :: Done councils
Tue Oct 19 11:27:33 2004 :: Loading deities
Tue Oct 19 11:27:33 2004 :: Loading deities...
Tue Oct 19 11:27:33 2004 :: $
Tue Oct 19 11:27:33 2004 :: Done deities
Tue Oct 19 11:27:33 2004 :: Loading watches
Tue Oct 19 11:27:33 2004 :: Loading bans
Tue Oct 19 11:27:33 2004 :: Done.
Tue Oct 19 11:27:33 2004 :: Loading reserved names
Tue Oct 19 11:27:33 2004 :: Loading corpses
Tue Oct 19 11:27:33 2004 :: Loading Immortal Hosts
Tue Oct 19 11:27:33 2004 :: Done.
Tue Oct 19 11:27:33 2004 :: Loading Projects
Tue Oct 19 11:27:33 2004 :: Loading Morphs
Tue Oct 19 11:27:33 2004 :: Done.
Tue Oct 19 11:27:33 2004 :: Initializing socket
Tue Oct 19 11:27:33 2004 :: Loading Intermud-3 network data...
Tue Oct 19 11:27:33 2004 :: [*****] BUG: I3_fread_config_file: Bad keyword: driver
Tue Oct 19 11:27:33 2004 :: [*****] BUG: I3_fread_config_file: Bad keyword: AFKMud~
Tue Oct 19 11:27:33 2004 :: Intermud-3 network data loaded.
Autoconnect not set. Will need to connect manually.
Tue Oct 19 11:27:33 2004 :: (Name Not Set) ready at address mypc on port 4000.
Tue Oct 19 11:27:36 2004 :: Sock.sinaddr: 10.0.0.3, port 4933.
Program received signal SIGSEGV, Segmentation fault.
nanny (d=0x8580ed8, argument=0xbfffe060 "nick") at comm.c:1466
1466 ch = d->character;
(gdb) bt
#0 nanny (d=0x8580ed8, argument=0xbfffe060 "nick") at comm.c:1466
#1 0x080a7060 in game_loop () at comm.c:635
#2 0x080a6945 in main (argc=1, argv=0xbfffe490) at comm.c:289
#3 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
(gdb)
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lloyd graham
Canada (13 posts) Bio
|
Date
| Reply #7 on Tue 19 Oct 2004 03:43 AM (UTC) Amended on Tue 19 Oct 2004 04:33 AM (UTC) by Lloyd graham
|
Message
| ok this is what im doing
cd C:/lcp/area
gdb ../src/1stmud
GNU gdb 2003-09-20-cvs (cygwin-special)
copyright 2003 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-cygwin
".../home/shire/.gdbinit:1: Error in sourced command file:
No stack.
(GDB) rud
Starting program: /cygdrive/c/lcp/src/1stmud.exe
oct 18 19:57:26 :: Loading mud data...
:: startup buffer :: Loading mud data...
:: Logging to ../log/6666-10-18.log
:: switching to daemon mode (background running process)
::the mud is now running in the packgroind, process id = 3264
progtam exited with code 01.
( I then load up my mud that im debuging and triger the bug)
(GDB)list
450 cmdlign_help(argv);
451 return false;
452 }
453 }
454 Return true;
455 }
456
457 Int main(int argc, char **argv)
458 {
459 Log_hold_till_commandlign_options_parsed();
(GDB)BT
No stack
(GDB)
no matter what i get sent to the comm.c on lign 450 i am doubtfull that is the problem tho
Man i cant wate till I can aford to buy a second computer for linux ;P | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #8 on Tue 19 Oct 2004 05:48 AM (UTC) |
Message
| You know you can copy and paste the screen, you don't have to retype everything? Your transcription is full of spelling mistakes, like "packgroind" for "background".
Left-click on the MSDOS icon, then select Edit -> Mark, then drag the cursor over the text, then hit Enter to copy it to the clipboard.
You need to suppress the background mode. Clearly what is happening is that the MUD is spawning a second process and that is the one that is crashing. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lloyd graham
Canada (13 posts) Bio
|
Date
| Reply #9 on Tue 19 Oct 2004 06:54 AM (UTC) |
Message
| lol oopps gess i shuld be sleeping more and not concentrating on this soo much i will try that thanx | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
25,185 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top