GDB (xrefs)
Loading...
Searching...
No Matches
Namespaces | Functions
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 "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 "location.h"
#include "objfiles.h"
#include "typeprint.h"
#include "valprint.h"
#include "c-lang.h"
#include "expop.h"
#include "gdbsupport/format.h"

Go to the source code of this file.

Namespaces

namespace  expr
 

Functions

static void gen_traced_pop (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 agent_expr *)
 
static void gen_frame_locals_address (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 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 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 agent_expr *ax, struct axs_value *value1, struct axs_value *value2)
 
static void gen_integral_promotions (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, const 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 axs_value *)
 
static void gen_address_of (struct axs_value *)
 
static void gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value, struct type *type, int start, int end)
 
static void gen_primitive_field (struct agent_expr *ax, struct axs_value *value, int offset, int fieldno, struct type *type)
 
static int gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value, const char *field, int offset, struct type *type)
 
static void gen_struct_ref (struct agent_expr *ax, struct axs_value *value, const char *field, const char *operator_name, const char *operand_name)
 
static void gen_static_field (struct agent_expr *ax, struct axs_value *value, struct type *type, int fieldno)
 
static void gen_expr_binop_rest (struct expression *exp, enum exp_opcode op, struct agent_expr *ax, struct axs_value *value, struct axs_value *value1, struct axs_value *value2)
 
static void gen_trace_static_fields (struct agent_expr *ax, struct type *type)
 
static struct typestrip_range_type (struct type *type)
 
static void gen_msym_var_ref (agent_expr *ax, axs_value *value, minimal_symbol *msymbol, objfile *objf)
 
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 agent_expr *ax, struct axs_value *value, const struct type *curtype, const char *name)
 
static int gen_maybe_namespace_elt (struct agent_expr *ax, struct axs_value *value, const struct type *curtype, const char *name)
 
static int gen_struct_elt_for_reference (struct agent_expr *ax, struct axs_value *value, struct type *type, const char *fieldname)
 
static int gen_aggregate_elt_ref (struct agent_expr *ax, struct axs_value *value, struct type *type, const char *field)
 
void gen_expr_binop (struct expression *exp, enum exp_opcode op, expr::operation *lhs, expr::operation *rhs, struct agent_expr *ax, struct axs_value *value)
 
void gen_expr_structop (struct expression *exp, enum exp_opcode op, expr::operation *lhs, const char *name, struct agent_expr *ax, struct axs_value *value)
 
void gen_expr_unop (struct expression *exp, enum exp_opcode op, expr::operation *lhs, struct agent_expr *ax, struct axs_value *value)
 
agent_expr_up gen_trace_for_var (CORE_ADDR scope, struct gdbarch *gdbarch, struct symbol *var, int trace_string)
 
agent_expr_up gen_trace_for_expr (CORE_ADDR scope, struct expression *expr, int trace_string)
 
agent_expr_up gen_eval_for_expr (CORE_ADDR scope, struct expression *expr)
 
agent_expr_up gen_trace_for_return_address (CORE_ADDR scope, struct gdbarch *gdbarch, int trace_string)
 
agent_expr_up gen_printf (CORE_ADDR scope, struct gdbarch *gdbarch, CORE_ADDR function, LONGEST channel, const char *format, int fmtlen, int nargs, struct expression **exprs)
 
static void agent_eval_command_one (const char *exp, int eval, CORE_ADDR pc)
 
static void maint_agent_command_1 (const char *exp, int eval)
 
static void maint_agent_command (const char *exp, int from_tty)
 
static void maint_agent_eval_command (const char *exp, int from_tty)
 
static void maint_agent_printf_command (const char *cmdrest, int from_tty)
 
void _initialize_ax_gdb ()
 

Function Documentation

◆ _initialize_ax_gdb()

void _initialize_ax_gdb ( )

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

Referenced by initialize_all_files().

◆ agent_eval_command_one()

static void agent_eval_command_one ( const char * exp,
int eval,
CORE_ADDR pc )
static

◆ gen_address_of()

static void gen_address_of ( struct axs_value * value)
static

◆ gen_aggregate_elt_ref()

