GDB (xrefs)
Functions
/home/stan/gdb/src/gdb/ax-gdb.c File Reference
#include "defs.h"
#include "symtab.h"
#include "symfile.h"
#include "gdbtypes.h"
#include "language.h"
#include "value.h"
#include "expression.h"
#include "command.h"
#include "gdbcmd.h"
#include "frame.h"
#include "target.h"
#include "ax.h"
#include "ax-gdb.h"
#include "gdb_string.h"
#include "block.h"
#include "regcache.h"
#include "user-regs.h"
#include "dictionary.h"
#include "breakpoint.h"
#include "tracepoint.h"
#include "cp-support.h"
#include "arch-utils.h"
#include "cli/cli-utils.h"
#include "linespec.h"
#include "valprint.h"
#include "c-lang.h"
#include "format.h"

Go to the source code of this file.

Functions

static struct valueconst_var_ref (struct symbol *var)
static struct valueconst_expr (union exp_element **pc)
static struct valuemaybe_const_expr (union exp_element **pc)
static void gen_traced_pop (struct gdbarch *, struct agent_expr *, struct axs_value *)
static void gen_sign_extend (struct agent_expr *, struct type *)
static void gen_extend (struct agent_expr *, struct type *)
static void gen_fetch (struct agent_expr *, struct type *)
static void gen_left_shift (struct agent_expr *, int)
static void gen_frame_args_address (struct gdbarch *, struct agent_expr *)
static void gen_frame_locals_address (struct gdbarch *, struct agent_expr *)
static void gen_offset (struct agent_expr *ax, int offset)
static void gen_sym_offset (struct agent_expr *, struct symbol *)
static void gen_var_ref (struct gdbarch *, struct agent_expr *ax, struct axs_value *value, struct symbol *var)
static void gen_int_literal (struct agent_expr *ax, struct axs_value *value, LONGEST k, struct type *type)
static void gen_usual_unary (struct expression *exp, struct agent_expr *ax, struct axs_value *value)
static int type_wider_than (struct type *type1, struct type *type2)
static struct typemax_type (struct type *type1, struct type *type2)
static void gen_conversion (struct agent_expr *ax, struct type *from, struct type *to)
static int is_nontrivial_conversion (struct type *from, struct type *to)
static void gen_usual_arithmetic (struct expression *exp, struct agent_expr *ax, struct axs_value *value1, struct axs_value *value2)
static void gen_integral_promotions (struct expression *exp, struct agent_expr *ax, struct axs_value *value)
static void gen_cast (struct agent_expr *ax, struct axs_value *value, struct type *type)
static void gen_scale (struct agent_expr *ax, enum agent_op op, struct type *type)
static void gen_ptradd (struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2)
static void gen_ptrsub (struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2)
static void gen_ptrdiff (struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2, struct type *result_type)
static void gen_binop (struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2, enum agent_op op, enum agent_op op_unsigned, int may_carry, char *name)
static void gen_logical_not (struct agent_expr *ax, struct axs_value *value, struct type *result_type)
static void gen_complement (struct agent_expr *ax, struct axs_value *value)
static void gen_deref (struct agent_expr *, struct axs_value *)
static void gen_address_of (struct agent_expr *, struct axs_value *)
static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, int start, int end)
static void gen_primitive_field (struct expression *exp, struct agent_expr *ax, struct axs_value *value, int offset, int fieldno, struct type *type)
static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, char *field, int offset, struct type *type)
static void gen_struct_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, char *field, char *operator_name, char *operand_name)
static void gen_static_field (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, struct type *type, int fieldno)
static void gen_repeat (struct expression *exp, union exp_element **pc, struct agent_expr *ax, struct axs_value *value)
static void gen_sizeof (struct expression *exp, union exp_element **pc, struct agent_expr *ax, struct axs_value *value, struct type *size_type)
static void gen_expr_binop_rest (struct expression *exp, enum exp_opcode op, union exp_element **pc, struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2)
static void agent_command (char *exp, int from_tty)
static void gen_trace_static_fields (struct gdbarch *gdbarch, struct agent_expr *ax, struct type *type)
void require_rvalue (struct agent_expr *ax, struct axs_value *value)
static void gen_equal (struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2, struct type *result_type)
static void gen_less (struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2, struct type *result_type)
static int gen_namespace_elt (struct expression *exp, struct agent_expr *ax, struct axs_value *value, const struct type *curtype, char *name)
static int gen_maybe_namespace_elt (struct expression *exp, struct agent_expr *ax, struct axs_value *value, const struct type *curtype, char *name)
static int gen_struct_elt_for_reference (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, char *fieldname)
static int gen_aggregate_elt_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, char *field, char *operator_name, char *operand_name)
void gen_expr (struct expression *exp, union exp_element **pc, struct agent_expr *ax, struct axs_value *value)
struct agent_exprgen_trace_for_var (CORE_ADDR scope, struct gdbarch *gdbarch, struct symbol *var, int trace_string)
struct agent_exprgen_trace_for_expr (CORE_ADDR scope, struct expression *expr, int trace_string)
struct agent_exprgen_eval_for_expr (CORE_ADDR scope, struct expression *expr)
struct agent_exprgen_trace_for_return_address (CORE_ADDR scope, struct gdbarch *gdbarch, int trace_string)
struct agent_exprgen_printf (CORE_ADDR scope, struct gdbarch *gdbarch, CORE_ADDR function, LONGEST channel, const char *format, int fmtlen, struct format_piece *frags, int nargs, struct expression **exprs)
static void agent_eval_command_one (const char *exp, int eval, CORE_ADDR pc)
static void agent_command_1 (char *exp, int eval)
static void agent_eval_command (char *exp, int from_tty)
static void maint_agent_printf_command (char *exp, int from_tty)
void _initialize_ax_gdb (void)

