Remote Debugging for SPIN
Overview
Spin supports an Ethernet debugging protocol called TTD that stands for "Topaz Teledebugging Protocol". TTD allows you to debug your SPIN kernel or user-level program over the network. If you know how to use gdb then you shouldn't have much trouble getting started.
The basic idea is that you run a modified version of gdb called m3gdbttd on your development (Linux) machine and you connect to the target machine, which is your crashbox running SPIN, over the network.
Getting Started
The executable you need to run is spin/local/LINUXELF/bin/m3gdbttd. When you start up m3gdbttd you need to specify the kernel image with debugging symbols, this is spin/kernel/sal/i386_freebsd/compile/SPIN/kernel.withsyms.
For this example let's pretend the SPIN source tree is located in /home/myspin/.
Start gdb like this:
Now you should see something like this: Specify the target machine:
(gdb) target ttd loom16 Now you will see something like:
Attaching to remote machine across net... Current language: auto; currently c
ttd_intr_called () at ../../../ttd/ttd_i386.c:104
You are now connected to your target machine and can begin debugging your kernel. Listed below are some useful commands. For more detailed information on using the ttd debugger, look at the user documentation provided with the source code.
Some Useful Commands
Copyright (c) 1997 The University of Washington. All rights reserved. |