diff options
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmds.c | 1 | ||||
-rw-r--r-- | gdb/mi/mi-cmds.h | 1 | ||||
-rw-r--r-- | gdb/mi/mi-symbol-cmds.c | 37 |
3 files changed, 39 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index df9f25f..85c15ec 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -154,6 +154,7 @@ static struct mi_cmd mi_cmds[] = DEF_MI_CMD_MI ("symbol-info-functions", mi_cmd_symbol_info_functions), DEF_MI_CMD_MI ("symbol-info-variables", mi_cmd_symbol_info_variables), DEF_MI_CMD_MI ("symbol-info-types", mi_cmd_symbol_info_types), + DEF_MI_CMD_MI ("symbol-info-modules", mi_cmd_symbol_info_modules), DEF_MI_CMD_CLI ("target-attach", "attach", 1), DEF_MI_CMD_MI ("target-detach", mi_cmd_target_detach), DEF_MI_CMD_CLI ("target-disconnect", "disconnect", 0), diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h index c2fd7d3..30de780 100644 --- a/gdb/mi/mi-cmds.h +++ b/gdb/mi/mi-cmds.h @@ -95,6 +95,7 @@ extern mi_cmd_argv_ftype mi_cmd_stack_list_variables; extern mi_cmd_argv_ftype mi_cmd_stack_select_frame; extern mi_cmd_argv_ftype mi_cmd_symbol_list_lines; extern mi_cmd_argv_ftype mi_cmd_symbol_info_functions; +extern mi_cmd_argv_ftype mi_cmd_symbol_info_modules; extern mi_cmd_argv_ftype mi_cmd_symbol_info_types; extern mi_cmd_argv_ftype mi_cmd_symbol_info_variables; extern mi_cmd_argv_ftype mi_cmd_target_detach; diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c index f674dcf..10dd273 100644 --- a/gdb/mi/mi-symbol-cmds.c +++ b/gdb/mi/mi-symbol-cmds.c @@ -224,6 +224,43 @@ mi_cmd_symbol_info_functions (const char *command, char **argv, int argc) mi_info_functions_or_variables (FUNCTIONS_DOMAIN, argv, argc); } +/* Implement -symbol-inf-modules command. */ + +void +mi_cmd_symbol_info_modules (const char *command, char **argv, int argc) +{ + const char *regexp = nullptr; + + enum opt + { + NAME_REGEXP_OPT + }; + static const struct mi_opt opts[] = + { + {"-name", NAME_REGEXP_OPT, 1}, + { 0, 0, 0 } + }; + + int oind = 0; + char *oarg = nullptr; + + while (1) + { + int opt = mi_getopt ("-symbol-info-modules", argc, argv, opts, + &oind, &oarg); + if (opt < 0) + break; + switch ((enum opt) opt) + { + case NAME_REGEXP_OPT: + regexp = oarg; + break; + } + } + + mi_symbol_info (MODULES_DOMAIN, regexp, nullptr, true); +} + /* Implement -symbol-info-types command. */ void |