Function Documentation

void _initialize_ax_gdb ( void  )
static void agent_command ( char *  exp,
int  from_tty 
) [static]

Definition at line 2675 of file ax-gdb.c.

References agent_command_1().

static void agent_command_1 ( char *  exp,
int  eval 
) [static]
static void agent_eval_command ( char *  exp,
int  from_tty 
) [static]

Definition at line 2685 of file ax-gdb.c.

References agent_command_1().

static void agent_eval_command_one ( const char *  exp,
int  eval,
CORE_ADDR  pc 
) [static]
static struct value * const_expr ( union exp_element **  pc) [static, read]

Definition at line 215 of file ax-gdb.c.

References const_var_ref(), LONGEST, value_from_longest(), and value_neg().

Referenced by gen_repeat(), and maybe_const_expr().

static struct value * const_var_ref ( struct symbol var) [static, read]
static void gen_address_of ( struct agent_expr ax,
struct axs_value value 
) [static]
static int gen_aggregate_elt_ref ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
struct type type,
char *  field,
char *  operator_name,
char *  operand_name 
) [static]
static void gen_binop ( struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2,
enum agent_op  op,
enum agent_op  op_unsigned,
int  may_carry,
char *  name 
) [static]
static void gen_bitfield_ref ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
struct type type,
int  start,
int  end 
) [static]
static void gen_cast ( struct agent_expr ax,
struct axs_value value,
struct type type 
) [static]
static void gen_complement ( struct agent_expr ax,
struct axs_value value 
) [static]

Definition at line 1182 of file ax-gdb.c.

References _, ax_simple(), error(), gen_extend(), axs_value::type, TYPE_CODE, and TYPE_CODE_INT.

Referenced by gen_expr().

static void gen_conversion ( struct agent_expr ax,
struct type from,
struct type to 
) [static]
static void gen_deref ( struct agent_expr ax,
struct axs_value value 
) [static]
static void gen_equal ( struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2,
struct type result_type 
) [static]

Definition at line 1115 of file ax-gdb.c.

References ax_simple(), axs_rvalue, gen_binop(), axs_value::kind, pointer_type(), and axs_value::type.

Referenced by gen_expr_binop_rest().

struct agent_expr* gen_eval_for_expr ( CORE_ADDR  scope,
struct expression expr 
) [read]
void gen_expr ( struct expression exp,
union exp_element **  pc,
struct agent_expr ax,
struct axs_value value 
)

Definition at line 1777 of file ax-gdb.c.

