GDB (xrefs)
Loading...
Searching...
No Matches
Functions
valarith.c File Reference
#include "defs.h"
#include "value.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "target.h"
#include "language.h"
#include "target-float.h"
#include "infcall.h"
#include "gdbsupport/byte-vector.h"
#include "gdbarch.h"
#include "rust-lang.h"
#include "ada-lang.h"

Go to the source code of this file.

Functions

static struct valuevalue_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound)
 
static LONGEST find_size_for_pointer_math (struct type *ptr_type)
 
struct valuevalue_ptradd (struct value *arg1, LONGEST arg2)
 
LONGEST value_ptrdiff (struct value *arg1, struct value *arg2)
 
struct valuevalue_subscript (struct value *array, LONGEST index)
 
struct valuevalue_to_array (struct value *val)
 
int binop_types_user_defined_p (enum exp_opcode op, struct type *type1, struct type *type2)
 
int binop_user_defined_p (enum exp_opcode op, struct value *arg1, struct value *arg2)
 
int unop_user_defined_p (enum exp_opcode op, struct value *arg1)
 
static struct valuevalue_user_defined_cpp_op (gdb::array_view< value * > args, char *oper, int *static_memfuncp, enum noside noside)
 
static struct valuevalue_user_defined_op (struct value **argp, gdb::array_view< value * > args, char *name, int *static_memfuncp, enum noside noside)
 
struct valuevalue_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, enum exp_opcode otherop, enum noside noside)
 
struct valuevalue_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
 
struct valuevalue_concat (struct value *arg1, struct value *arg2)
 
static void value_args_as_target_float (struct value *arg1, struct value *arg2, gdb_byte *x, struct type **eff_type_x, gdb_byte *y, struct type **eff_type_y)
 
static struct valuefixed_point_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
 
static struct typepromotion_type (struct type *type1, struct type *type2)
 
static struct valuescalar_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
 
static struct valuecomplex_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
 
static int type_length_bits (type *type)
 
static bool check_valid_shift_count (enum exp_opcode op, type *result_type, type *shift_count_type, const gdb_mpz &shift_count, unsigned long &nbits)
 
struct valuevalue_vector_widen (struct value *scalar_value, struct type *vector_type)
 
static struct valuevector_binop (struct value *val1, struct value *val2, enum exp_opcode op)
 
struct valuevalue_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
 
bool value_logical_not (struct value *arg1)
 
static int value_strcmp (struct value *arg1, struct value *arg2)
 
int value_equal (struct value *arg1, struct value *arg2)
 
int value_equal_contents (struct value *arg1, struct value *arg2)
 
int value_less (struct value *arg1, struct value *arg2)
 
struct valuevalue_pos (struct value *arg1)
 
struct valuevalue_neg (struct value *arg1)
 
struct valuevalue_complement (struct value *arg1)
 
int value_bit_index (struct type *type, const gdb_byte *valaddr, int index)
 

Function Documentation

◆ binop_types_user_defined_p()

int binop_types_user_defined_p ( enum exp_opcode op,
struct type * type1,
struct type * type2 )

◆ binop_user_defined_p()

int binop_user_defined_p ( enum exp_opcode op,
struct value * arg1,
struct value * arg2 )

◆ check_valid_shift_count()

static bool check_valid_shift_count ( enum exp_opcode op,
type * result_type,
type * shift_count_type,
const gdb_mpz & shift_count,
unsigned long & nbits )
static

◆ complex_binop()

static struct value * complex_binop ( struct value * arg1,
struct value * arg2,
enum exp_opcode op )
static

◆ find_size_for_pointer_math()

static LONGEST find_size_for_pointer_math ( struct type * ptr_type)
static

Definition at line 46 of file valarith.c.

References check_typedef(), type::code(), name, type::name(), type::target_type(), and type_length_units().

Referenced by value_ptradd().

◆ fixed_point_binop()

static struct value * fixed_point_binop ( struct value * arg1,
struct value * arg2,
enum exp_opcode op )
static

◆ promotion_type()

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

Definition at line 918 of file valarith.c.

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

Referenced by complex_binop(), and scalar_binop().

◆ scalar_binop()

static struct value * scalar_binop ( struct value * arg1,
struct value * arg2,
enum exp_opcode op )
static

◆ type_length_bits()

static int type_length_bits ( type * type)
static

◆ unop_user_defined_p()

int unop_user_defined_p ( enum exp_opcode op,
struct value * arg1 )

◆ value_args_as_target_float()

static void value_args_as_target_float ( struct value * arg1,
struct value * arg2,
gdb_byte * x,
struct type ** eff_type_x,
gdb_byte * y,
struct type ** eff_type_y )
static

◆ value_binop()

struct value * value_binop ( struct value * arg1,
struct value * arg2,
enum exp_opcode op )

◆ value_bit_index()

int value_bit_index ( struct type * type,
const gdb_byte * valaddr,
int index )

◆ value_complement()

struct value * value_complement ( struct value * arg1)

◆ value_concat()

struct value * value_concat ( struct value * arg1,
struct value * arg2 )

◆ value_equal()

int value_equal ( struct value * arg1,
struct value * arg2 )

◆ value_equal_contents()

int value_equal_contents ( struct value * arg1,
struct value * arg2 )

Definition at line 1630 of file valarith.c.

References check_typedef(), type::code(), value::contents(), type::length(), and value::type().

Referenced by watchpoint_check().

◆ value_less()

int value_less ( struct value * arg1,
struct value * arg2 )

◆ value_logical_not()

bool value_logical_not ( struct value * arg1)

◆ value_neg()

struct value * value_neg ( struct value * arg1)

◆ value_pos()

struct value * value_pos ( struct value * arg1)

◆ value_ptradd()

struct value * value_ptradd ( struct value * arg1,
LONGEST arg2 )

◆ value_ptrdiff()

LONGEST value_ptrdiff ( struct value * arg1,
struct value * arg2 )

◆ value_strcmp()

static int value_strcmp ( struct value * arg1,
struct value * arg2 )
static

Definition at line 1529 of file valarith.c.

References value::contents(), type::length(), s1, s2, and value::type().

Referenced by value_equal(), and value_less().

◆ value_subscript()

struct value * value_subscript ( struct value * array,
LONGEST index )

◆ value_subscripted_rvalue()

static struct value * value_subscripted_rvalue ( struct value * array,
LONGEST index,
LONGEST lowerbound )
static

◆ value_to_array()

struct value * value_to_array ( struct value * val)

◆ value_user_defined_cpp_op()

static struct value * value_user_defined_cpp_op ( gdb::array_view< value * > args,
char * oper,
int * static_memfuncp,
enum noside noside )
static

Definition at line 338 of file valarith.c.

References BOTH, find_overload_match(), value_ind(), and value_of_variable().

Referenced by value_user_defined_op().

◆ value_user_defined_op()

static struct value * value_user_defined_op ( struct value ** argp,
gdb::array_view< value * > args,
char * name,
int * static_memfuncp,
enum noside noside )
static

◆ value_vector_widen()

struct value * value_vector_widen ( struct value * scalar_value,
struct type * vector_type )

◆ value_x_binop()

struct value * value_x_binop ( struct value * arg1,
struct value * arg2,
enum exp_opcode op,
enum exp_opcode otherop,
enum noside noside noside  )

◆ value_x_unop()

struct value * value_x_unop ( struct value * arg1,
enum exp_opcode op,
enum noside noside noside  )

◆ vector_binop()

static struct value * vector_binop ( struct value * val1,
struct value * val2,
enum exp_opcode op )
static