diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-04-19 20:16:01 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-04-19 23:43:39 +0100 |
commit | 8406115834d38bb743e01f35bfd36e835532415e (patch) | |
tree | ee1e3106e2cdc645d911ba5643f8414b21fc4c3e /src/include/ipxe/gdbstub.h | |
parent | 2a36703af228bd10d50a31daec96072fe3a992a3 (diff) | |
download | ipxe-8406115834d38bb743e01f35bfd36e835532415e.tar.gz |
[build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain. Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.
Also update README, LOG and COPYRIGHTS to remove obsolete information.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/gdbstub.h')
-rw-r--r-- | src/include/ipxe/gdbstub.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/include/ipxe/gdbstub.h b/src/include/ipxe/gdbstub.h new file mode 100644 index 000000000..319606747 --- /dev/null +++ b/src/include/ipxe/gdbstub.h @@ -0,0 +1,77 @@ +#ifndef _IPXE_GDBSTUB_H +#define _IPXE_GDBSTUB_H + +/** @file + * + * GDB remote debugging + * + */ + +FILE_LICENCE ( GPL2_OR_LATER ); + +#include <stdint.h> +#include <ipxe/tables.h> +#include <gdbmach.h> + +/** + * A transport mechanism for the GDB protocol + * + */ +struct gdb_transport { + /** Transport name */ + const char *name; + /** + * Set up the transport given a list of arguments + * + * @v argc Number of arguments + * @v argv Argument list + * @ret Return status code + * + * Note that arguments start at argv[0]. + */ + int ( * init ) ( int argc, char **argv ); + /** + * Perform a blocking read + * + * @v buf Buffer + * @v len Size of buffer + * @ret Number of bytes read into buffer + */ + size_t ( * recv ) ( char *buf, size_t len ); + /** + * Write, may block + * + * @v buf Buffer + * @v len Size of buffer + */ + void ( * send ) ( const char *buf, size_t len ); +}; + +#define GDB_TRANSPORTS __table ( struct gdb_transport, "gdb_transports" ) + +#define __gdb_transport __table_entry ( GDB_TRANSPORTS, 01 ) + +/** + * Look up GDB transport by name + * + * @v name Name of transport + * @ret GDB transport or NULL + */ +extern struct gdb_transport *find_gdb_transport ( const char *name ); + +/** + * Break into the debugger using the given transport + * + * @v trans GDB transport + */ +extern void gdbstub_start ( struct gdb_transport *trans ); + +/** + * Interrupt handler + * + * @signo POSIX signal number + * @regs CPU register snapshot + **/ +extern void gdbstub_handler ( int signo, gdbreg_t *regs ); + +#endif /* _IPXE_GDBSTUB_H */ |