Difference between revisions of "HowTo:Use GDB"

From VsWiki
Jump to: navigation, search
(Game Compilation: added better newlines + code tags)
m ([vega-bot] [replace] 1 instances of 'http://vegastrike.sourceforge.net/forums' for 'http://forums.vega-strike.org')
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Edit News|Editing News]]
+
| previous=[[HowTo:Compile_from_released_source|Compile from the released source]]
| up=[[HowTo]]
+
| up=[[HowTos]]
| next=[[HowTo:Checkout CVS|Checkout CVS]]
+
| next=[[HowTo:Use Dr Watson|Use Dr Watson]]
 
}}
 
}}
 
----
 
----
= 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 gdb (GNU Debugger):
+
* Start <code>gdb</code> (GNU Debugger):<BR/><pre>gdb /path/to/vegastrike</pre>
gdb /path/to/vegastrike
 
  
* Start the game. Type this into the gdb-console:
+
* Start the game by typing this into the gdb-console:<BR/><pre>run</pre>
run
 
  
 
* When the error occurs or it dies type
 
* When the error occurs or it dies type
print *this
+
<pre>
backtrace full
+
print *this
up
+
backtrace full
print *this
+
up
up
+
print *this
print *this
+
up
 +
print *this
 +
</pre>
  
== See Also ==
+
==See also==
 +
 
 +
The content of this site is mostly take from [http://forums.vega-strike.org/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.
 
 
----
 
----
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Edit News|Editing News]]
+
| previous=[[HowTo:Compile_from_released_source|Compile from the released source]]
| up=[[HowTo]]
+
| up=[[HowTos]]
| next=[[HowTo:Checkout CVS|Checkout CVS]]
+
| next=[[HowTo:Use Dr Watson|Use Dr Watson]]
 
}}
 
}}
  
[[Category:HowTo|Using GDB]]
+
[[Category:HowTos|Using GDB]]

Latest revision as of 23:30, 8 January 2013

arrow_left.png Compile from the released source arrow_up.png HowTos Use Dr Watson 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 Compile from the released source arrow_up.png HowTos Use Dr Watson arrow_right.png