Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (30 sloc) 1.85 KB
git tag -a v0.x -m "Sandbot v0.x"
Change gamedll to addons/metamod/dlls/metamod.dll to test MetaMod. sandbot.dll should go in the same directory (but change the path in plugins.ini so it points to the top level dlls/ directory).
On Windows copy dlls/Release/vc141.pdb and dlls/Release/sandbot.pdb to symbols/
On Linux run make, git add the .so files, make symbols the git add . the .so.debug file.
gdb -s sandbot.so.debug -e sandbot.so to load Sandbot into gdb with debug symbols (if you "info functions" you'll get a per-file breakdown whereas if you do the same with gdb -e sandbot.so you won't).
Core dumps on Ubuntu
--------------------
Enable core dumps:
ulimit -c unlimited
See what generates core dumps:
sysctl kernel.core_pattern
Start Steam in debug mode:
STEAM_DEBUGGER=gdb ~/.steam/steam/steam.sh
Note that Steam games don't seem to generate core dumps, but rather generates breakpad minidumps.
Steam generates minidumps at /tmp/dumps/
Debugging minidumps
-------------------
Clone and build Google Breakpad:
git clone https://github.com/google/breakpad
cd breakpad
git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss
./configure CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 && make
If you want to recompile for 64-bit you'll need to make distclean first.
If you can an error about N_UNDF being undefined see https://stackoverflow.com/a/36455846
(in src/common/stabs_reader.h change #include <a.out.h> to #include <linux/a.out.h> and run env ac_cv_header_a_out_h=yes CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure)
Convert the minidump to a core dump:
~/Documents/breakpad/src/tools/linux/md2core/minidump-2-core /tmp/dumps/assert_*_1.dmp > out.core
Load it all up in gdb:
gdb -s ~/Documents/sandbot/symbols/sandbot.so.debug -e ~/.steam/steam/steamapps/common/Half-Life/hl_linux -c out.core
TODO: figure out loading sandbot symbols into gdb
You can’t perform that action at this time.