Debugging under Linux

From Valve Developer Community
Revision as of 13:21, 5 July 2008 by TomEdwards (talk | contribs) (this was posted on hlcoders)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Runtime debugging

TODO!

Memory dumps

Linux memory dumps are created and handled by coredump.

On many GNU/Linux distribution it is disabled by default, for security reasons. A simple command can be change this limitation :

ulimit -c 2000

2000 is in kilobytes. The command must be applied before the launch of the server.

When you add -debug parameter to srcds_run the ulimit is called with 2000 kilo bytes (like my example).

Todo: Does this franglais mean that -debug allows you to skip the ulimit command?

When the server crashes, a new file appear, called "core". You can launch [sourceware.org/gdb/ gdb] on this coredump with this command:

gdm ./srcds_i686 core

(Replace srcds_i686 by the executable really used on your system.)