<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dreamcast.wiki/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Colton</id>
	<title>dreamcast.wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dreamcast.wiki/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Colton"/>
	<link rel="alternate" type="text/html" href="https://dreamcast.wiki/Special:Contributions/Colton"/>
	<updated>2026-05-12T22:10:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Setting_up_Flycast_GDB&amp;diff=3219</id>
		<title>Setting up Flycast GDB</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Setting_up_Flycast_GDB&amp;diff=3219"/>
		<updated>2023-10-12T15:47:49Z</updated>

		<summary type="html">&lt;p&gt;Colton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Clone dev branch of Flycast ===&lt;br /&gt;
 git clone https://github.com/flyinghead/flycast -b dev&lt;br /&gt;
 cd flycast&lt;br /&gt;
 git submodule update --init --recursive&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Build with GDB Support ===&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GDB_SERVER=ON ..&lt;br /&gt;
 make -j$(nproc)&lt;br /&gt;
&lt;br /&gt;
=== Enable GDB in Config File ===&lt;br /&gt;
Briefly launch Flycast to make sure config file exists&lt;br /&gt;
 ./flycast&lt;br /&gt;
&lt;br /&gt;
Edit config file to enable GDB&lt;br /&gt;
&lt;br /&gt;
Path on Linux: ~/.config/flycast/emu.cfg&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;[config]&amp;quot; make sure GDBEnabled is set to yes&lt;br /&gt;
 [config]&lt;br /&gt;
 ...&lt;br /&gt;
 Debug.GDBEnabled = yes&lt;br /&gt;
 Debug.GDBPort = 3263&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start GDB Session ===&lt;br /&gt;
Start a gdb with SH4 support, I use gdb-multiarch from my package manager&lt;br /&gt;
 gdb-multiarch&lt;br /&gt;
&lt;br /&gt;
In the GDB shell run the following commands to configure the GDB session&lt;br /&gt;
 set arch sh4&lt;br /&gt;
 set endian little&lt;br /&gt;
&lt;br /&gt;
Start Flycast Emulation and then connect to running core&lt;br /&gt;
 target remote :3263&lt;br /&gt;
This will pause execution of the game upon connecting&lt;br /&gt;
&lt;br /&gt;
From here you can set breakpoints, instruction step, and read/write memory using normal GDB commands&lt;br /&gt;
Handy reference: [https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf GDB Cheat Sheet]&lt;br /&gt;
&lt;br /&gt;
The following commands show a terminal interface of the registers and instructions:&lt;br /&gt;
 layout asm on&lt;br /&gt;
 layout regs on&lt;br /&gt;
&lt;br /&gt;
Single Instruction Step&lt;br /&gt;
 nexti&lt;br /&gt;
Pressing Enter with no command typed will just repeat the last command (good for stepping)&lt;/div&gt;</summary>
		<author><name>Colton</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Setting_up_Flycast_GDB&amp;diff=3213</id>
		<title>Setting up Flycast GDB</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Setting_up_Flycast_GDB&amp;diff=3213"/>
		<updated>2023-10-09T21:23:29Z</updated>

		<summary type="html">&lt;p&gt;Colton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Clone dev branch of Flycast ===&lt;br /&gt;
 git clone https://github.com/flyinghead/flycast -b dev&lt;br /&gt;
 cd flycast&lt;br /&gt;
 git submodule update --init --recursive&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Build with GDB Support ===&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GDB_SERVER=ON ..&lt;br /&gt;
 make -j$(nproc)&lt;br /&gt;
&lt;br /&gt;
=== Enable GDB in Config File ===&lt;br /&gt;
Briefly launch Flycast to make sure config file exists&lt;br /&gt;
 ./flycast&lt;br /&gt;
&lt;br /&gt;
Edit config file to enable GDB&lt;br /&gt;
&lt;br /&gt;
Path on Linux: ~/.config/flycast/emu.cfg&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;[config]&amp;quot; make sure GDBEnabled is set to yes&lt;br /&gt;
 [config]&lt;br /&gt;
 ...&lt;br /&gt;
 Debug.GDBEnabled = yes&lt;br /&gt;
 Debug.GDBPort = 3263&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start GDB Session ===&lt;br /&gt;
Start a gdb with SH4 support, I use gdb-multiarch from my package manager&lt;br /&gt;
 gdb-multiarch&lt;br /&gt;
