• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux How to use screen + GDB in .sh executable?

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
How to open my start.sh (who contains auto restarter) with GDB to get debug files? Im gotting crashes and need this, already installed GDB on ubuntu 18. I start my server with "start.sh", need to start with GDB.
 
Code:
#!/bin/bash
ulimit -c unlimited
while true; do ./tfs --log-file "output.txt" "error.txt"; done
 
You don't need to 'run with gdb'. You just need to type:
Code:
ulimit -c unlimited
before you start server.
As in @Loney instruction above.

After crash you will use gdb to analyze crash reason. To make information in gdb readable for C++ programmer, you need to compile TFS using:
Code:
cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo ..
(not just cmake ..)
 
Back
Top