GDB (xrefs)

Functions | Variables
/tmp/gdb-8.1/gdb/macrocmd.c File Reference
`#include "defs.h"`
`#include "macrotab.h"`
`#include "macroexp.h"`
`#include "macroscope.h"`
`#include "cli/cli-utils.h"`
`#include "command.h"`
`#include "gdbcmd.h"`
`#include "linespec.h"`

Go to the source code of this file.

## Functions
static void | macro_command (const char *arg, int from_tty)
static void | macro_inform_no_debuginfo (void)
static void | macro_expand_command (const char *exp, int from_tty)
static void | macro_expand_once_command (const char *exp, int from_tty)
static void | show_pp_source_pos (struct ui_file *stream, struct macro_source_file *file, int line)
static void | print_macro_definition (const char *name, const struct macro_definition *d, struct macro_source_file *file, int line)
static void | info_macro_command (const char *args, int from_tty)
static void | info_macros_command (const char *args, int from_tty)
static void | skip_ws (const char **expp)
static char * | extract_identifier (const char **expp, int is_parameter)
static void | free_macro_definition_ptr (void *ptr)
static void | macro_define_command (const char *exp, int from_tty)
static void | macro_undef_command (const char *exp, int from_tty)
static void | print_one_macro (const char *name, const struct macro_definition *macro, struct macro_source_file *source, int line)
static void | macro_list_command (const char *exp, int from_tty)
void | _initialize_macrocmd (void)

## Variables
static struct cmd_list_element * | macrolist

## Function Documentation

## ◆ _initialize_macrocmd()

void _initialize_macrocmd | ( | void |  | ) |

Definition at line 486 of file macrocmd.c.

References _, add_alias_cmd(), add_cmd(), add_info(), add_prefix_cmd(), class_info, cmdlist, info_macro_command(), info_macros_command(), macro_command(), macro_define_command(), macro_expand_command(), macro_expand_once_command(), macro_list_command(), macro_undef_command(), macrolist, and no_class.

## ◆ extract_identifier()

static char* extract_identifier | ( | const char ** | expp,
|  | int | is_parameter
| ) |  |
| static

Definition at line 314 of file macrocmd.c.

References macro_is_digit(), macro_is_identifier_nondigit(), startswith(), and xmalloc().

Referenced by macro_define_command(), and macro_undef_command().

## ◆ free_macro_definition_ptr()

static void free_macro_definition_ptr | ( | void * | ptr | ) |
| static

Definition at line 348 of file macrocmd.c.

References loc, and xfree().

Referenced by macro_define_command().

## ◆ info_macro_command()

static void info_macro_command | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 191 of file macrocmd.c.

References _, cleanup_chain, default_macro_scope(), do_cleanups(), error(), macro_scope::file, fprintf_filtered(), free_current_contents(), gdb_stdout, macro_scope::line, macro_definition_location(), macro_for_each(), macro_inform_no_debuginfo(), macro_lookup_definition(), make_cleanup(), name, print_macro_definition(), show_pp_source_pos(), skip_spaces(), skip_to_space(), and macro_source_file::table.

Referenced by _initialize_macrocmd().

## ◆ info_macros_command()

static void info_macros_command | ( | const char * | args,
|  | int | from_tty
| ) |  |
| static

Definition at line 272 of file macrocmd.c.

References cleanup_chain, decode_line_with_current_source(), default_macro_scope(), do_cleanups(), macro_scope::file, free_current_contents(), macro_scope::line, macro_for_each_in_scope(), macro_inform_no_debuginfo(), make_cleanup(), print_macro_definition(), sal_macro_scope(), and macro_source_file::table.

Referenced by _initialize_macrocmd().

## ◆ macro_command()

static void macro_command | ( | const char * | arg,
|  | int | from_tty
| ) |  |
| static

Definition at line 36 of file macrocmd.c.

References all_commands, gdb_stdout, help_list(), macrolist, and printf_unfiltered().

Referenced by _initialize_macrocmd().

## ◆ macro_define_command()