static int gen_aggregate_elt_ref ( struct agent_expr * ax,
struct axs_value * value,
struct type * type,
const char * field )
static

◆ gen_binop()

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,
const char * name )
static

◆ gen_bitfield_ref()

static void gen_bitfield_ref ( struct agent_expr * ax,
struct axs_value * value,
struct type * type,
int start,
int end )
static

◆ gen_cast()

static void gen_cast ( struct agent_expr * ax,
struct axs_value * value,
struct type * type )
static

◆ gen_complement()

static void gen_complement ( struct agent_expr * ax,
struct axs_value * value )
static

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

References ax_simple(), type::code(), gen_extend(), strip_range_type(), and value::type().

Referenced by gen_expr_unop().

◆ gen_conversion()

static void gen_conversion ( struct agent_expr * ax,
struct type * from,
struct type * to )
static

◆ gen_deref()

static void gen_deref ( struct axs_value * value)
static

◆ gen_equal()

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

◆ gen_eval_for_expr()

agent_expr_up gen_eval_for_expr ( CORE_ADDR scope,
struct expression * expr )

◆ gen_expr_binop()

void gen_expr_binop ( struct expression * exp,
enum exp_opcode op,
expr::operation * lhs,
expr::operation * rhs,
struct agent_expr * ax,
struct axs_value * value )

◆ gen_expr_binop_rest()

static void gen_expr_binop_rest ( struct expression * exp,
enum exp_opcode op,
struct agent_expr * ax,
struct axs_value * value,
struct axs_value * value1,
struct axs_value * value2 )
static

◆ gen_expr_structop()

void gen_expr_structop ( struct expression * exp,
enum exp_opcode op,
expr::operation * lhs,
const char * name,
struct agent_expr * ax,
struct axs_value * value )

◆ gen_expr_unop()

void gen_expr_unop ( struct expression * exp,
enum exp_opcode op,
expr::operation * lhs,
struct agent_expr * ax,
struct axs_value * value )

◆ gen_extend()

static void gen_extend ( struct agent_expr * ax,
struct type * type )
static

◆ gen_fetch()

static void gen_fetch ( struct agent_expr * ax,
struct type * type )
static

◆ gen_frame_args_address()

static void gen_frame_args_address ( struct agent_expr * ax)
static

◆ gen_frame_locals_address()

static void gen_frame_locals_address ( struct agent_expr * ax)
static

◆ gen_int_literal()

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

◆ gen_integral_promotions()

static void gen_integral_promotions ( struct agent_expr * ax,
struct axs_value * value )
static

◆ gen_left_shift()

static void gen_left_shift ( struct agent_expr * ax,
int distance )
static

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

References ax_const_l(), and ax_simple().

Referenced by gen_bitfield_ref().

◆ gen_less()

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

◆ gen_logical_not()

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

◆ gen_maybe_namespace_elt()

static int gen_maybe_namespace_elt ( struct agent_expr * ax,
struct axs_value * value,
const struct type * curtype,
const char * name )
static

◆ gen_msym_var_ref()

static void gen_msym_var_ref ( agent_expr * ax,
axs_value * value,
minimal_symbol * msymbol,
objfile * objf )
static

◆ gen_namespace_elt()

static int gen_namespace_elt ( struct agent_expr * ax,
struct axs_value * value,
const struct type * curtype,
const char * name )
static

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

References gen_maybe_namespace_elt(), name, and type::name().

Referenced by gen_aggregate_elt_ref().

◆ gen_offset()

static void gen_offset ( struct agent_expr * ax,
int offset )
static

◆ gen_primitive_field()

static void gen_primitive_field ( struct agent_expr * ax,
struct axs_value * value,
int offset,
int fieldno,
struct type * type )
static

◆ gen_printf()

agent_expr_up gen_printf ( CORE_ADDR scope,
struct gdbarch * gdbarch,
CORE_ADDR function,
LONGEST channel,
const char * format,
int fmtlen,
int nargs,
struct expression ** exprs )

◆ gen_ptradd()

static void gen_ptradd ( struct agent_expr * ax,
struct axs_value * value,
struct axs_value * value1,
struct axs_value * value2 )
static

◆ gen_ptrdiff()

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

