|
GDB (xrefs)
|
#include "defs.h"#include "stap-probe.h"#include "probe.h"#include "vec.h"#include "ui-out.h"#include "objfiles.h"#include "arch-utils.h"#include "command.h"#include "gdbcmd.h"#include "filenames.h"#include "value.h"#include "exceptions.h"#include "ax.h"#include "ax-gdb.h"#include "complaints.h"#include "cli/cli-utils.h"#include "linespec.h"#include "user-regs.h"#include "parser-defs.h"#include "language.h"#include "elf-bfd.h"#include <ctype.h>Go to the source code of this file.
| #define STAP_BASE_SECTION_NAME ".stapsdt.base" |
Definition at line 47 of file stap-probe.c.
Referenced by get_stap_base_address_1().
| typedef struct stap_probe_arg stap_probe_arg_s |
Definition at line 91 of file stap-probe.c.
| enum stap_arg_bitness |
| STAP_ARG_BITNESS_UNDEFINED | |
| STAP_ARG_BITNESS_32BIT_UNSIGNED | |
| STAP_ARG_BITNESS_32BIT_SIGNED | |
| STAP_ARG_BITNESS_64BIT_UNSIGNED | |
| STAP_ARG_BITNESS_64BIT_SIGNED |
Definition at line 68 of file stap-probe.c.
| enum stap_operand_prec |
| STAP_OPERAND_PREC_NONE | |
| STAP_OPERAND_PREC_LOGICAL_OR | |
| STAP_OPERAND_PREC_LOGICAL_AND | |
| STAP_OPERAND_PREC_ADD_CMP | |
| STAP_OPERAND_PREC_BITWISE | |
| STAP_OPERAND_PREC_MUL |
Definition at line 125 of file stap-probe.c.
| void _initialize_stap_probe | ( | void | ) |
| static void compile_probe_arg | ( | struct internalvar * | ivar, |
| struct agent_expr * | expr, | ||
| struct axs_value * | value, | ||
| void * | data | ||
| ) | [static] |
Definition at line 1201 of file stap-probe.c.
References _, ax_const_l(), axs_rvalue, builtin_type::builtin_int, builtin_type(), core_addr_to_string(), error(), find_probe_by_pc(), gdb_assert, agent_expr::gdbarch, int, axs_value::kind, probe::objfile, agent_expr::scope, objfile::sf, sym_probe_fns::sym_compile_to_ax, sym_probe_fns::sym_get_probe_argument_count, sym_fns::sym_probe_fns, and axs_value::type.
| static struct value* compute_probe_arg | ( | struct gdbarch * | arch, |
| struct internalvar * | ivar, | ||
| void * | data | ||
| ) | [static, read] |
Definition at line 1163 of file stap-probe.c.
References _, core_addr_to_string(), error(), find_probe_by_pc(), gdb_assert, get_frame_pc(), get_selected_frame(), int, probe::objfile, objfile::sf, sym_probe_fns::sym_evaluate_probe_argument, sym_probe_fns::sym_get_probe_argument_count, sym_fns::sym_probe_fns, and value_from_longest().
| static int get_stap_base_address | ( | bfd * | obfd, |
| bfd_vma * | base | ||
| ) | [static] |
Definition at line 1430 of file stap-probe.c.
References _, complaint(), get_stap_base_address_1(), and symfile_complaints.
Referenced by stap_get_probes().
| static void get_stap_base_address_1 | ( | bfd * | abfd, |
| asection * | sect, | ||
| void * | obj | ||
| ) | [static] |
Definition at line 1416 of file stap-probe.c.
References STAP_BASE_SECTION_NAME.
Referenced by get_stap_base_address().
| static void handle_stap_probe | ( | struct objfile * | objfile, |
| struct sdt_note * | el, | ||
| VEC(probe_p)** | probesp, | ||
| CORE_ADDR | base | ||
| ) | [static] |
Definition at line 1335 of file stap-probe.c.
References _, probe::address, ANOFFSET, stap_probe::args_parsed, stap_probe::args_u, builtin_type::builtin_data_ptr, builtin_type(), complaint(), extract_typed_address(), get_objfile_arch(), probe::name, objfile::obfd, probe::objfile, objfile_name(), objfile::objfile_obstack, stap_probe::p, probe::pops, probe::provider, SECT_OFF_DATA, SECT_OFF_TEXT, objfile::section_offsets, stap_probe::sem_addr, size, stap_probe_ops, symfile_complaints, stap_probe::text, and VEC_safe_push.
Referenced by stap_get_probes().
| static void info_probes_stap_command | ( | char * | arg, |
| int | from_tty | ||
| ) | [static] |
Definition at line 1572 of file stap-probe.c.
References info_probes_for_ops().
| static void show_stapexpressiondebug | ( | struct ui_file * | file, |
| int | from_tty, | ||
| struct cmd_list_element * | c, | ||
| const char * | value | ||
| ) | [static] |
Definition at line 160 of file stap-probe.c.
References _, and fprintf_filtered().
| static int stap_can_evaluate_probe_arguments | ( | struct probe * | probe_generic | ) | [static] |
Definition at line 1086 of file stap-probe.c.
References gdbarch_stap_is_single_operand_p(), get_objfile_arch(), probe::objfile, and stap_probe::p.
| static void stap_clear_semaphore | ( | struct probe * | probe_generic, |
| struct gdbarch * | gdbarch | ||
| ) | [static] |
Definition at line 1302 of file stap-probe.c.
References gdb_assert, probe::pops, stap_probe::sem_addr, stap_modify_semaphore(), and stap_probe_ops.
| static void stap_compile_to_ax | ( | struct probe * | probe_generic, |
| struct agent_expr * | expr, | ||
| struct axs_value * | value, | ||
| unsigned | n | ||
| ) | [static] |
Definition at line 1117 of file stap-probe.c.
References stap_probe_arg::aexpr, stap_probe_arg::atype, expression::elts, gdb_assert, gen_expr(), probe::pops, require_rvalue(), stap_get_arg(), stap_probe_ops, and axs_value::type.
| static struct value* stap_evaluate_probe_argument | ( | struct probe * | probe_generic, |
| unsigned | n | ||
| ) | [static, read] |
Definition at line 1101 of file stap-probe.c.
References stap_probe_arg::aexpr, stap_probe_arg::atype, EVAL_NORMAL, evaluate_subexp_standard(), gdb_assert, probe::pops, stap_get_arg(), and stap_probe_ops.
| static void stap_gen_info_probes_table_header | ( | VEC(info_probe_column_s)** | heads | ) | [static] |
Definition at line 1523 of file stap-probe.c.
References _, info_probe_column::field_name, info_probe_column::print_name, and VEC_safe_push.
| static void stap_gen_info_probes_table_values | ( | struct probe * | probe_generic, |
| VEC(const_char_ptr)** | ret | ||
| ) | [static] |
Definition at line 1534 of file stap-probe.c.
References gdb_assert, get_objfile_arch(), probe::objfile, stap_probe::p, probe::pops, print_core_address(), stap_probe::sem_addr, stap_probe_ops, and VEC_safe_push.
| static struct stap_probe_arg* stap_get_arg | ( | struct stap_probe * | probe, |
| unsigned | n | ||
| ) | [static, read] |
Definition at line 1075 of file stap-probe.c.
References stap_probe::args_parsed, stap_probe::args_u, stap_parse_probe_arguments(), and VEC_index.
Referenced by stap_compile_to_ax(), and stap_evaluate_probe_argument().
| static struct type* stap_get_expected_argument_type | ( | struct gdbarch * | gdbarch, |
| enum stap_arg_bitness | b | ||
| ) | [static, read] |
Definition at line 319 of file stap-probe.c.
References _, builtin_type::builtin_int32, builtin_type::builtin_int64, builtin_type(), builtin_type::builtin_uint32, builtin_type::builtin_uint64, gdbarch_addr_bit(), internal_error(), STAP_ARG_BITNESS_32BIT_SIGNED, STAP_ARG_BITNESS_32BIT_UNSIGNED, STAP_ARG_BITNESS_64BIT_SIGNED, STAP_ARG_BITNESS_64BIT_UNSIGNED, and STAP_ARG_BITNESS_UNDEFINED.
Referenced by stap_parse_probe_arguments().
| static enum exp_opcode stap_get_opcode | ( | const char ** | s | ) | [static] |
Definition at line 213 of file stap-probe.c.
References _, gdb_assert, and internal_error().
Referenced by stap_parse_argument_1().
| static enum stap_operand_prec stap_get_operator_prec | ( | enum exp_opcode | op | ) | [static] |
Definition at line 171 of file stap-probe.c.
References STAP_OPERAND_PREC_ADD_CMP, STAP_OPERAND_PREC_BITWISE, STAP_OPERAND_PREC_LOGICAL_AND, STAP_OPERAND_PREC_LOGICAL_OR, STAP_OPERAND_PREC_MUL, and STAP_OPERAND_PREC_NONE.
Referenced by stap_parse_argument_1().
| static unsigned stap_get_probe_argument_count | ( | struct probe * | probe_generic | ) | [static] |
Definition at line 1005 of file stap-probe.c.
References _, stap_probe::args_parsed, stap_probe::args_u, probe_ops::can_evaluate_probe_arguments, gdb_assert, probe::pops, stap_parse_probe_arguments(), stap_probe_ops, VEC_length, and warning().
| static void stap_get_probes | ( | VEC(probe_p)** | probesp, |
| struct objfile * | objfile | ||
| ) | [static] |
Definition at line 1454 of file stap-probe.c.
References _, complaint(), get_stap_base_address(), handle_stap_probe(), objfile::obfd, objfile::separate_debug_objfile_backlink, symfile_complaints, and VEC_length.
| static int stap_is_operator | ( | const char * | op | ) | [static] |
Definition at line 1042 of file stap-probe.c.
Referenced by stap_parse_argument_1().
| static void stap_modify_semaphore | ( | CORE_ADDR | address, |
| int | set, | ||
| struct gdbarch * | gdbarch | ||
| ) | [static] |
Definition at line 1249 of file stap-probe.c.
References _, builtin_type(), builtin_type::builtin_unsigned_short, extract_unsigned_integer(), gdbarch_byte_order(), LONGEST, store_unsigned_integer(), target_read_memory(), target_write_memory(), TYPE_LENGTH, ULONGEST, and warning().
Referenced by stap_clear_semaphore(), and stap_set_semaphore().
| static struct expression* stap_parse_argument | ( | const char ** | arg, |
| struct type * | atype, | ||
| struct gdbarch * | gdbarch | ||
| ) | [static, read] |
Definition at line 868 of file stap-probe.c.
References stap_parse_info::arg, cleanup::arg, stap_parse_info::arg_type, current_language, discard_cleanups(), expout, free_current_contents(), gdb_assert, stap_parse_info::gdbarch, initialize_expout(), stap_parse_info::inside_paren_p, make_cleanup(), reallocate_expout(), stap_parse_info::saved_arg, skip_spaces_const(), STAP_OPERAND_PREC_NONE, stap_parse_argument_1(), write_exp_elt_opcode(), and write_exp_elt_type().
Referenced by stap_parse_probe_arguments().
| static void stap_parse_argument_1 | ( | struct stap_parse_info * | p, |
| int | has_lhs, | ||
| enum stap_operand_prec | prec | ||
| ) | [static] |
Definition at line 750 of file stap-probe.c.
References _, stap_parse_info::arg, error(), stap_parse_info::inside_paren_p, stap_parse_info::saved_arg, skip_spaces_const(), stap_get_opcode(), stap_get_operator_prec(), stap_is_operator(), stap_parse_argument_conditionally(), and write_exp_elt_opcode().
Referenced by stap_parse_argument(), and stap_parse_argument_conditionally().
| static void stap_parse_argument_conditionally | ( | struct stap_parse_info * | p | ) | [static] |
Definition at line 716 of file stap-probe.c.
References _, stap_parse_info::arg, error(), stap_parse_info::gdbarch, gdbarch_stap_is_single_operand(), stap_parse_info::inside_paren_p, stap_parse_info::saved_arg, skip_spaces_const(), STAP_OPERAND_PREC_NONE, stap_parse_argument_1(), and stap_parse_single_operand().
Referenced by stap_parse_argument_1(), and stap_parse_single_operand().
| static void stap_parse_probe_arguments | ( | struct stap_probe * | probe | ) | [static] |
Definition at line 917 of file stap-probe.c.
References _, stap_probe_arg::aexpr, stap_probe::args_parsed, stap_probe::args_u, stap_probe_arg::atype, stap_probe_arg::bitness, complaint(), dump_prefix_expression(), dump_raw_expression(), gdb_assert, gdb_stdlog, get_objfile_arch(), memset(), probe::name, probe::objfile, stap_probe::p, prefixify_expression(), skip_spaces_const(), STAP_ARG_BITNESS_32BIT_SIGNED, STAP_ARG_BITNESS_32BIT_UNSIGNED, STAP_ARG_BITNESS_64BIT_SIGNED, STAP_ARG_BITNESS_64BIT_UNSIGNED, STAP_ARG_BITNESS_UNDEFINED, stap_expression_debug, stap_get_expected_argument_type(), stap_parse_argument(), symfile_complaints, stap_probe::text, and VEC_safe_push.
Referenced by stap_get_arg(), and stap_get_probe_argument_count().
| static void stap_parse_register_operand | ( | struct stap_parse_info * | p | ) | [static] |
Definition at line 369 of file stap-probe.c.
References _, stap_parse_info::arg, stap_parse_info::arg_type, error(), stap_parse_info::gdbarch, gdbarch_stap_gdb_register_prefix(), gdbarch_stap_gdb_register_suffix(), gdbarch_stap_register_indirection_prefix(), gdbarch_stap_register_indirection_suffix(), gdbarch_stap_register_prefix(), gdbarch_stap_register_suffix(), len, stoken::length, lookup_pointer_type(), stoken::ptr, stap_parse_info::saved_arg, user_reg_map_name_to_regnum(), write_exp_elt_longcst(), write_exp_elt_opcode(), write_exp_elt_type(), and write_exp_string().
Referenced by stap_parse_single_operand().
| static void stap_parse_single_operand | ( | struct stap_parse_info * | p | ) | [static] |
Definition at line 548 of file stap-probe.c.
References _, stap_parse_info::arg, error(), stap_parse_info::gdbarch, gdbarch_stap_integer_prefix(), gdbarch_stap_integer_suffix(), gdbarch_stap_parse_special_token(), gdbarch_stap_parse_special_token_p(), gdbarch_stap_register_indirection_prefix(), gdbarch_stap_register_prefix(), stap_parse_info::inside_paren_p, stap_parse_info::saved_arg, skip_spaces_const(), stap_parse_argument_conditionally(), stap_parse_register_operand(), write_exp_elt_longcst(), write_exp_elt_opcode(), and write_exp_elt_type().
Referenced by stap_parse_argument_conditionally().
| static void stap_probe_destroy | ( | struct probe * | probe_generic | ) | [static] |
Definition at line 1139 of file stap-probe.c.
References stap_probe_arg::aexpr, stap_probe::args_parsed, stap_probe::args_u, gdb_assert, probe::pops, stap_probe_ops, VEC_free, VEC_iterate, and xfree().
| static int stap_probe_is_linespec | ( | const char ** | linespecp | ) | [static] |
Definition at line 1515 of file stap-probe.c.
References probe_is_linespec_by_keyword().
| static void stap_relocate | ( | struct probe * | probe_generic, |
| CORE_ADDR | delta | ||
| ) | [static] |
Definition at line 1503 of file stap-probe.c.
References probe::address, gdb_assert, stap_probe::p, probe::pops, stap_probe::sem_addr, and stap_probe_ops.
| static void stap_set_semaphore | ( | struct probe * | probe_generic, |
| struct gdbarch * | gdbarch | ||
| ) | [static] |
Definition at line 1290 of file stap-probe.c.
References gdb_assert, probe::pops, stap_probe::sem_addr, stap_modify_semaphore(), and stap_probe_ops.
struct internalvar_funcs probe_funcs [static] |
{
compute_probe_arg,
compile_probe_arg,
NULL
}
Definition at line 1313 of file stap-probe.c.
unsigned int stap_expression_debug = 0 [static] |
Definition at line 56 of file stap-probe.c.
Referenced by stap_parse_probe_arguments().
static struct probe_ops stap_probe_ops [static] |
{
stap_probe_is_linespec,
stap_get_probes,
stap_relocate,
stap_get_probe_argument_count,
stap_can_evaluate_probe_arguments,
stap_evaluate_probe_argument,
stap_compile_to_ax,
stap_set_semaphore,
stap_clear_semaphore,
stap_probe_destroy,
stap_gen_info_probes_table_header,
stap_gen_info_probes_table_values,
}
Definition at line 51 of file stap-probe.c.
Referenced by handle_stap_probe(), stap_clear_semaphore(), stap_compile_to_ax(), stap_evaluate_probe_argument(), stap_gen_info_probes_table_values(), stap_get_probe_argument_count(), stap_probe_destroy(), stap_relocate(), and stap_set_semaphore().
1.7.6.1