Bug reporting

Login to reply  Page: « < 1 of 1 > »
24 May 2009 - 09:591519
Bug reporting
Just noticed that there's no howto on bug reporting on this board, so I'll take modified version of the one at the CWG forums (also by me :P).

When debugging (which is what you're doing at the moment) NEVER EVER (*) run the autorun script. It will mask your debugging output - the log output will be redirected, etc.

Either
a) run your executable directly: "bin/circle". Crash the mud. Then run gdb on the core file: "gdb lib/core" if there is one. If there isn't, then

b) run your executable through gdb: "gdb bin/circle", "run" (**) (if you get a SIGPIPE stop here, "cont" once). Crash the mud.

Do a backtrace - "bt" - and repeat the following until you can't go higher: "list" followed by "info local" and then "up".

Thus, a typical debugging session looks like this:

gdb bin/circle 
<gdb output> 
gdb> run 
<mud log - it's usually helpful to include the last couple of lines.> 
Program received SIGSEV in some_function(someparamaters)  somefile.c:1223 
gdb> bt 
#0 0x234235 some_function(someparamaters)  somefile.c:1223 
#1 0x343353 foo(bar) foo.c:123 
#2 0x12495b baz(0x0000000) baz.c:3 
gdb> list 
1219 
1220    foobar = something_interesting(); 
1221 
1222    foobar = NULL; 
1223    free(foobar); 
1224  } 
1225 
1226 
1227  next_function_in_somefile_c(void) 
gdb> info local 
foobar = NULL
gdb> up 
frame #1  0x343353 foo(bar) foo.c:123 
gdb> list 
<similar output to the above, but different file> 
gdb> info local 
<similar output to the above, but different variables> 
gdb> up 
frame #2 0x12495b baz(0x0000000) baz.c:3 
gdb> list 
<similar output to the above, but different file> 
gdb> info local 
<similar output to the above, but different variables> 
gdb> up 
You are already at the top frame. 

Do this, and post your output to this forum. All from the last lines in the mudlog, and to the ending line.

(*) sorry about the caps, but I hope other people will read this as well, as it's a reoccurring issue.
(**) if you need to pass parameters to your executable, for instance a port number, add them after the "run" command, like this: "run 4001".


__________________
You know who I am.
Login to reply  Page: « < 1 of 1 > »