static void macro_define_command | ( | const char * | exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 360 of file macrocmd.c.

References _, macro_definition::argc, gdb::argv, macro_definition::argv, cleanup_chain, do_cleanups(), error(), extract_identifier(), free_current_contents(), free_macro_definition_ptr(), macro_definition::kind, macro_define_function(), macro_define_object(), macro_function_like, macro_main(), macro_user_macros, make_cleanup(), memset(), name, skip_ws(), XNEWVEC, and xrealloc().

Referenced by _initialize_macrocmd().

## ◆ macro_expand_command()

static void macro_expand_command | ( | const char * | exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 56 of file macrocmd.c.

References _, cleanup_chain, default_macro_scope(), do_cleanups(), error(), fputs_filtered(), free_current_contents(), gdb_stdout, macro_expand(), macro_inform_no_debuginfo(), make_cleanup(), and standard_macro_lookup().

Referenced by _initialize_macrocmd().

## ◆ macro_expand_once_command()

static void macro_expand_once_command | ( | const char * | exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 91 of file macrocmd.c.

References _, cleanup_chain, default_macro_scope(), do_cleanups(), error(), fputs_filtered(), free_current_contents(), gdb_stdout, macro_expand_once(), macro_inform_no_debuginfo(), make_cleanup(), and standard_macro_lookup().

Referenced by _initialize_macrocmd().

## ◆ macro_inform_no_debuginfo()

static void macro_inform_no_debuginfo | ( | void |  | ) |
| static

Definition at line 50 of file macrocmd.c.

References puts_filtered().

Referenced by info_macro_command(), info_macros_command(), macro_expand_command(), and macro_expand_once_command().

## ◆ macro_list_command()

static void macro_list_command | ( | const char * | exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 478 of file macrocmd.c.

References macro_for_each(), macro_user_macros, and print_one_macro().

Referenced by _initialize_macrocmd().

## ◆ macro_undef_command()

static void macro_undef_command | ( | const char * | exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 442 of file macrocmd.c.

References _, error(), extract_identifier(), macro_main(), macro_undef(), macro_user_macros, name, skip_ws(), and xfree().

Referenced by _initialize_macrocmd().

## ◆ print_macro_definition()

static void print_macro_definition | ( | const char * | name,
|  | const struct macro_definition * | d,
|  | struct macro_source_file * | file,
|  | int | line
| ) |  |
| static

Definition at line 156 of file macrocmd.c.

References macro_definition::argc, macro_definition::argv, fprintf_filtered(), fputs_filtered(), gdb_stdout, macro_definition::kind, macro_function_like, name, macro_definition::replacement, and show_pp_source_pos().

Referenced by info_macro_command(), and info_macros_command().

## ◆ print_one_macro()

static void print_one_macro | ( | const char * | name,
|  | const struct macro_definition * | macro,
|  | struct macro_source_file * | source,
|  | int | line
| ) |  |
| static

Definition at line 459 of file macrocmd.c.

References macro_definition::argc, macro_definition::argv, fprintf_filtered(), gdb_stdout, macro_definition::kind, macro_function_like, name, and macro_definition::replacement.

Referenced by macro_list_command().

## ◆ show_pp_source_pos()

static void show_pp_source_pos | ( | struct ui_file * | stream,
|  | struct macro_source_file * | file,
|  | int | line
| ) |  |
| static

Definition at line 128 of file macrocmd.c.

References fprintf_filtered(), gdb_stdout, macro_source_file::included_at_line, macro_source_file::included_by, macro_source_fullname(), and xfree().

Referenced by info_macro_command(), and print_macro_definition().

## ◆ skip_ws()

static void skip_ws | ( | const char ** | expp | ) |
| static

Definition at line 300 of file macrocmd.c.

References macro_is_whitespace().

Referenced by macro_define_command(), and macro_undef_command().

## Variable Documentation

## ◆ macrolist

struct cmd_list_element* macrolist
| static

Definition at line 33 of file macrocmd.c.

Referenced by _initialize_macrocmd(), and macro_command().