GDB (xrefs)
Classes | Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/stap-probe.c File Reference
#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.

Classes

struct  stap_probe_arg
struct  stap_probe

Defines

#define STAP_BASE_SECTION_NAME   ".stapsdt.base"

Typedefs

typedef struct stap_probe_arg stap_probe_arg_s

Enumerations

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
}
enum  stap_operand_prec {
  STAP_OPERAND_PREC_NONE = 0, STAP_OPERAND_PREC_LOGICAL_OR, STAP_OPERAND_PREC_LOGICAL_AND, STAP_OPERAND_PREC_ADD_CMP,
  STAP_OPERAND_PREC_BITWISE, STAP_OPERAND_PREC_MUL
}

Functions

 DEF_VEC_O (stap_probe_arg_s)
static void stap_parse_argument_1 (struct stap_parse_info *p, int has_lhs, enum stap_operand_prec prec)
static void stap_parse_argument_conditionally (struct stap_parse_info *p)
static int stap_is_operator (const char *op)
static void show_stapexpressiondebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static enum stap_operand_prec stap_get_operator_prec (enum exp_opcode op)
static enum exp_opcode stap_get_opcode (const char **s)
static struct typestap_get_expected_argument_type (struct gdbarch *gdbarch, enum stap_arg_bitness b)
static void stap_parse_register_operand (struct stap_parse_info *p)
static void stap_parse_single_operand (struct stap_parse_info *p)
static struct expressionstap_parse_argument (const char **arg, struct type *atype, struct gdbarch *gdbarch)
static void stap_parse_probe_arguments (struct stap_probe *probe)
static unsigned stap_get_probe_argument_count (struct probe *probe_generic)
static struct stap_probe_argstap_get_arg (struct stap_probe *probe, unsigned n)
static int stap_can_evaluate_probe_arguments (struct probe *probe_generic)
static struct valuestap_evaluate_probe_argument (struct probe *probe_generic, unsigned n)
static void stap_compile_to_ax (struct probe *probe_generic, struct agent_expr *expr, struct axs_value *value, unsigned n)
static void stap_probe_destroy (struct probe *probe_generic)
static struct valuecompute_probe_arg (struct gdbarch *arch, struct internalvar *ivar, void *data)
static void compile_probe_arg (struct internalvar *ivar, struct agent_expr *expr, struct axs_value *value, void *data)
static void stap_modify_semaphore (CORE_ADDR address, int set, struct gdbarch *gdbarch)
static void stap_set_semaphore (struct probe *probe_generic, struct gdbarch *gdbarch)
static void stap_clear_semaphore (struct probe *probe_generic, struct gdbarch *gdbarch)
static void handle_stap_probe (struct objfile *objfile, struct sdt_note *el, VEC(probe_p)**probesp, CORE_ADDR base)
static void get_stap_base_address_1 (bfd *abfd, asection *sect, void *obj)
static int get_stap_base_address (bfd *obfd, bfd_vma *base)
static void stap_get_probes (VEC(probe_p)**probesp, struct objfile *objfile)
static void stap_relocate (struct probe *probe_generic, CORE_ADDR delta)
static int stap_probe_is_linespec (const char **linespecp)
static void stap_gen_info_probes_table_header (VEC(info_probe_column_s)**heads)
static void stap_gen_info_probes_table_values (struct probe *probe_generic, VEC(const_char_ptr)**ret)
static void info_probes_stap_command (char *arg, int from_tty)
void _initialize_stap_probe (void)

Variables

static struct probe_ops stap_probe_ops
static unsigned int stap_expression_debug = 0
static struct internalvar_funcs probe_funcs

Define Documentation

#define STAP_BASE_SECTION_NAME   ".stapsdt.base"

Definition at line 47 of file stap-probe.c.

Referenced by get_stap_base_address_1().


Typedef Documentation

Definition at line 91 of file stap-probe.c.


Enumeration Type Documentation

Enumerator:
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.

Enumerator:
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.


Function Documentation

void _initialize_stap_probe ( void  )
static void compile_probe_arg ( struct internalvar ivar,
struct agent_expr expr,
struct axs_value value,
void *  data 
) [static]
static struct value* compute_probe_arg ( struct gdbarch arch,
struct internalvar ivar,
void *  data 
) [static, read]
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]
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]
static void stap_clear_semaphore ( struct probe probe_generic,
struct gdbarch gdbarch 
) [static]
static void stap_compile_to_ax ( struct probe probe_generic,
struct agent_expr expr,
struct axs_value value,
unsigned  n 
) [static]
static struct value* stap_evaluate_probe_argument ( struct probe probe_generic,
unsigned  n 
) [static, read]
static void stap_gen_info_probes_table_header ( VEC(info_probe_column_s)**  heads) [static]
static void stap_gen_info_probes_table_values ( struct probe probe_generic,
VEC(const_char_ptr)**  ret 
) [static]
static struct stap_probe_arg* stap_get_arg ( struct stap_probe probe,
unsigned  n 
) [static, read]
static struct type* stap_get_expected_argument_type ( struct gdbarch gdbarch,
enum stap_arg_bitness  b 
) [static, read]
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]
static unsigned stap_get_probe_argument_count ( struct probe probe_generic) [static]
static void stap_get_probes ( VEC(probe_p)**  probesp,
struct objfile objfile 
) [static]
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]
static struct expression* stap_parse_argument ( const char **  arg,
struct type atype,
struct gdbarch gdbarch 
) [static, read]
static void stap_parse_argument_1 ( struct stap_parse_info p,
int  has_lhs,
enum stap_operand_prec  prec 
) [static]
static void stap_parse_argument_conditionally ( struct stap_parse_info p) [static]
static void stap_parse_probe_arguments ( struct stap_probe probe) [static]
static void stap_parse_register_operand ( struct stap_parse_info p) [static]
static void stap_parse_single_operand ( struct stap_parse_info p) [static]
static void stap_probe_destroy ( struct probe probe_generic) [static]
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]
static void stap_set_semaphore ( struct probe probe_generic,
struct gdbarch gdbarch 
) [static]

Variable Documentation

struct internalvar_funcs probe_funcs [static]
Initial value:

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]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines