Difference between revisions of "HowTo:Use GDB"

From VsWiki
Jump to: navigation, search
(Run GDB: added better newlines)
m (small case fixes)
Line 5: Line 5:
 
}}
 
}}
 
----
 
----
= Using GDB with Vega Strike =
+
= Using GDB with Vegastrike =
This page provides information on how to use GDB to help debug Vega Strike.
+
This page provides information on how to use GDB to help debug Vegastrike.
  
== Debugging Process ==
+
== Debugging process ==
=== Game Compilation ===
+
=== Game compilation ===
 
* First you have to configure Vegastrike with the <code>--enable-debug</code> option in addition to your others:<BR/><pre>./configure <your other parameters> --enable-debug</pre>
 
* First you have to configure Vegastrike with the <code>--enable-debug</code> option in addition to your others:<BR/><pre>./configure <your other parameters> --enable-debug</pre>
  
 
* Then <code>make</code> your Vegastrike binary:<BR/><pre>make</pre>
 
* Then <code>make</code> your Vegastrike binary:<BR/><pre>make</pre>
  
Please make sure you have enough disk space available before doing this. Compiling Vega Strike with <code>--enable-debug</code> eats up a huge amount of disk space.
+
Please make sure you have enough disk space available before doing this. Compiling Vegastrike with <code>--enable-debug</code> eats up a huge amount of disk space.
  
 
=== Run GDB ===
 
=== Run GDB ===
 
* Start <code>gdb</code> (GNU Debugger):<BR/><pre>gdb /path/to/vegastrike</pre>
 
* Start <code>gdb</code> (GNU Debugger):<BR/><pre>gdb /path/to/vegastrike</pre>
  
* Start the game. Type this into the gdb-console:<BR/><pre>run</pre>
+
* Start the game by typing this into the gdb-console:<BR/><pre>run</pre>
  
 
* When the error occurs or it dies type
 
* When the error occurs or it dies type
Line 31: Line 31:
 
</pre>
 
</pre>
  
== See Also ==
+
== See also ==
  
 
The content of this site is mostly take from [http://vegastrike.sourceforge.net/forums/viewtopic.php?p=4688#4688 this] post in the forum.
 
The content of this site is mostly take from [http://vegastrike.sourceforge.net/forums/viewtopic.php?p=4688#4688 this] post in the forum.

Revision as of 18:19, 22 March 2005

arrow_left.png Editing News arrow_up.png HowTo Checkout CVS arrow_right.png

Using GDB with Vegastrike

This page provides information on how to use GDB to help debug Vegastrike.

Debugging process

Game compilation

  • First you have to configure Vegastrike with the --enable-debug option in addition to your others:
    ./configure <your other parameters> --enable-debug
  • Then make your Vegastrike binary:
    make

Please make sure you have enough disk space available before doing this. Compiling Vegastrike with --enable-debug eats up a huge amount of disk space.

Run GDB

  • Start gdb (GNU Debugger):
    gdb /path/to/vegastrike
  • Start the game by typing this into the gdb-console:
    run
  • When the error occurs or it dies type
print *this
backtrace full
up
print *this
up
print *this

See also

The content of this site is mostly take from this post in the forum.


arrow_left.png Editing News arrow_up.png HowTo Checkout CVS arrow_right.png