GDB (xrefs)

Classes | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/extension.h File Reference
`#include "mi/mi-cmds.h"`
`#include "common/vec.h"`

Go to the source code of this file.

## Classes
struct | ext_lang_type_printers
struct | xmethod_worker

## Typedefs
typedef void | script_sourcer_func(const struct extension_language_defn *, FILE *stream, const char *filename)
typedef void | objfile_script_sourcer_func(const struct extension_language_defn *, struct objfile *, FILE *stream, const char *filename)
typedef void | objfile_script_executor_func(const struct extension_language_defn *, struct objfile *, const char *name, const char *script)
typedef struct xmethod_worker * | xmethod_worker_ptr

## Enumerations
enum | extension_language { EXT_LANG_NONE, EXT_LANG_GDB, EXT_LANG_PYTHON, EXT_LANG_GUILE }
enum | ext_lang_bt_status { EXT_LANG_BT_ERROR = -1, EXT_LANG_BT_OK = 1, EXT_LANG_BT_COMPLETED = 2, EXT_LANG_BT_NO_FILTERS = 3 }
enum | frame_filter_flags { PRINT_LEVEL = 1, PRINT_FRAME_INFO = 2, PRINT_ARGS = 4, PRINT_LOCALS = 8 }
enum | ext_lang_frame_args { NO_VALUES = PRINT_NO_VALUES, MI_PRINT_ALL_VALUES = PRINT_ALL_VALUES, MI_PRINT_SIMPLE_VALUES = PRINT_SIMPLE_VALUES, CLI_SCALAR_VALUES, CLI_ALL_VALUES }
enum | ext_lang_bp_stop { EXT_LANG_BP_STOP_UNSET, EXT_LANG_BP_STOP_NO, EXT_LANG_BP_STOP_YES }

## Functions
| DEF_VEC_P (xmethod_worker_ptr)
typedef | VEC (xmethod_worker_ptr) xmethod_worker_vec
const struct extension_language_defn * | get_ext_lang_defn (enum extension_language lang)
const struct extension_language_defn * | get_ext_lang_of_file (const char *file)
int | ext_lang_present_p (const struct extension_language_defn *)
int | ext_lang_initialized_p (const struct extension_language_defn *)
void | throw_ext_lang_unsupported (const struct extension_language_defn *)
enum extension_language | ext_lang_kind (const struct extension_language_defn *)
const char * | ext_lang_name (const struct extension_language_defn *)
const char * | ext_lang_capitalized_name (const struct extension_language_defn *)
const char * | ext_lang_suffix (const struct extension_language_defn *)
const char * | ext_lang_auto_load_suffix (const struct extension_language_defn *)
script_sourcer_func * | ext_lang_script_sourcer (const struct extension_language_defn *)
objfile_script_sourcer_func * | ext_lang_objfile_script_sourcer (const struct extension_language_defn *)
objfile_script_executor_func * | ext_lang_objfile_script_executor (const struct extension_language_defn *)
int | ext_lang_auto_load_enabled (const struct extension_language_defn *)
void | finish_ext_lang_initialization (void)
void | eval_ext_lang_from_control_command (struct command_line *cmd)
void | auto_load_ext_lang_scripts_for_objfile (struct objfile *)
struct ext_lang_type_printers * | start_ext_lang_type_printers (void)
char * | apply_ext_lang_type_printers (struct ext_lang_type_printers *, struct type *)
void | free_ext_lang_type_printers (struct ext_lang_type_printers *)
int | apply_ext_lang_val_pretty_printer (struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)
enum ext_lang_bt_status | apply_ext_lang_frame_filter (struct frame_info *frame, int flags, enum ext_lang_frame_args args_type, struct ui_out *out, int frame_low, int frame_high)
void | preserve_ext_lang_values (struct objfile *, htab_t copied_types)
const struct extension_language_defn * | get_breakpoint_cond_ext_lang (struct breakpoint *b, enum extension_language skip_lang)
int | breakpoint_ext_lang_cond_says_stop (struct breakpoint *)
struct value * | invoke_xmethod (struct xmethod_worker *, struct value *, struct value **, int nargs)
struct xmethod_worker * | clone_xmethod_worker (struct xmethod_worker *)
struct xmethod_worker * | new_xmethod_worker (const struct extension_language_defn *extlang, void *data)
void | free_xmethod_worker (struct xmethod_worker *)
void | free_xmethod_worker_vec (void *vec)
xmethod_worker_vec * | get_matching_xmethod_workers (struct type *, const char *)
struct type ** | get_xmethod_arg_types (struct xmethod_worker *, int *)
struct type * | get_xmethod_result_type (struct xmethod_worker *, struct value *object, struct value **args, int nargs)

