GDB (xrefs)
|
#include "defs.h"
#include <signal.h>
#include "target.h"
#include "auto-load.h"
#include "breakpoint.h"
#include "event-top.h"
#include "extension.h"
#include "extension-priv.h"
#include "observable.h"
#include "cli/cli-script.h"
#include "python/python.h"
#include "guile/guile.h"
#include <array>
#include "inferior.h"
Go to the source code of this file.
Classes | |
struct | scoped_default_signal< SIG > |
Typedefs | |
using | scoped_default_sigint = scoped_default_signal<SIGINT> |
Variables | |
static script_sourcer_func | source_gdb_script |
static objfile_script_sourcer_func | source_gdb_objfile_script |
static const struct extension_language_script_ops | extension_language_gdb_script_ops |
const struct extension_language_defn | extension_language_gdb |
static const std::array< const extension_language_defn *, 2 > | extension_languages |
static int | quit_flag |
static const struct extension_language_defn * | active_ext_lang = &extension_language_gdb |
static bool | cooperative_sigint_handling_disabled = false |
using scoped_default_sigint = scoped_default_signal<SIGINT> |
Definition at line 321 of file extension.c.
void _initialize_extension | ( | ) |
Definition at line 1031 of file extension.c.
Referenced by initialize_all_files().
enum ext_lang_bt_status apply_ext_lang_frame_filter | ( | frame_info_ptr | frame, |
frame_filter_flags | flags, | ||
enum ext_lang_frame_args | args_type, | ||
struct ui_out * | out, | ||
int | frame_low, | ||
int | frame_high ) |
Definition at line 528 of file extension.c.
References EXT_LANG_BT_NO_FILTERS, extension_languages, flags, and status.
Referenced by backtrace_command_1(), mi_apply_ext_lang_frame_filter(), and mi_cmd_stack_list_frames().
gdb::unique_xmalloc_ptr< char > apply_ext_lang_type_printers | ( | struct ext_lang_type_printers * | printers, |
struct type * | type ) |
Definition at line 422 of file extension.c.
References EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, and extension_languages.
Referenced by typedef_hash_table::find_global_typedef().
int apply_ext_lang_val_pretty_printer | ( | struct value * | val, |
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value_print_options * | options, | ||
const struct language_defn * | language ) |
Definition at line 477 of file extension.c.
References EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, and extension_languages.
Referenced by common_val_print(), cp_print_value_fields_pp(), and value_print().
void auto_load_ext_lang_scripts_for_objfile | ( | struct objfile * | objfile | ) |
Definition at line 383 of file extension.c.
References auto_load_objfile_script(), ext_lang_auto_load_enabled(), extension_language_gdb, and extension_languages.
Referenced by load_auto_scripts_for_objfile().
bool breakpoint_ext_lang_cond_says_stop | ( | struct breakpoint * | b | ) |
Definition at line 602 of file extension.c.
References extension_language_ops::breakpoint_cond_says_stop, EXT_LANG_BP_STOP_NO, EXT_LANG_BP_STOP_UNSET, extension_languages, and extension_language_defn::ops.
Referenced by bpstat_check_breakpoint_conditions().
int check_quit_flag | ( | void | ) |
Evaluate to non-zero if the quit flag is set, zero otherwise. This will clear the quit flag as a side effect.
Definition at line 857 of file extension.c.
References extension_languages, quit_flag, and quit_serial_event_clear().
Referenced by default_quit_handler(), gdb_os_poll_quit(), target_terminal::inferior(), infrun_quit_handler(), load_progress(), quit_force(), remote_fileio_quit_handler(), remote_fileio_reply(), remote_target::remote_serial_quit_handler(), restore_active_ext_lang(), target_terminal::restore_inferior(), set_active_ext_lang(), and wait_for_signal().
void eval_ext_lang_from_control_command | ( | struct command_line * | cmd | ) |
Definition at line 356 of file extension.c.
References command_line::control_type, extension_languages, and throw_ext_lang_unsupported().
Referenced by execute_control_command_1().
bool ext_lang_auto_load_enabled | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 289 of file extension.c.
References extension_language_script_ops::auto_load_enabled, and extension_language_defn::script_ops.
Referenced by auto_load_ext_lang_scripts_for_objfile(), execute_script_contents(), and source_script_file().
const char * ext_lang_auto_load_suffix | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 231 of file extension.c.
References extension_language_defn::auto_load_suffix.
Referenced by auto_load_objfile_script_1().
|
static |
Definition at line 1006 of file extension.c.
References EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, and extension_languages.
const char * ext_lang_capitalized_name | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 215 of file extension.c.
References extension_language_defn::capitalized_name.
Referenced by gdbscm_set_breakpoint_stop_x(), local_setattro(), set_breakpoint_condition(), and throw_ext_lang_unsupported().
gdb::optional< std::string > ext_lang_colorize | ( | const std::string & | filename, |
const std::string & | contents ) |
Definition at line 943 of file extension.c.
References extension_languages.
Referenced by source_cache::ensure().
gdb::optional< std::string > ext_lang_colorize_disasm | ( | const std::string & | content, |
gdbarch * | gdbarch ) |
Definition at line 963 of file extension.c.
References extension_languages.
Referenced by gdb_disassembler::print_insn().
void ext_lang_initialization | ( | void | ) |
Definition at line 331 of file extension.c.
References extension_languages.
Referenced by captured_main_1().
int ext_lang_initialized_p | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 159 of file extension.c.
References extension_language_ops::initialized, and extension_language_defn::ops.
Referenced by mi_cmd_list_features().
const char * ext_lang_name | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 207 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().
objfile_script_executor_func * ext_lang_objfile_script_executor | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 277 of file extension.c.
References extension_language_script_ops::objfile_script_executor, and extension_language_defn::script_ops.
Referenced by execute_script_contents().
objfile_script_sourcer_func * ext_lang_objfile_script_sourcer | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 260 of file extension.c.
References extension_language_script_ops::objfile_script_sourcer, and extension_language_defn::script_ops.
Referenced by auto_load_objfile_script_1(), and source_script_file().
int ext_lang_present_p | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 150 of file extension.c.
References extension_language_defn::script_ops.
Referenced by gdb_initfile_finder::gdb_initfile_finder(), and source_script_from_stream().
gdb::optional< int > ext_lang_print_insn | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | address, | ||
struct disassemble_info * | info ) |
Definition at line 983 of file extension.c.
References extension_languages, and type::length().
Referenced by gdb_print_insn_1().
script_sourcer_func * ext_lang_script_sourcer | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 243 of file extension.c.
References extension_language_defn::script_ops, and extension_language_script_ops::script_sourcer.
Referenced by source_script_from_stream().
const char * ext_lang_suffix | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 223 of file extension.c.
References extension_language_defn::suffix.
const struct extension_language_defn * get_breakpoint_cond_ext_lang | ( | struct breakpoint * | b, |
enum extension_language | skip_lang ) |
Definition at line 583 of file extension.c.
References extension_languages.
Referenced by gdbscm_set_breakpoint_stop_x(), local_setattro(), and set_breakpoint_condition().
const struct extension_language_defn * get_ext_lang_defn | ( | enum extension_language | lang | ) |
Definition at line 99 of file extension.c.
References EXT_LANG_GDB, EXT_LANG_NONE, extension_language_gdb, and extension_languages.
Referenced by gdbscm_set_breakpoint_stop_x(), local_setattro(), mi_cmd_list_features(), and source_section_scripts().
const struct extension_language_defn * get_ext_lang_of_file | ( | const char * | file | ) |
Definition at line 132 of file extension.c.
References extension_language_gdb, extension_languages, has_extension(), and extension_language_defn::suffix.
Referenced by gdb_initfile_finder::gdb_initfile_finder(), and source_script_from_stream().
void get_matching_xmethod_workers | ( | struct type * | type, |
const char * | method_name, | ||
std::vector< xmethod_worker_up > * | workers ) |
Definition at line 886 of file extension.c.
References EXT_LANG_RC_ERROR, and extension_languages.
Referenced by find_method_list().
|
static |
Definition at line 118 of file extension.c.
Referenced by get_ext_lang_of_file().
|
static |
Definition at line 653 of file extension.c.
References signal_handler::handler, signal_handler::handler_saved, and install_sigint_handler().
Referenced by restore_active_ext_lang().
|
static |
Definition at line 666 of file extension.c.
References handle_sigint(), signal_handler::handler, signal_handler::handler_saved, and install_sigint_handler().
Referenced by set_active_ext_lang().
void preserve_ext_lang_values | ( | struct objfile * | objfile, |
htab_t | copied_types ) |
Definition at line 563 of file extension.c.
References extension_languages.
Referenced by preserve_values().
void restore_active_ext_lang | ( | struct active_ext_lang_state * | previous | ) |
Definition at line 797 of file extension.c.
References active_ext_lang, check_quit_flag(), cooperative_sigint_handling_disabled, active_ext_lang_state::ext_lang, signal_handler::handler_saved, install_ext_sigint_handler(), target_terminal::is_ours(), set_quit_flag(), active_ext_lang_state::sigint_handler, and xfree().
Referenced by scoped_disable_cooperative_sigint_handling::~scoped_disable_cooperative_sigint_handling().
struct active_ext_lang_state * set_active_ext_lang | ( | const struct extension_language_defn * | now_active | ) |
Definition at line 745 of file extension.c.
References active_ext_lang, check_quit_flag(), extension_language_ops::check_quit_flag, cooperative_sigint_handling_disabled, active_ext_lang_state::ext_lang, EXT_LANG_GDB, signal_handler::handler_saved, install_gdb_sigint_handler(), target_terminal::is_ours(), extension_language_defn::language, extension_language_defn::ops, set_quit_flag(), and active_ext_lang_state::sigint_handler.
Referenced by scoped_disable_cooperative_sigint_handling::scoped_disable_cooperative_sigint_handling().
void set_quit_flag | ( | void | ) |
Set the quit flag.
Definition at line 833 of file extension.c.
References active_ext_lang, extension_language_defn::ops, quit_flag, quit_serial_event_set(), and extension_language_ops::set_quit_flag.
Referenced by handle_sigint(), remote_target::readchar(), remote_fileio_request(), remote_target::remote_serial_write(), restore_active_ext_lang(), rocm_bfd_iovec_open(), set_active_ext_lang(), set_force_quit_flag(), and scoped_switch_fork_info::~scoped_switch_fork_info().
|
static |
Definition at line 195 of file extension.c.
References script_from_file().
|
static |
Definition at line 186 of file extension.c.
References script_from_file().
void throw_ext_lang_unsupported | ( | const struct extension_language_defn * | extlang | ) |
Definition at line 174 of file extension.c.
References ext_lang_capitalized_name().
Referenced by eval_ext_lang_from_control_command(), and source_script_from_stream().
|
static |
Definition at line 647 of file extension.c.
Referenced by restore_active_ext_lang(), set_active_ext_lang(), and set_quit_flag().
|
static |
const struct extension_language_defn extension_language_gdb |
Definition at line 53 of file extension.c.
Referenced by auto_load_ext_lang_scripts_for_objfile(), get_ext_lang_defn(), get_ext_lang_of_file(), info_auto_load_gdb_scripts(), and scoped_disable_cooperative_sigint_handling::scoped_disable_cooperative_sigint_handling().
|
static |
Definition at line 45 of file extension.c.
|
static |
Definition at line 86 of file extension.c.
Referenced by apply_ext_lang_frame_filter(), apply_ext_lang_type_printers(), apply_ext_lang_val_pretty_printer(), auto_load_ext_lang_scripts_for_objfile(), breakpoint_ext_lang_cond_says_stop(), check_quit_flag(), eval_ext_lang_from_control_command(), ext_lang_before_prompt(), ext_lang_colorize(), ext_lang_colorize_disasm(), ext_lang_initialization(), ext_lang_print_insn(), ext_lang_type_printers::ext_lang_type_printers(), get_breakpoint_cond_ext_lang(), get_ext_lang_defn(), get_ext_lang_of_file(), get_matching_xmethod_workers(), preserve_ext_lang_values(), and ext_lang_type_printers::~ext_lang_type_printers().
|
static |
Definition at line 640 of file extension.c.
Referenced by check_quit_flag(), remote_target::putpkt_binary(), and set_quit_flag().
|
static |
Definition at line 39 of file extension.c.
|
static |
Definition at line 38 of file extension.c.