◆ gen_ptrsub()

static void gen_ptrsub ( struct agent_expr * ax,
struct axs_value * value,
struct axs_value * value1,
struct axs_value * value2 )
static

◆ gen_scale()

static void gen_scale ( struct agent_expr * ax,
enum agent_op op,
struct type * type )
static

Definition at line 956 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().

◆ gen_sign_extend()

static void gen_sign_extend ( struct agent_expr * ax,
struct type * type )
static

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

References ax_ext(), type::is_unsigned(), and type::length().

Referenced by expr::unop_extract_operation::do_generate_ax(), and gen_fetch().

◆ gen_static_field()

static void gen_static_field ( struct agent_expr * ax,
struct axs_value * value,
struct type * type,
int fieldno )
static

◆ gen_struct_elt_for_reference()

static int gen_struct_elt_for_reference ( struct agent_expr * ax,
struct axs_value * value,
struct type * type,
const char * fieldname )
static

◆ gen_struct_ref()

static void gen_struct_ref ( struct agent_expr * ax,
struct axs_value * value,
const char * field,
const char * operator_name,
const char * operand_name )
static

◆ gen_struct_ref_recursive()

static int gen_struct_ref_recursive ( struct agent_expr * ax,
struct axs_value * value,
const char * field,
int offset,
struct type * type )
static

◆ gen_sym_offset()

static void gen_sym_offset ( struct agent_expr * ax,
struct symbol * var )
static

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

References gen_offset(), and symbol::value_longest().

Referenced by gen_var_ref().

◆ gen_trace_for_expr()

agent_expr_up gen_trace_for_expr ( CORE_ADDR scope,
struct expression * expr,
int trace_string )

◆ gen_trace_for_return_address()

agent_expr_up gen_trace_for_return_address ( CORE_ADDR scope,
struct gdbarch * gdbarch,
int trace_string )

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

References ax_simple(), gdbarch_gen_return_address(), and gen_traced_pop().

Referenced by agent_eval_command_one(), and encode_actions_1().

◆ gen_trace_for_var()

agent_expr_up gen_trace_for_var ( CORE_ADDR scope,
struct gdbarch * gdbarch,
struct symbol * var,
int trace_string )

◆ gen_trace_static_fields()

static void gen_trace_static_fields ( struct agent_expr * ax,
struct type * type )
static

◆ gen_traced_pop()

static void gen_traced_pop ( struct agent_expr * ax,
struct axs_value * value )
static

◆ gen_usual_arithmetic()

static void gen_usual_arithmetic ( struct agent_expr * ax,
struct axs_value * value1,
struct axs_value * value2 )
static

◆ gen_usual_unary()

static void gen_usual_unary ( struct agent_expr * ax,
struct axs_value * value )
static

◆ gen_var_ref()

static void gen_var_ref ( struct agent_expr * ax,
struct axs_value * value,
struct symbol * var )
static

◆ is_nontrivial_conversion()

static int is_nontrivial_conversion ( struct type * from,
struct type * to )
static

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

References gen_conversion().

Referenced by gen_usual_arithmetic().

◆ maint_agent_command()

static void maint_agent_command ( const char * exp,
int from_tty )
static

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

References maint_agent_command_1().

◆ maint_agent_command_1()

static void maint_agent_command_1 ( const char * exp,
int eval )
static

◆ maint_agent_eval_command()

static void maint_agent_eval_command ( const char * exp,
int from_tty )
static

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

References maint_agent_command_1().

◆ maint_agent_printf_command()

static void maint_agent_printf_command ( const char * cmdrest,
int from_tty )
static

◆ max_type()

static struct type * max_type ( struct type * type1,
struct type * type2 )
static

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

References type_wider_than().

Referenced by gen_usual_arithmetic().

◆ require_rvalue()

void require_rvalue ( struct agent_expr * ax,
struct axs_value * value )

◆ strip_range_type()

static struct type * strip_range_type ( struct type * type)
static

◆ type_wider_than()

static int type_wider_than ( struct type * type1,
struct type * type2 )
static

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

References type::is_unsigned(), and type::length().

Referenced by gen_integral_promotions(), and max_type().