&lt;br /&gt;
In the GDB shell run the following commands to configure the GDB session&lt;br /&gt;
 set arch sh4&lt;br /&gt;
 set endian big&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If run in big endian mode, even and odd instructions will be swapped. This can be worked around by changing lines 37 &amp;amp; 38 in &amp;lt;code&amp;gt;code/debug/debug_agent.h&amp;lt;/code&amp;gt; to:&lt;br /&gt;
 #define SWAP_32(a) (a)&lt;br /&gt;
 #define SWAP_16(a) (a)&lt;br /&gt;
And then use &amp;lt;code&amp;gt;set endian little&amp;lt;/code&amp;gt; and GDB will work as expected.&lt;br /&gt;
&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Flycast Emulation and then connect to running core&lt;br /&gt;
 target remote :3263&lt;br /&gt;
This will pause execution of the game upon connecting&lt;br /&gt;
&lt;br /&gt;
From here you can set breakpoints, instruction step, and read/write memory using normal GDB commands&lt;br /&gt;
Handy reference: [https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf GDB Cheat Sheet]&lt;br /&gt;
&lt;br /&gt;
The following commands show a terminal interface of the registers and instructions:&lt;br /&gt;
 layout asm on&lt;br /&gt;
 layout regs on&lt;br /&gt;
&lt;br /&gt;
Single Instruction Step&lt;br /&gt;
 nexti&lt;br /&gt;
Pressing Enter with no command typed will just repeat the last command (good for stepping)&lt;/div&gt;</summary>
		<author><name>Colton</name></author>
	</entry>
	<entry>
		<id>https://dreamcast.wiki/wiki/index.php?title=Setting_up_Flycast_GDB&amp;diff=3212</id>
		<title>Setting up Flycast GDB</title>
		<link rel="alternate" type="text/html" href="https://dreamcast.wiki/wiki/index.php?title=Setting_up_Flycast_GDB&amp;diff=3212"/>
		<updated>2023-10-07T12:47:05Z</updated>

		<summary type="html">&lt;p&gt;Colton: Created page with &amp;quot;=== Clone dev branch of Flycast ===  git clone https://github.com/flyinghead/flycast -b dev  cd flycast  git submodule update --init --recursive   === Build with GDB Support ===  mkdir build  cd build  cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GDB_SERVER=ON ..  make -j$(nproc)  === Enable GDB in Config File === Briefly launch Flycast to make sure config file exists  ./flycast  Edit config file to enable GDB  Path on Linux: ~/.config/flycast/emu.cfg  Under &amp;quot;[config]&amp;quot; make...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Clone dev branch of Flycast ===&lt;br /&gt;
 git clone https://github.com/flyinghead/flycast -b dev&lt;br /&gt;
 cd flycast&lt;br /&gt;
 git submodule update --init --recursive&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Build with GDB Support ===&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GDB_SERVER=ON ..&lt;br /&gt;
 make -j$(nproc)&lt;br /&gt;
&lt;br /&gt;
=== Enable GDB in Config File ===&lt;br /&gt;
Briefly launch Flycast to make sure config file exists&lt;br /&gt;
 ./flycast&lt;br /&gt;
&lt;br /&gt;
Edit config file to enable GDB&lt;br /&gt;
&lt;br /&gt;
Path on Linux: ~/.config/flycast/emu.cfg&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;[config]&amp;quot; make sure GDBEnabled is set to yes&lt;br /&gt;
 [config]&lt;br /&gt;
 ...&lt;br /&gt;
 Debug.GDBEnabled = yes&lt;br /&gt;
 Debug.GDBPort = 3263&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start GDB Session ===&lt;br /&gt;
Start a gdb with SH4 support, I use gdb-multiarch from my package manager&lt;br /&gt;
 gdb-multiarch&lt;br /&gt;
&lt;br /&gt;
In the GDB shell run the following commands to configure the GDB session&lt;br /&gt;
 set arch sh4&lt;br /&gt;
 set endian big&lt;br /&gt;
&lt;br /&gt;
Start Flycast Emulation and then connect to running core&lt;br /&gt;
 target remote :3263&lt;br /&gt;
This will pause execution of the game upon connecting&lt;br /&gt;
&lt;br /&gt;
From here you can set breakpoints, instruction step, and read/write memory using normal GDB commands&lt;br /&gt;
Handy reference: [https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf GDB Cheat Sheet]&lt;br /&gt;
&lt;br /&gt;
The following commands show a terminal interface of the registers and instructions:&lt;br /&gt;
 layout asm on&lt;br /&gt;
 layout regs on&lt;br /&gt;
&lt;br /&gt;
Single Instruction Step&lt;br /&gt;
 nexti&lt;br /&gt;
Pressing Enter with no command typed will just repeat the last command (good for stepping)&lt;/div&gt;</summary>
		<author><name>Colton</name></author>
	</entry>
</feed>