11-06-2021, 08:43 PM
On 11/3/2021 at 3:26 PM, Scura said:
I want to share the solution i followed, maybe it may be useful for someone:
1) First install gdb:
yum -y update
yum install gdb
2) Attach the debug at any source file like:
gdb ./Helper
gdb ./SubHelper
gdb ./GameServer_d
...
...
...
3) When the program crash, gdb should pop up the console an allow you to type command (you can understand it because the program is ofc crashed and the console should write (gdb) with an empity line where write commands.
At this point, type "backtrace" for backtrace the bug. Gdb should show you the stack of the crashed program and the reason why it crashed!
4) Go ahead with your fix!
Note: in some cases gdb may need external dependencies for debug the program, in this case it should tell you which ones you need to install!
#Close
ty useful