## Variables
const struct extension_language_defn | extension_language_gdb

## Typedef Documentation

## ◆ objfile_script_executor_func

typedef void objfile_script_executor_func(const struct extension_language_defn *, struct objfile *, const char *name, const char *script)

Definition at line 54 of file extension.h.

## ◆ objfile_script_sourcer_func

typedef void objfile_script_sourcer_func(const struct extension_language_defn *, struct objfile *, FILE *stream, const char *filename)

Definition at line 48 of file extension.h.

## ◆ script_sourcer_func

typedef void script_sourcer_func(const struct extension_language_defn *, FILE *stream, const char *filename)

Definition at line 41 of file extension.h.

## ◆ xmethod_worker_ptr

typedef struct xmethod_worker* xmethod_worker_ptr

Definition at line 164 of file extension.h.

## Enumeration Type Documentation

## ◆ ext_lang_bp_stop

enum ext_lang_bp_stop

Enumerator
EXT_LANG_BP_STOP_UNSET |
EXT_LANG_BP_STOP_NO |
EXT_LANG_BP_STOP_YES |

Definition at line 129 of file extension.h.

## ◆ ext_lang_bt_status

enum ext_lang_bt_status

Enumerator
EXT_LANG_BT_ERROR |
EXT_LANG_BT_OK |
EXT_LANG_BT_COMPLETED |
EXT_LANG_BT_NO_FILTERS |

Definition at line 69 of file extension.h.

## ◆ ext_lang_frame_args

enum ext_lang_frame_args

Enumerator
NO_VALUES |
MI_PRINT_ALL_VALUES |
MI_PRINT_SIMPLE_VALUES |
CLI_SCALAR_VALUES |
CLI_ALL_VALUES |

Definition at line 108 of file extension.h.

## ◆ extension_language

enum extension_language

Enumerator
EXT_LANG_NONE |
EXT_LANG_GDB |
EXT_LANG_PYTHON |
EXT_LANG_GUILE |

Definition at line 59 of file extension.h.

## ◆ frame_filter_flags

enum frame_filter_flags

Enumerator
PRINT_LEVEL |
PRINT_FRAME_INFO |
PRINT_ARGS |
PRINT_LOCALS |

Definition at line 90 of file extension.h.

## Function Documentation

## ◆ apply_ext_lang_frame_filter()

enum ext_lang_bt_status apply_ext_lang_frame_filter | ( | struct frame_info * | frame,
|  | int | flags,
|  | enum ext_lang_frame_args | args_type,
|  | struct ui_out * | out,
|  | int | frame_low,
|  | int | frame_high
| ) |  |

Definition at line 556 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::apply_frame_filter, EXT_LANG_BT_NO_FILTERS, flags, extension_language_defn::ops, and status.

Referenced by backtrace_command_1(), mi_apply_ext_lang_frame_filter(), and mi_cmd_stack_list_frames().

## ◆ apply_ext_lang_type_printers()

char* apply_ext_lang_type_printers | ( | struct ext_lang_type_printers * | ,
|  | struct type * |
| ) |  |

Definition at line 431 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::apply_type_printers, EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, gdb_assert, gdb_assert_not_reached, and extension_language_defn::ops.

