[gPXE-devel] gdbstub_test.S

Stefan Hajnoczi stefanha at gmail.com
Fri Feb 19 01:31:12 EST 2010


On Thu, Feb 18, 2010 at 10:34 PM, Andy Chen <andychen_ca at hotmail.com> wrote:
> I'm very new in gpxe development and try to learn the coding structure to
> see if I'm able to make contributions.
>
> I'm currently studying with remote debug functions and got stuck on
> tests/gdbstub_test.S and tests/gdbstub_test.gdb.
> Can some one kindly guide me how to compile and use it?

Remote GDB debugging documentation is here:
http://etherboot.org/wiki/dev/gdbstub.  This is useful for
understanding how to set up remote debugging - you need to know this
in order to run these tests.

The GDB stub tests perform the commands that gPXE's GDB stub
implements and verify that they succeeded.  If you are changing the
GDB stub code, then this is a useful test to run (and extend with your
new functionality).

gdbstub_test.S is assembly code that needs to be built into gPXE.  Add
REQUIRE_OBJECT(gdbstub_test) to config/config.c in order to link this
code into your gPXE image.

gdbstub_test.gdb is a GDB script that needs to be run on the remote
debugging host.  It has comments at the top showing how to use it:
# Test suite for GDB remote debugging
# Run:
#   make bin/gpxe.hd.tmp
#   make
#   gdb

#   (gdb) target remote :TCPPORT
#   OR
#   (gdb) target remote udp:IP:UDPPORT

#   (gdb) source tests/gdbstub_test.gdb

Stefan


More information about the gPXE-devel mailing list