toolchain: add new debugging tool using magenta_debug
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef COMMAND_H_
|
||||
#define COMMAND_H_
|
||||
|
||||
#include "context.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
struct command;
|
||||
|
||||
typedef int (*command_callback_t)(
|
||||
const struct command *,
|
||||
struct debug_context *,
|
||||
int,
|
||||
const char **,
|
||||
void *);
|
||||
|
||||
struct command {
|
||||
const char *cmd_name;
|
||||
command_callback_t cmd_callback;
|
||||
};
|
||||
|
||||
extern const struct command *command_find(
|
||||
const struct command **commands,
|
||||
size_t nr_commands,
|
||||
const char *name);
|
||||
extern int command_execute(
|
||||
const struct command *cmd,
|
||||
struct debug_context *ctx,
|
||||
int argc,
|
||||
const char **argv,
|
||||
void *argp);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user