Referenced by find_global_typedef().

## ◆ apply_ext_lang_val_pretty_printer()

int apply_ext_lang_val_pretty_printer | ( | struct type * | type,
|  | LONGEST | embedded_offset,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | val,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |

Definition at line 499 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::apply_val_pretty_printer, EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, gdb_assert_not_reached, and extension_language_defn::ops.

Referenced by cp_print_value(), val_print(), and value_print().

## ◆ auto_load_ext_lang_scripts_for_objfile()

void auto_load_ext_lang_scripts_for_objfile | ( | struct objfile * |  | ) |

Definition at line 383 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, auto_load_objfile_script(), ext_lang_auto_load_enabled(), and extension_language_gdb.

Referenced by load_auto_scripts_for_objfile().

## ◆ breakpoint_ext_lang_cond_says_stop()

int breakpoint_ext_lang_cond_says_stop | ( | struct breakpoint * |  | ) |

Definition at line 635 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::breakpoint_cond_says_stop, EXT_LANG_BP_STOP_NO, EXT_LANG_BP_STOP_UNSET, gdb_assert, and extension_language_defn::ops.

Referenced by bpstat_check_breakpoint_conditions().

## ◆ clone_xmethod_worker()

struct xmethod_worker* clone_xmethod_worker | ( | struct xmethod_worker * |  | ) |

Definition at line 885 of file extension.c.

References extension_language_ops::clone_xmethod_worker_data, xmethod_worker::data, xmethod_worker::extlang, gdb_assert, new_xmethod_worker(), and extension_language_defn::ops.

Referenced by find_overload_match().

## ◆ DEF_VEC_P()

DEF_VEC_P | ( | xmethod_worker_ptr |  | ) |

## ◆ eval_ext_lang_from_control_command()

void eval_ext_lang_from_control_command | ( | struct command_line * | cmd | ) |

Definition at line 353 of file extension.c.

References ALL_EXTENSION_LANGUAGES, extension_language_defn::cli_control_type, command_line::control_type, extension_language_ops::eval_from_control_command, gdb_assert_not_reached, extension_language_defn::ops, and throw_ext_lang_unsupported().

Referenced by execute_control_command_1().

## ◆ ext_lang_auto_load_enabled()

int ext_lang_auto_load_enabled | ( | const struct extension_language_defn * |  | ) |

Definition at line 310 of file extension.c.

References extension_language_script_ops::auto_load_enabled, gdb_assert, and extension_language_defn::script_ops.

Referenced by auto_load_ext_lang_scripts_for_objfile(), execute_script_contents(), and source_script_file().

## ◆ ext_lang_auto_load_suffix()

const char* ext_lang_auto_load_suffix | ( | const struct extension_language_defn * |  | ) |

Definition at line 251 of file extension.c.

References extension_language_defn::auto_load_suffix.

Referenced by _initialize_auto_load(), and auto_load_objfile_script_1().

## ◆ ext_lang_capitalized_name()

const char* ext_lang_capitalized_name | ( | const struct extension_language_defn * |  | ) |

Definition at line 235 of file extension.c.

References extension_language_defn::capitalized_name.

Referenced by condition_command(), gdbscm_set_breakpoint_stop_x(), local_setattro(), and throw_ext_lang_unsupported().

## ◆ ext_lang_initialized_p()

int ext_lang_initialized_p | ( | const struct extension_language_defn * |  | ) |

Definition at line 179 of file extension.c.

References gdb_assert, extension_language_ops::initialized, and extension_language_defn::ops.

Referenced by mi_cmd_list_features().

## ◆ ext_lang_kind()

enum extension_language ext_lang_kind | ( | const struct extension_language_defn * |  | ) |

## ◆ ext_lang_name()

const char* ext_lang_name | ( | const struct extension_language_defn * |  | ) |

Definition at line 227 of file extension.c.

References extension_language_defn::name.

Referenced by auto_load_objfile_script_1(), execute_script_contents(), maybe_print_script_not_found_warning(), maybe_print_unsupported_script_warning(), and source_script_file().

## ◆ ext_lang_objfile_script_executor()

objfile_script_executor_func* ext_lang_objfile_script_executor | ( | const struct extension_language_defn * |  | ) |

Definition at line 298 of file extension.c.

References extension_language_script_ops::objfile_script_executor, and extension_language_defn::script_ops.

Referenced by execute_script_contents().

## ◆ ext_lang_objfile_script_sourcer()

objfile_script_sourcer_func* ext_lang_objfile_script_sourcer | ( | const struct extension_language_defn * |  | ) |

Definition at line 280 of file extension.c.

References gdb_assert, extension_language_script_ops::objfile_script_sourcer, and extension_language_defn::script_ops.

Referenced by auto_load_objfile_script_1(), and source_script_file().

## ◆ ext_lang_present_p()

int ext_lang_present_p | ( | const struct extension_language_defn * |  | ) |

Definition at line 170 of file extension.c.

References extension_language_defn::script_ops.

Referenced by source_script_from_stream().

## ◆ ext_lang_script_sourcer()

script_sourcer_func* ext_lang_script_sourcer | ( | const struct extension_language_defn * |  | ) |

Definition at line 263 of file extension.c.

References gdb_assert, extension_language_defn::script_ops, and extension_language_script_ops::script_sourcer.

Referenced by source_script_from_stream().

## ◆ ext_lang_suffix()

const char* ext_lang_suffix | ( | const struct extension_language_defn * |  | ) |

Definition at line 243 of file extension.c.

References extension_language_defn::suffix.

## ◆ finish_ext_lang_initialization()

void finish_ext_lang_initialization | ( | void |  | ) |

Definition at line 329 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::finish_initialization, and extension_language_defn::ops.

Referenced by gdb_init().

## ◆ free_ext_lang_type_printers()

void free_ext_lang_type_printers | ( | struct ext_lang_type_printers * |  | ) |

Definition at line 467 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::free_type_printers, extension_language_defn::ops, and xfree().

Referenced by do_free_global_table().

## ◆ free_xmethod_worker()

void free_xmethod_worker | ( | struct xmethod_worker * |  | ) |

Definition at line 1010 of file extension.c.

References xmethod_worker::data, xmethod_worker::extlang, extension_language_ops::free_xmethod_worker_data, gdb_assert, extension_language_defn::ops, and xfree().

Referenced by free_xmethod_worker_vec(), and value_free().

## ◆ free_xmethod_worker_vec()

void free_xmethod_worker_vec | ( | void * | vec | ) |

Definition at line 1021 of file extension.c.

References free_xmethod_worker(), VEC(), VEC_free, and VEC_iterate.

Referenced by find_overload_match(), and VEC().

## ◆ get_breakpoint_cond_ext_lang()

const struct extension_language_defn* get_breakpoint_cond_ext_lang | ( | struct breakpoint * | b,
|  | enum extension_language | skip_lang
| ) |  |

Definition at line 614 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_ops::breakpoint_has_cond, extension_language_defn::language, and extension_language_defn::ops.

Referenced by condition_command(), gdbscm_set_breakpoint_stop_x(), and local_setattro().

## ◆ get_ext_lang_defn()

const struct extension_language_defn* get_ext_lang_defn | ( | enum extension_language | lang | ) |

Definition at line 116 of file extension.c.

References ALL_EXTENSION_LANGUAGES, EXT_LANG_GDB, EXT_LANG_NONE, extension_language_gdb, gdb_assert, gdb_assert_not_reached, and extension_language_defn::language.

Referenced by _initialize_auto_load(), gdbscm_set_breakpoint_stop_x(), local_setattro(), mi_cmd_list_features(), and source_section_scripts().

## ◆ get_ext_lang_of_file()

const struct extension_language_defn* get_ext_lang_of_file | ( | const char * | file | ) |

Definition at line 152 of file extension.c.

References ALL_EXTENSION_LANGUAGES, has_extension(), and extension_language_defn::suffix.

Referenced by source_script_from_stream().

## ◆ get_matching_xmethod_workers()

xmethod_worker_vec* get_matching_xmethod_workers | ( | struct type * | ,
|  | const char * |
| ) |  |

Referenced by find_method_list().

## ◆ get_xmethod_arg_types()

struct type** get_xmethod_arg_types | ( | struct xmethod_worker * | ,
|  | int * |
| ) |  |

Definition at line 949 of file extension.c.

References _, extension_language_defn::capitalized_name, error(), EXT_LANG_RC_ERROR, xmethod_worker::extlang, gdb_assert, extension_language_ops::get_xmethod_arg_types, and extension_language_defn::ops.

Referenced by find_oload_champ().

## ◆ get_xmethod_result_type()

struct type* get_xmethod_result_type | ( | struct xmethod_worker * | ,
|  | struct value * | object,
|  | struct value ** | args,
|  | int | nargs
| ) |  |

Definition at line 972 of file extension.c.

References _, extension_language_defn::capitalized_name, error(), EXT_LANG_RC_ERROR, xmethod_worker::extlang, gdb_assert, extension_language_ops::get_xmethod_arg_types, extension_language_ops::get_xmethod_result_type, and extension_language_defn::ops.

Referenced by result_type_of_xmethod().

## ◆ invoke_xmethod()

struct value* invoke_xmethod | ( | struct xmethod_worker * | ,
|  | struct value * | ,
|  | struct value ** | ,
|  | int | nargs
| ) |  |

Definition at line 998 of file extension.c.

References xmethod_worker::extlang, gdb_assert, extension_language_ops::invoke_xmethod, and extension_language_defn::ops.

Referenced by call_xmethod().

## ◆ new_xmethod_worker()

struct xmethod_worker* new_xmethod_worker | ( | const struct extension_language_defn * | extlang,
|  | void * | data
| ) |  |

Definition at line 865 of file extension.c.

References xmethod_worker::data, xmethod_worker::extlang, xmethod_worker::value, and XCNEW.

Referenced by clone_xmethod_worker(), and new_python_xmethod_worker().

## ◆ preserve_ext_lang_values()

void preserve_ext_lang_values | ( | struct objfile * | ,
|  | htab_t | copied_types
| ) |  |

Definition at line 592 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_defn::ops, and extension_language_ops::preserve_values.

Referenced by preserve_values().

## ◆ start_ext_lang_type_printers()

struct ext_lang_type_printers* start_ext_lang_type_printers | ( | void |  | ) |

Definition at line 409 of file extension.c.

References ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_defn::ops, extension_language_ops::start_type_printers, and XCNEW.

Referenced by create_global_typedef_table().

## ◆ throw_ext_lang_unsupported()

void throw_ext_lang_unsupported | ( | const struct extension_language_defn * |  | ) |

Definition at line 194 of file extension.c.

References _, error(), and ext_lang_capitalized_name().

Referenced by eval_ext_lang_from_control_command(), and source_script_from_stream().

## ◆ VEC()

typedef VEC | ( | xmethod_worker_ptr |  | ) |

Definition at line 905 of file extension.c.

References _, ALL_ENABLED_EXTENSION_LANGUAGES, extension_language_defn::capitalized_name, error(), EXT_LANG_RC_ERROR, free_xmethod_worker_vec(), extension_language_ops::get_matching_xmethod_workers, extension_language_defn::ops, VEC(), VEC_free, and VEC_merge.

Referenced by free_xmethod_worker_vec(), and VEC().

## Variable Documentation

## ◆ extension_language_gdb

const struct extension_language_defn extension_language_gdb

Definition at line 69 of file extension.c.

Referenced by auto_load_ext_lang_scripts_for_objfile(), get_ext_lang_defn(), and info_auto_load_gdb_scripts().