GDB (xrefs)

Classes | Macros | Enumerations | Functions | Variables
mi-cmds.c File Reference
`#include "defs.h"`
`#include "top.h"`
`#include "mi-cmds.h"`
`#include "mi-main.h"`

Go to the source code of this file.

## Classes
struct | mi_cmd_stats

## Macros
#define | DEF_MI_CMD_CLI_1(NAME, CLI_NAME, ARGS_P, CALLED) { NAME, { CLI_NAME, ARGS_P}, NULL, CALLED }
#define | DEF_MI_CMD_CLI(NAME, CLI_NAME, ARGS_P) DEF_MI_CMD_CLI_1(NAME, CLI_NAME, ARGS_P, NULL)
#define | DEF_MI_CMD_MI_1(NAME, MI_FUNC, CALLED) { NAME, {NULL, 0}, MI_FUNC, CALLED }
#define | DEF_MI_CMD_MI(NAME, MI_FUNC) DEF_MI_CMD_MI_1(NAME, MI_FUNC, NULL)

## Enumerations
enum | { MI_TABLE_SIZE = 227 }

## Functions
static struct mi_cmd ** | lookup_table (const char *command)
static void | build_table (struct mi_cmd *commands)
struct mi_cmd * | mi_lookup (const char *command)
void | _initialize_mi_cmds (void)

## Variables
static struct mi_cmd | mi_cmds []
static struct mi_cmd ** | mi_table
struct mi_cmd_stats | stats

## Macro Definition Documentation

## ◆ DEF_MI_CMD_CLI

#define DEF_MI_CMD_CLI | ( |  | NAME,
|  |  | CLI_NAME,
|  |  | ARGS_P
| ) |  | DEF_MI_CMD_CLI_1(NAME, CLI_NAME, ARGS_P, NULL)

## ◆ DEF_MI_CMD_CLI_1

#define DEF_MI_CMD_CLI_1 | ( |  | NAME,
|  |  | CLI_NAME,
|  |  | ARGS_P,
|  |  | CALLED
| ) |  | { NAME, { CLI_NAME, ARGS_P}, NULL, CALLED }

## ◆ DEF_MI_CMD_MI

#define DEF_MI_CMD_MI | ( |  | NAME,
|  |  | MI_FUNC
| ) |  | DEF_MI_CMD_MI_1(NAME, MI_FUNC, NULL)

## ◆ DEF_MI_CMD_MI_1

#define DEF_MI_CMD_MI_1 | ( |  | NAME,
|  |  | MI_FUNC,
|  |  | CALLED
| ) |  | { NAME, {NULL, 0}, MI_FUNC, CALLED }

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
MI_TABLE_SIZE |

Definition at line 190 of file mi-cmds.c.

## Function Documentation

## ◆ _initialize_mi_cmds()

void _initialize_mi_cmds | ( | void |  | ) |

Definition at line 280 of file mi-cmds.c.

References build_table(), memset(), mi_cmds, and stats.

## ◆ build_table()

static void build_table | ( | struct mi_cmd * | commands | ) |
| static

Definition at line 247 of file mi-cmds.c.

References _, fprintf_filtered(), fprintf_unfiltered(), gdb_stdlog, internal_error(), lookup_table(), mi_table, MI_TABLE_SIZE, mi_cmd::name, mi_cmd_stats::rehash, stats, and XCNEWVEC.

Referenced by _initialize_mi_cmds().

## ◆ lookup_table()

static struct mi_cmd ** lookup_table | ( | const char * | command | ) |
| static

Definition at line 215 of file mi-cmds.c.

References mi_cmd_stats::hit, mi_table, MI_TABLE_SIZE, mi_cmd_stats::miss, mi_cmd_stats::rehash, and stats.

Referenced by build_table(), and mi_lookup().

## ◆ mi_lookup()

struct mi_cmd* mi_lookup | ( | const char * | command | ) |

Definition at line 197 of file mi-cmds.c.

References lookup_table().

Referenced by mi_cmd_info_gdb_mi_command(), and mi_parse().

## Variable Documentation

## ◆ mi_cmds

struct mi_cmd mi_cmds[]
| static

Definition at line 30 of file mi-cmds.c.

Referenced by _initialize_mi_cmds().

## ◆ mi_table

struct mi_cmd** mi_table
| static

Definition at line 187 of file mi-cmds.c.

Referenced by build_table(), and lookup_table().

## ◆ stats

struct mi_cmd_stats stats

Definition at line 210 of file mi-cmds.c.

Referenced by _initialize_mi_cmds(), build_table(), and lookup_table().