Debugging under Linux: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(this was posted on hlcoders)
 
Line 15: Line 15:
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 <code>-debug</code> allows you to skip the ulimit command?}}
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 <code>-debug</code> 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:
When the server crashes, a new file appear, called "core". You can launch [http://sourceware.org/gdb/ gdb] on this coredump with this command:


  gdm ./srcds_i686 core
  gdm ./srcds_i686 core

Revision as of 13:21, 5 July 2008

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 gdb on this coredump with this command:

gdm ./srcds_i686 core

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