References _, ax_const_l(), ax_goto(), ax_label(), ax_tsv(), axs_lvalue_memory, axs_lvalue_register, axs_rvalue, block_for_pc(), block_linkage_function(), builtin_type::builtin_int, builtin_type::builtin_long_long, builtin_type(), BYTES_TO_EXP_ELEM, check_typedef(), compile_internalvar_to_ax(), expression::elts, error(), EVAL_AVOID_SIDE_EFFECTS, evaluate_subexp(), find_trace_state_variable(), func, expression::gdbarch, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gen_address_of(), gen_aggregate_elt_ref(), gen_binop(), gen_cast(), gen_complement(), gen_deref(), gen_expr(), gen_expr_binop_rest(), gen_int_literal(), gen_integral_promotions(), gen_logical_not(), gen_repeat(), gen_sizeof(), gen_struct_ref(), gen_traced_pop(), gen_usual_arithmetic(), gen_usual_unary(), gen_var_ref(), internal_error(), internalvar_name(), axs_value::kind, language_defn::la_name_of_this, language_def(), agent_expr::len, type::length, LONGEST, longest_to_int(), lookup_language_this(), maybe_const_expr(), name, trace_state_variable::number, offset, op_name(), axs_value::optimized_out, pointer_type(), axs_value::reg, register_type(), require_rvalue(), agent_expr::scope, SYMBOL_LANGUAGE, SYMBOL_PRINT_NAME, agent_expr::tracing, axs_value::type, type, axs_value::u, user_reg_map_name_to_regnum(), value_as_long(), and value_type().

Referenced by gen_eval_for_expr(), gen_expr(), gen_expr_binop_rest(), gen_printf(), gen_repeat(), gen_sizeof(), gen_trace_for_expr(), and stap_compile_to_ax().

static void gen_expr_binop_rest ( struct expression exp,
enum exp_opcode  op,
union exp_element **  pc,
struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2 
) [static]
static void gen_extend ( struct agent_expr ax,
struct type type 
) [static]
static void gen_fetch ( struct agent_expr ax,
struct type type 
) [static]
static void gen_frame_args_address ( struct gdbarch gdbarch,
struct agent_expr ax 
) [static]

Definition at line 563 of file ax-gdb.c.

References ax_reg(), gdbarch_virtual_frame_pointer(), gen_offset(), LONGEST, and agent_expr::scope.

Referenced by gen_var_ref().

static void gen_frame_locals_address ( struct gdbarch gdbarch,
struct agent_expr ax 
) [static]

Definition at line 578 of file ax-gdb.c.

References ax_reg(), gdbarch_virtual_frame_pointer(), gen_offset(), LONGEST, and agent_expr::scope.

Referenced by gen_var_ref().

static void gen_int_literal ( struct agent_expr ax,
struct axs_value value,
LONGEST  k,
struct type type 
) [static]

Definition at line 749 of file ax-gdb.c.

References ax_const_l(), axs_rvalue, check_typedef(), axs_value::kind, and axs_value::type.

Referenced by gen_expr().

static void gen_integral_promotions ( struct expression exp,
struct agent_expr ax,
struct axs_value value 
) [static]
static void gen_left_shift ( struct agent_expr ax,
int  distance 
) [static]

Definition at line 542 of file ax-gdb.c.

References ax_const_l(), and ax_simple().

Referenced by gen_bitfield_ref().

static void gen_less ( struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2,
struct type result_type 
) [static]

Definition at line 1129 of file ax-gdb.c.

References ax_simple(), axs_rvalue, gen_binop(), axs_value::kind, pointer_type(), and axs_value::type.

Referenced by gen_expr_binop_rest().

static void gen_logical_not ( struct agent_expr ax,
struct axs_value value,
struct type result_type 
) [static]

Definition at line 1169 of file ax-gdb.c.

References _, ax_simple(), error(), axs_value::type, TYPE_CODE, TYPE_CODE_INT, and TYPE_CODE_PTR.

Referenced by gen_expr(), and gen_expr_binop_rest().

static int gen_maybe_namespace_elt ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
const struct type curtype,
char *  name 
) [static]
static int gen_namespace_elt ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
const struct type curtype,
char *  name 
) [static]

Definition at line 1626 of file ax-gdb.c.

References _, error(), gen_maybe_namespace_elt(), and TYPE_TAG_NAME.

Referenced by gen_aggregate_elt_ref().

