GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions | Variables
interps.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "ui-out.h"
#include "gdbsupport/event-loop.h"
#include "event-top.h"
#include "interps.h"
#include "completer.h"
#include "ui.h"
#include "main.h"
#include "gdbsupport/buildargv.h"
#include "gdbsupport/scope-exit.h"

Go to the source code of this file.

Classes

struct  interp_factory
 

Functions

static struct interpinterp_lookup_existing (struct ui *ui, const char *name)
 
void interp_factory_register (const char *name, interp_factory_func func)
 
static void interp_add (struct ui *ui, struct interp *interp)
 
static void interp_set (struct interp *interp, bool top_level)
 
struct interpinterp_lookup (struct ui *ui, const char *name)
 
void set_top_level_interpreter (const char *name)
 
void current_interp_set_logging (ui_file_up logfile, bool logging_redirect, bool debug_redirect)
 
int current_interp_named_p (const char *interp_name)
 
struct interpcommand_interp (void)
 
void interp_exec (struct interp *interp, const char *command_str)
 
void clear_interpreter_hooks (void)
 
static void interpreter_exec_cmd (const char *args, int from_tty)
 
void interpreter_completer (struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
 
struct interptop_level_interpreter (void)
 
struct interpcurrent_interpreter (void)
 
template<typename ... Args>
void interps_notify (void(interp::*method)(Args...), Args... args)
 
void interps_notify_signal_received (gdb_signal sig)
 
void interps_notify_signal_exited (gdb_signal sig)
 
void interps_notify_no_history ()
 
void interps_notify_normal_stop (bpstat *bs, int print_frame)
 
void interps_notify_exited (int status)
 
void interps_notify_user_selected_context_changed (user_selected_what selection)
 
void interps_notify_new_thread (thread_info *t)
 
void interps_notify_thread_exited (thread_info *t, gdb::optional< ULONGEST > exit_code, int silent)
 
void interps_notify_inferior_added (inferior *inf)
 
void interps_notify_inferior_appeared (inferior *inf)
 
void interps_notify_inferior_disappeared (inferior *inf)
 
void interps_notify_inferior_removed (inferior *inf)
 
void interps_notify_record_changed (inferior *inf, int started, const char *method, const char *format)
 
void interps_notify_target_resumed (ptid_t ptid)
 
void interps_notify_solib_loaded (so_list *so)
 
void interps_notify_solib_unloaded (so_list *so)
 
void interps_notify_traceframe_changed (int tfnum, int tpnum)
 
void interps_notify_tsv_created (const trace_state_variable *tsv)
 
void interps_notify_tsv_deleted (const trace_state_variable *tsv)
 
void interps_notify_tsv_modified (const trace_state_variable *tsv)
 
void interps_notify_breakpoint_created (breakpoint *b)
 
void interps_notify_breakpoint_deleted (breakpoint *b)
 
void interps_notify_breakpoint_modified (breakpoint *b)
 
void interps_notify_param_changed (const char *param, const char *value)
 
void interps_notify_memory_changed (inferior *inf, CORE_ADDR addr, ssize_t len, const bfd_byte *data)
 
void _initialize_interpreter ()
 

Variables

static std::vector< interp_factoryinterpreter_factories
 

Function Documentation

◆ _initialize_interpreter()

void _initialize_interpreter ( )

Definition at line 580 of file interps.c.

Referenced by initialize_all_files().

◆ clear_interpreter_hooks()

void clear_interpreter_hooks ( void )

◆ command_interp()

struct interp * command_interp ( void )

◆ current_interp_named_p()

int current_interp_named_p ( const char * interp_name)

Definition at line 226 of file interps.c.

References ui::current_interpreter, current_ui, and interp::name().

Referenced by captured_mi_execute_command(), and read_command_lines().

◆ current_interp_set_logging()

void current_interp_set_logging ( ui_file_up logfile,
bool logging_redirect,
bool debug_redirect )

◆ current_interpreter()

struct interp * current_interpreter ( void )

Definition at line 353 of file interps.c.

References ui::current_interpreter, and current_ui.

Referenced by mi_cmd_gdb_exit(), mi_execute_command(), and mi_load_progress().

◆ interp_add()

static void interp_add ( struct ui * ui,
struct interp * interp )
static

Definition at line 94 of file interps.c.

References ui::interp_list, interp_lookup_existing(), and interp::name().

Referenced by interp_lookup().

◆ interp_exec()

void interp_exec ( struct interp * interp,
const char * command_str )

Definition at line 259 of file interps.c.

References ui::command_interpreter, current_ui, and interp::exec().

Referenced by interpreter_exec_cmd(), and mi_cmd_interpreter_exec().

◆ interp_factory_register()

void interp_factory_register ( const char * name,
interp_factory_func func )

Definition at line 78 of file interps.c.

References f(), func, interpreter_factories, and name.

◆ interp_lookup()

struct interp * interp_lookup ( struct ui * ui,
const char * name )

◆ interp_lookup_existing()

static struct interp * interp_lookup_existing ( struct ui * ui,
const char * name )
static

Definition at line 155 of file interps.c.

References ui::interp_list, name, and interp::name().

Referenced by interp_add(), and interp_lookup().

◆ interp_set()

static void interp_set ( struct interp * interp,
bool top_level )
static

◆ interpreter_completer()

void interpreter_completer ( struct cmd_list_element * ignore,
completion_tracker & tracker,
const char * text,
const char * word )

◆ interpreter_exec_cmd()

static void interpreter_exec_cmd ( const char * args,
int from_tty )
static

◆ interps_notify()

template<typename ... Args>
void interps_notify ( void(interp::*)(Args...) method,
Args... args )

◆ interps_notify_breakpoint_created()

void interps_notify_breakpoint_created ( breakpoint * b)

Definition at line 539 of file interps.c.

References interps_notify(), and interp::on_breakpoint_created().

Referenced by notify_breakpoint_created().

◆ interps_notify_breakpoint_deleted()

void interps_notify_breakpoint_deleted ( breakpoint * b)

Definition at line 547 of file interps.c.

References interps_notify(), and interp::on_breakpoint_deleted().

Referenced by notify_breakpoint_deleted().

◆ interps_notify_breakpoint_modified()

void interps_notify_breakpoint_modified ( breakpoint * b)

Definition at line 555 of file interps.c.

References interps_notify(), and interp::on_breakpoint_modified().

Referenced by notify_breakpoint_modified().

◆ interps_notify_exited()

void interps_notify_exited ( int status)

Definition at line 408 of file interps.c.

References interps_notify(), interp::on_exited(), and status.

Referenced by handle_inferior_event().

◆ interps_notify_inferior_added()

void interps_notify_inferior_added ( inferior * inf)

Definition at line 442 of file interps.c.

References interps_notify(), and interp::on_inferior_added().

Referenced by notify_inferior_added().

◆ interps_notify_inferior_appeared()

void interps_notify_inferior_appeared ( inferior * inf)

Definition at line 450 of file interps.c.

References interps_notify(), and interp::on_inferior_appeared().

Referenced by notify_inferior_appeared().

◆ interps_notify_inferior_disappeared()

void interps_notify_inferior_disappeared ( inferior * inf)

Definition at line 458 of file interps.c.

References interps_notify(), and interp::on_inferior_disappeared().

Referenced by notify_inferior_disappeared().

◆ interps_notify_inferior_removed()

void interps_notify_inferior_removed ( inferior * inf)

Definition at line 466 of file interps.c.

References interps_notify(), and interp::on_inferior_removed().

Referenced by notify_inferior_removed().

◆ interps_notify_memory_changed()

void interps_notify_memory_changed ( inferior * inf,
CORE_ADDR addr,
ssize_t len,
const bfd_byte * data )

Definition at line 571 of file interps.c.

References interps_notify(), and interp::on_memory_changed().

Referenced by notify_memory_changed().

◆ interps_notify_new_thread()

void interps_notify_new_thread ( thread_info * t)

Definition at line 424 of file interps.c.

References interps_notify(), and interp::on_new_thread().

Referenced by notify_new_thread().

◆ interps_notify_no_history()

void interps_notify_no_history ( )

Definition at line 392 of file interps.c.

References interps_notify(), and interp::on_no_history().

Referenced by handle_inferior_event().

◆ interps_notify_normal_stop()

void interps_notify_normal_stop ( bpstat * bs,
int print_frame )

Definition at line 400 of file interps.c.

References interps_notify(), interp::on_normal_stop(), and print_frame().

Referenced by notify_normal_stop().

◆ interps_notify_param_changed()

void interps_notify_param_changed ( const char * param,
const char * value )

Definition at line 563 of file interps.c.

References interps_notify(), and interp::on_param_changed().

Referenced by directory_command(), and do_set_command().

◆ interps_notify_record_changed()

void interps_notify_record_changed ( inferior * inf,
int started,
const char * method,
const char * format )

◆ interps_notify_signal_exited()

void interps_notify_signal_exited ( gdb_signal sig)

Definition at line 384 of file interps.c.

References interps_notify(), and interp::on_signal_exited().

Referenced by handle_inferior_event().

◆ interps_notify_signal_received()

void interps_notify_signal_received ( gdb_signal sig)

Definition at line 376 of file interps.c.

References interps_notify(), and interp::on_signal_received().

Referenced by notify_signal_received().

◆ interps_notify_solib_loaded()

void interps_notify_solib_loaded ( so_list * so)

Definition at line 491 of file interps.c.

References interps_notify(), and interp::on_solib_loaded().

Referenced by notify_solib_loaded().

◆ interps_notify_solib_unloaded()

void interps_notify_solib_unloaded ( so_list * so)

Definition at line 499 of file interps.c.

References interps_notify(), and interp::on_solib_unloaded().

Referenced by notify_solib_unloaded().

◆ interps_notify_target_resumed()

void interps_notify_target_resumed ( ptid_t ptid)

Definition at line 483 of file interps.c.

References interps_notify(), and interp::on_target_resumed().

Referenced by notify_target_resumed().

◆ interps_notify_thread_exited()

void interps_notify_thread_exited ( thread_info * t,
gdb::optional< ULONGEST > exit_code,
int silent )

Definition at line 432 of file interps.c.

References interps_notify(), and interp::on_thread_exited().

Referenced by notify_thread_exited().

◆ interps_notify_traceframe_changed()

void interps_notify_traceframe_changed ( int tfnum,
int tpnum )

Definition at line 507 of file interps.c.

References interps_notify(), and interp::on_traceframe_changed().

Referenced by tfind_1().

◆ interps_notify_tsv_created()

void interps_notify_tsv_created ( const trace_state_variable * tsv)

Definition at line 515 of file interps.c.

References interps_notify(), and interp::on_tsv_created().

Referenced by create_tsv_from_upload(), and trace_variable_command().

◆ interps_notify_tsv_deleted()

void interps_notify_tsv_deleted ( const trace_state_variable * tsv)

◆ interps_notify_tsv_modified()

void interps_notify_tsv_modified ( const trace_state_variable * tsv)

Definition at line 531 of file interps.c.

References interps_notify(), and interp::on_tsv_modified().

Referenced by trace_variable_command().

◆ interps_notify_user_selected_context_changed()

void interps_notify_user_selected_context_changed ( user_selected_what selection)

◆ set_top_level_interpreter()

void set_top_level_interpreter ( const char * name)

Definition at line 191 of file interps.c.

References current_ui, interp_lookup(), interp_set(), and name.

Referenced by captured_main_1(), and new_ui_command().

◆ top_level_interpreter()

struct interp * top_level_interpreter ( void )

Variable Documentation

◆ interpreter_factories

std::vector<interp_factory> interpreter_factories
static

Definition at line 73 of file interps.c.

Referenced by interp_factory_register(), interp_lookup(), and interpreter_completer().