GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "symfile.h"
#include "source.h"
#include "linespec.h"
#include "breakpoint.h"
#include "tracepoint.h"
#include "gdb_string.h"
#include <tcl.h>
#include "gdbtk.h"
#include "gdbtk-cmds.h"
#include "observer.h"
#include "arch-utils.h"
#include "exceptions.h"
Go to the source code of this file.
Defines | |
#define | ALL_BREAKPOINTS(B) for (B = breakpoint_chain; B; B = B->next) |
#define | BREAKPOINT_IS_INTERESTING(bp) |
Functions | |
void | report_error (void) |
static int | gdb_find_bp_at_addr (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_find_bp_at_line (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_get_breakpoint_info (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST[]) |
static int | gdb_get_breakpoint_list (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST[]) |
static int | gdb_set_bp (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_actions_command (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_get_trace_frame_num (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_get_tracepoint_info (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_get_tracepoint_list (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static int | gdb_trace_status (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST[]) |
static int | gdb_tracepoint_exists_command (ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]) |
static Tcl_Obj * | get_breakpoint_commands (struct command_line *cmd) |
static int | tracepoint_exists (char *args) |
void | gdbtk_create_breakpoint (struct breakpoint *) |
void | gdbtk_delete_breakpoint (struct breakpoint *) |
void | gdbtk_modify_breakpoint (struct breakpoint *) |
static void | breakpoint_notify (int, const char *) |
int | Gdbtk_Breakpoint_Init (Tcl_Interp *interp) |
static char * | gdbtk_read_next_line (void) |
static int | gdb_get_breakpoint_info (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) |
static int | gdb_get_breakpoint_list (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) |
static int | gdb_trace_status (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) |
Variables | |
static Tcl_Obj ** | gdbtk_obj_array |
static int | gdbtk_obj_array_cnt |
static int | gdbtk_obj_array_ptr |
struct breakpoint * | breakpoint_chain |
char * | bptypes [] |
char * | bpdisp [] |
#define ALL_BREAKPOINTS | ( | B | ) | for (B = breakpoint_chain; B; B = B->next) |
Definition at line 44 of file gdbtk-bp.c.
Referenced by gdb_find_bp_at_addr(), gdb_find_bp_at_line(), and gdb_get_breakpoint_list().
#define BREAKPOINT_IS_INTERESTING | ( | bp | ) |
((bp)->type == bp_breakpoint \ || (bp)->type == bp_hardware_breakpoint \ || (bp)->type == bp_watchpoint \ || (bp)->type == bp_hardware_watchpoint \ || (bp)->type == bp_read_watchpoint \ || (bp)->type == bp_access_watchpoint)
Definition at line 67 of file gdbtk-bp.c.
Referenced by gdbtk_create_breakpoint().
static void breakpoint_notify | ( | int | num, |
const char * | action | ||
) | [static] |
Definition at line 590 of file gdbtk-bp.c.
References tracepoint::base, bp_breakpoint, bp_fast_tracepoint, bp_tracepoint, gdbtk_interp, get_breakpoint(), get_tracepoint(), breakpoint::number, report_error(), breakpoint::type, xfree(), and xstrprintf().
Referenced by gdbtk_create_breakpoint(), gdbtk_delete_breakpoint(), and gdbtk_modify_breakpoint().
static int gdb_actions_command | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 640 of file gdbtk-bp.c.
References breakpoint_set_commands(), check_tracepoint_command(), gdbtk_result::flags, GDBTK_IN_TCL_RESULT, gdbtk_obj_array, gdbtk_obj_array_cnt, gdbtk_obj_array_ptr, gdbtk_read_next_line(), gdbtk_set_result(), get_tracepoint(), read_command_lines_1(), and result_ptr.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_find_bp_at_addr | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 188 of file gdbtk-bp.c.
References bp_location::address, ALL_BREAKPOINTS, breakpoint::loc, breakpoint::number, gdbtk_result::obj_ptr, and result_ptr.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_find_bp_at_line | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 225 of file gdbtk-bp.c.
References ALL_BREAKPOINTS, symtab::filename, gdbtk_result::flags, GDBTK_IN_TCL_RESULT, line, bp_location::line_number, breakpoint::loc, lookup_symtab(), breakpoint::number, gdbtk_result::obj_ptr, result_ptr, and bp_location::symtab.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_get_breakpoint_info | ( | ClientData | , |
Tcl_Interp * | , | ||
int | , | ||
Tcl_Obj * | CONST[] | ||
) | [static] |
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_get_breakpoint_info | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 273 of file gdbtk-bp.c.
References breakpoint::addr_string, bp_location::address, bp_breakpoint, bp_enabled, bptypes, breakpoint_commands(), breakpoint::cond_string, core_addr_to_string(), breakpoint::disposition, breakpoint::enable_state, watchpoint::exp_string, find_pc_line(), gdbtk_result::flags, GDBTK_IN_TCL_RESULT, gdbtk_set_result(), get_breakpoint(), get_breakpoint_commands(), breakpoint::hit_count, breakpoint::ignore_count, is_watchpoint(), bp_location::line_number, breakpoint::loc, gdbtk_result::obj_ptr, pc_function_name(), result_ptr, symtab_and_line::symtab, symtab_to_filename(), breakpoint::thread, and breakpoint::type.
static int gdb_get_breakpoint_list | ( | ClientData | , |
Tcl_Interp * | , | ||
int | , | ||
Tcl_Obj * | CONST[] | ||
) | [static] |
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_get_breakpoint_list | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 450 of file gdbtk-bp.c.
References ALL_BREAKPOINTS, bp_breakpoint, breakpoint::number, gdbtk_result::obj_ptr, result_ptr, and breakpoint::type.
static int gdb_get_trace_frame_num | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 679 of file gdbtk-bp.c.
References get_traceframe_number(), gdbtk_result::obj_ptr, and result_ptr.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_get_tracepoint_info | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 694 of file gdbtk-bp.c.
References bp_location::address, bp_enabled, breakpoint_commands(), breakpoint::commands, core_addr_to_string(), breakpoint::enable_state, find_pc_line(), gdbtk_result::flags, GDBTK_IN_TCL_RESULT, gdbtk_set_result(), get_tracepoint(), breakpoint::hit_count, command_line::line, symtab_and_line::line, breakpoint::loc, command_line::next, gdbtk_result::obj_ptr, tracepoint::pass_count, pc_function_name(), result_ptr, tracepoint::step_count, symtab_and_line::symtab, symtab_to_filename(), and breakpoint::thread.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_get_tracepoint_list | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 769 of file gdbtk-bp.c.
References breakpoint::number, gdbtk_result::obj_ptr, result_ptr, VEC, VEC_free, and VEC_iterate.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_set_bp | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 485 of file gdbtk-bp.c.
References AUTO_BOOLEAN_FALSE, AUTO_BOOLEAN_TRUE, bkpt_breakpoint_ops, bp_breakpoint, create_breakpoint(), gdbtk_result::flags, GDBTK_IN_TCL_RESULT, gdbtk_set_result(), get_current_arch(), breakpoint::ignore_count, gdb_exception::reason, result_ptr, RETURN_MASK_ALL, breakpoint::thread, and TRY_CATCH.
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_trace_status | ( | ClientData | , |
Tcl_Interp * | , | ||
int | , | ||
Tcl_Obj * | CONST[] | ||
) | [static] |
Referenced by Gdbtk_Breakpoint_Init().
static int gdb_trace_status | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 790 of file gdbtk-bp.c.
References current_trace_status(), gdbtk_result::obj_ptr, and result_ptr.
static int gdb_tracepoint_exists_command | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | objc, | ||
Tcl_Obj *CONST | objv[] | ||
) | [static] |
Definition at line 848 of file gdbtk-bp.c.
References gdbtk_result::obj_ptr, result_ptr, and tracepoint_exists().
Referenced by Gdbtk_Breakpoint_Init().
int Gdbtk_Breakpoint_Init | ( | Tcl_Interp * | interp | ) |
Definition at line 115 of file gdbtk-bp.c.
References gdb_actions_command(), gdb_find_bp_at_addr(), gdb_find_bp_at_line(), gdb_get_breakpoint_info(), gdb_get_breakpoint_list(), gdb_get_trace_frame_num(), gdb_get_tracepoint_info(), gdb_get_tracepoint_list(), gdb_set_bp(), gdb_trace_status(), gdb_tracepoint_exists_command(), and gdbtk_call_wrapper().
Referenced by Gdbtk_Init().
void gdbtk_create_breakpoint | ( | struct breakpoint * | b | ) |
Definition at line 562 of file gdbtk-bp.c.
References BREAKPOINT_IS_INTERESTING, breakpoint_notify(), and breakpoint::number.
Referenced by gdbtk_add_hooks().
void gdbtk_delete_breakpoint | ( | struct breakpoint * | b | ) |
Definition at line 571 of file gdbtk-bp.c.
References breakpoint_notify(), and breakpoint::number.
Referenced by gdbtk_add_hooks().
void gdbtk_modify_breakpoint | ( | struct breakpoint * | b | ) |
Definition at line 577 of file gdbtk-bp.c.
References breakpoint_notify(), and breakpoint::number.
Referenced by gdbtk_add_hooks().
static char* gdbtk_read_next_line | ( | void | ) | [static] |
Definition at line 148 of file gdbtk-bp.c.
References gdbtk_obj_array, gdbtk_obj_array_cnt, and gdbtk_obj_array_ptr.
Referenced by gdb_actions_command().
static Tcl_Obj * get_breakpoint_commands | ( | struct command_line * | cmd | ) | [static] |
Definition at line 373 of file gdbtk-bp.c.
References command_line::body_count, command_line::body_list, break_control, continue_control, command_line::control_type, if_control, invalid_control, command_line::line, command_line::next, simple_control, and while_control.
Referenced by gdb_get_breakpoint_info().
void report_error | ( | void | ) |
Definition at line 365 of file gdbtk-hooks.c.
References gdbtk_interp, and TclDebug().
Referenced by breakpoint_notify(), gdbtk_annotate_signal(), gdbtk_attach(), gdbtk_detach(), gdbtk_ignorable_warning(), gdbtk_load_hash(), gdbtk_memory_changed(), gdbtk_post_add_symbol(), gdbtk_read(), gdbtk_readline_end(), gdbtk_register_changed(), gdbtk_set_hook(), gdbtk_trace_find(), and gdbtk_two_elem_cmd().
static int tracepoint_exists | ( | char * | args | ) | [static] |
Definition at line 806 of file gdbtk-bp.c.
References bp_location::address, decode_line_1(), DECODE_LINE_FUNFIRSTLINE, symtab::dirname, symtab::filename, free(), symtab_and_line::line, breakpoint::loc, symtabs_and_lines::nelts, breakpoint::number, symtab_and_line::pc, resolve_sal_pc(), symtabs_and_lines::sals, symtab_and_line::symtab, VEC, VEC_free, VEC_iterate, and xmalloc().
Referenced by gdb_tracepoint_exists_command().
char* bpdisp[] |
{"delete", "delstop", "disable", "donttouch"}
Definition at line 63 of file gdbtk-bp.c.
char* bptypes[] |
{"none", "breakpoint", "hw breakpoint", "until", "finish", "watchpoint", "hw watchpoint", "read watchpoint", "acc watchpoint", "longjmp", "longjmp resume", "step resume", "sigtramp", "watchpoint scope", "call dummy", "shlib events", "catch load", "catch unload", "catch fork", "catch vfork", "catch exec", "catch catch", "catch throw" }
Definition at line 53 of file gdbtk-bp.c.
Referenced by gdb_get_breakpoint_info().
struct breakpoint* breakpoint_chain |
Definition at line 565 of file breakpoint.c.
Referenced by add_to_breakpoint_chain(), and tui_update_breakpoint_info().
Tcl_Obj** gdbtk_obj_array [static] |
Definition at line 37 of file gdbtk-bp.c.
Referenced by gdb_actions_command(), and gdbtk_read_next_line().
int gdbtk_obj_array_cnt [static] |
Definition at line 38 of file gdbtk-bp.c.
Referenced by gdb_actions_command(), and gdbtk_read_next_line().
int gdbtk_obj_array_ptr [static] |
Definition at line 39 of file gdbtk-bp.c.
Referenced by gdb_actions_command(), and gdbtk_read_next_line().