GDB stub command.
More...
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/gdbstub.h>
Go to the source code of this file.
GDB stub command.
Definition in file gdbstub_cmd.c.
◆ FILE_LICENCE()
| FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL |
| ) |
|
◆ FILE_SECBOOT()
| FILE_SECBOOT |
( |
FORBIDDEN |
| ) |
|
◆ parse_gdb_transport()
| static int parse_gdb_transport |
( |
const char * |
text, |
|
|
struct gdb_transport ** |
trans |
|
) |
| |
|
static |
Parse GDB transport name.
- Parameters
-
- Return values
-
| trans | GDB transport |
| rc | Return status code |
Definition at line 48 of file gdbstub_cmd.c.
57 printf (
"\"%s\": no such transport (is it compiled in?)\n",
int printf(const char *fmt,...)
Write a formatted string to the console.
struct gdb_transport * find_gdb_transport(const char *name)
Look up GDB transport by name.
#define ENOTSUP
Operation not supported.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
#define NULL
NULL pointer (VOID *)
References assert(), ENOTSUP, find_gdb_transport(), NULL, and printf().
Referenced by gdbstub_exec().
◆ gdbstub_exec()
| static int gdbstub_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
The "gdbstub" command.
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 83 of file gdbstub_cmd.c.
struct arbelprm_rc_send_wqe rc
int optind
Current option index.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
void gdbstub_start(struct gdb_transport *trans)
Break into the debugger using the given transport.
int(* init)(int argc, char **argv)
Set up the transport given a list of arguments.
static struct command_descriptor gdbstub_cmd
"gdbstub" command descriptor
static union @447 opts
"cert<xxx>" option list
static int parse_gdb_transport(const char *text, struct gdb_transport **trans)
Parse GDB transport name.
A transport mechanism for the GDB protocol.
References gdbstub_cmd, gdbstub_start(), gdb_transport::init, optind, opts, parse_gdb_transport(), parse_options(), and rc.
◆ COMMAND()
◆ gdbstub_opts
◆ gdbstub_cmd
Initial value:=
"<transport> [<options>...]" )
#define MAX_ARGUMENTS
No maximum number of arguments.
static struct option_descriptor gdbstub_opts[]
"gdbstub" option list
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
"gdbstub" command descriptor
Definition at line 72 of file gdbstub_cmd.c.
Referenced by gdbstub_exec().