Setup gdb on Fedora, Devian & Centos

Igniz

New member
Messages
56
Points
0
I'm very very VERY glad of see you again in action guys, maybe you can't remember me but i do you.... anyway, i'm back by now and i have a couple of troubles with my gdb (sadly it can't make debug info), so, in order to help you with the proyect, could you please give me a hand?

Well, this are my steps to set it (obviously after install, inside the folder):

./configure --enable-debug=gdbmake cleanmake sqlulimit -c unlimited  <----- -u?./athena-start start 
Thanks in advance /gawi

 
I've never really used --enable-debug=gdb (i dont even know whats that for) usually I just go with:

Code:
gdb ./map-server_sqlr<boom broken!>bt full<displays data>
not sure thats the result you're looking for
 
Well, long ago i used to set it in that way so, when it crashes it automatically drop a debug file for gdb for futher analysis, you don't need to run the map-server under gdb console (maybe your pc crashes and you was under gdb, the connection goes down and the whole server too, so, in this case, it's more useful set an auto debug file while you go to eat, or sleep or whtvr)

Useful links if you can't understand me

http://rathena.org/board/topic/73548-stackdump-gdbcoredump/

http://rathena.org/board/topic/63290-making-crash-dumps-with-cmake/

 
You can get core dumps which you can debug with GDB later on. Pretty neat when the server crashes for totally random reasons at totally random times. 

Also on a sidenote, unless I am totally off the linux-distro world, I think you meant Debian instead of Devian
default_tongue.png


 
@Xgear

Oh yeah, a typo, hehe

The magic is leave the server running while you do another things, like:

Code:
./map-server_sql & 
 
How does one run the map server so that when it crashes, you can type "bt full" to get the crash dump, but also run the other servers?

Doing:

gdb ./map-server_sql
r

Runs the map server, but doesn't run anything else. :/

Edit:

I did the following:

./login-server & ./char-server & gdb ./map-server

[ENTER]

r

And it seems to have launched all three services. Now, my question is, when the map server crashes, I type "bt full" to get the crash dump?

 
Last edited by a moderator:
How does one run the map server so that when it crashes, you can type "bt full" to get the crash dump, but also run the other servers?

Doing:

gdb ./map-server_sql

r

Runs the map server, but doesn't run anything else. :/

Edit:

I did the following:

./login-server & ./char-server & gdb ./map-server

[ENTER]

r

And it seems to have launched all three services. Now, my question is, when the map server crashes, I type "bt full" to get the crash dump?
you use screen to launch map server in a different virtual console, so you can keep it while not locking yourselfscreen -S mapthat creates a screen called map, then type
Code:
gdb ./map-serverr
it'll launch map server, now leave the screen so you can do anything else in the meantime. to leave current screen:
Code:
CTRL+A+D
leave it there o: now you can do anything else you like.when you want to go back to the map server console/screen:

screen -r mapnow you can type bt full or whatever else you like.

(when you're done using a screen e.g. have nothing else running in it and just want to delete it, type 'exit' while inside the screen)

 
Last edited by a moderator:
Back
Top