static void gen_offset ( struct agent_expr ax,
int  offset 
) [static]
static void gen_primitive_field ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
int  offset,
int  fieldno,
struct type type 
) [static]
struct agent_expr* gen_printf ( CORE_ADDR  scope,
struct gdbarch gdbarch,
CORE_ADDR  function,
LONGEST  channel,
const char *  format,
int  fmtlen,
struct format_piece frags,
int  nargs,
struct expression **  exprs 
) [read]
static void gen_ptradd ( struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2 
) [static]
static void gen_ptrdiff ( struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2,
struct type result_type 
) [static]
static void gen_ptrsub ( struct agent_expr ax,
struct axs_value value,
struct axs_value value1,
struct axs_value value2 
) [static]
static void gen_repeat ( struct expression exp,
union exp_element **  pc,
struct agent_expr ax,
struct axs_value value 
) [static]
static void gen_scale ( struct agent_expr ax,
enum agent_op  op,
struct type type 
) [static]

Definition at line 1049 of file ax-gdb.c.

References ax_const_l(), ax_simple(), TYPE_LENGTH, and TYPE_TARGET_TYPE.

Referenced by gen_ptradd(), gen_ptrdiff(), and gen_ptrsub().

static void gen_sign_extend ( struct agent_expr ax,
struct type type 
) [static]

Definition at line 455 of file ax-gdb.c.

References ax_ext(), TYPE_LENGTH, and TYPE_UNSIGNED.

Referenced by gen_fetch().

static void gen_sizeof ( struct expression exp,
union exp_element **  pc,
struct agent_expr ax,
struct axs_value value,
struct type size_type 
) [static]

Definition at line 1749 of file ax-gdb.c.

References ax_const_l(), axs_rvalue, gen_expr(), axs_value::kind, agent_expr::len, axs_value::type, and TYPE_LENGTH.

Referenced by gen_expr().

static void gen_static_field ( struct gdbarch gdbarch,
struct agent_expr ax,
struct axs_value value,
struct type type,
int  fieldno 
) [static]
static int gen_struct_elt_for_reference ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
struct type type,
char *  fieldname 
) [static]
static void gen_struct_ref ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
char *  field,
char *  operator_name,
char *  operand_name 
) [static]
static int gen_struct_ref_recursive ( struct expression exp,
struct agent_expr ax,
struct axs_value value,
char *  field,
int  offset,
struct type type 
) [static]
static void gen_sym_offset ( struct agent_expr ax,
struct symbol var 
) [static]

Definition at line 618 of file ax-gdb.c.

References gen_offset(), and SYMBOL_VALUE.

Referenced by gen_var_ref().

struct agent_expr* gen_trace_for_expr ( CORE_ADDR  scope,
struct expression expr,
int  trace_string 
) [read]
struct agent_expr* gen_trace_for_return_address ( CORE_ADDR  scope,
struct gdbarch gdbarch,
int  trace_string 
) [read]
struct agent_expr* gen_trace_for_var ( CORE_ADDR  scope,
struct gdbarch gdbarch,
struct symbol var,
int  trace_string 
) [read]
static void gen_trace_static_fields ( struct gdbarch gdbarch,
struct agent_expr ax,
struct type type 
) [static]
static void gen_traced_pop ( struct gdbarch gdbarch,
struct agent_expr ax,
struct axs_value value 
) [static]
static void gen_usual_arithmetic ( struct expression exp,
struct agent_expr ax,
struct axs_value value1,
struct axs_value value2 
) [static]
static void gen_usual_unary ( struct expression exp,
struct agent_expr ax,
struct axs_value value 
) [static]
static void gen_var_ref ( struct gdbarch gdbarch,
struct agent_expr ax,
struct axs_value value,
struct symbol var 
) [static]
static int is_nontrivial_conversion ( struct type from,
struct type to 
) [static]

Definition at line 912 of file ax-gdb.c.

References free_agent_expr(), gen_conversion(), agent_expr::len, and new_agent_expr().

Referenced by gen_usual_arithmetic().

static void maint_agent_printf_command ( char *  exp,
int  from_tty 
) [static]
static struct type * max_type ( struct type type1,
struct type type2 
) [static, read]

Definition at line 874 of file ax-gdb.c.

References type_wider_than().

Referenced by gen_usual_arithmetic().

static struct value * maybe_const_expr ( union exp_element **  pc) [static, read]

Definition at line 258 of file ax-gdb.c.

References const_expr().

Referenced by gen_expr().

void require_rvalue ( struct agent_expr ax,
struct axs_value value 
)
static int type_wider_than ( struct type type1,
struct type type2 
) [static]

Definition at line 863 of file ax-gdb.c.

References TYPE_LENGTH, and TYPE_UNSIGNED.

Referenced by gen_integral_promotions(), and max_type().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines