GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
value.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "gdbcore.h"
#include "command.h"
#include "gdbcmd.h"
#include "target.h"
#include "language.h"
#include "demangle.h"
#include "regcache.h"
#include "block.h"
#include "target-float.h"
#include "objfiles.h"
#include "valprint.h"
#include "cli/cli-decode.h"
#include "extension.h"
#include <ctype.h>
#include "tracepoint.h"
#include "cp-abi.h"
#include "user-regs.h"
#include <algorithm>
#include <iterator>
#include <map>
#include <utility>
#include <vector>
#include "completer.h"
#include "gdbsupport/selftest.h"
#include "gdbsupport/array-view.h"
#include "cli/cli-style.h"
#include "expop.h"
#include "inferior.h"
#include "varobj.h"

Go to the source code of this file.

Classes

struct  internal_function
 
struct  ranges_and_idx
 
union  internalvar_data
 
struct  internalvar
 
union  internalvar::u
 

Macros

#define MIN_VALUE_FOR_MAX_VALUE_SIZE   16
 

Enumerations

enum  internalvar_kind {
  INTERNALVAR_VOID , INTERNALVAR_VALUE , INTERNALVAR_MAKE_VALUE , INTERNALVAR_FUNCTION ,
  INTERNALVAR_INTEGER , INTERNALVAR_STRING
}
 

Functions

static bool ranges_overlap (LONGEST offset1, ULONGEST len1, LONGEST offset2, ULONGEST len2)
 
static bool ranges_contain (const std::vector< range > &ranges, LONGEST offset, ULONGEST length)
 
static void insert_into_bit_range_vector (std::vector< range > *vectorp, LONGEST offset, ULONGEST length)
 
static int find_first_range_overlap (const std::vector< range > *ranges, int pos, LONGEST offset, LONGEST length)
 
static int memcmp_with_bit_offsets (const gdb_byte *ptr1, size_t offset1_bits, const gdb_byte *ptr2, size_t offset2_bits, size_t length_bits)
 
static int find_first_range_overlap_and_match (struct ranges_and_idx *rp1, struct ranges_and_idx *rp2, LONGEST offset1, LONGEST offset2, ULONGEST length, ULONGEST *l, ULONGEST *h)
 
 gdb_static_assert (sizeof(LONGEST)<=MIN_VALUE_FOR_MAX_VALUE_SIZE)
 
static void set_max_value_size (const char *args, int from_tty, struct cmd_list_element *c)
 
static void show_max_value_size (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void check_type_length_before_alloc (const struct type *type)
 
bool exceeds_max_value_size (ULONGEST length)
 
static struct typefind_array_element_type (struct type *array_type)
 
static ULONGEST calculate_limited_array_length (struct type *array_type)
 
struct valueallocate_repeat_value (struct type *type, int count)
 
struct typevalue_actual_type (struct value *value, int resolve_simple_types, int *real_type_found)
 
void error_value_optimized_out (void)
 
static void ranges_copy_adjusted (std::vector< range > *dst_range, int dst_bit_offset, const std::vector< range > &src_range, int src_bit_offset, unsigned int bit_length)
 
struct valuevalue_mark (void)
 
void value_free_to_mark (const struct value *mark)
 
value_ref_ptr release_value (struct value *val)
 
std::vector< value_ref_ptrvalue_release_to_mark (const struct value *mark)
 
struct valuemake_cv_value (int cnst, int voltl, struct value *v)
 
struct valueaccess_value_history (int num)
 
ULONGEST value_history_count ()
 
static void show_values (const char *num_exp, int from_tty)
 
static void init_if_undefined_command (const char *args, int from_tty)
 
struct internalvarlookup_only_internalvar (const char *name)
 
void complete_internalvar (completion_tracker &tracker, const char *name)
 
struct internalvarcreate_internalvar (const char *name)
 
struct internalvarcreate_internalvar_type_lazy (const char *name, const struct internalvar_funcs *funcs, void *data)
 
int compile_internalvar_to_ax (struct internalvar *var, struct agent_expr *expr, struct axs_value *value)
 
struct internalvarlookup_internalvar (const char *name)
 
struct valuevalue_of_internalvar (struct gdbarch *gdbarch, struct internalvar *var)
 
int get_internalvar_integer (struct internalvar *var, LONGEST *result)
 
static int get_internalvar_function (struct internalvar *var, struct internal_function **result)
 
void set_internalvar_component (struct internalvar *var, LONGEST offset, LONGEST bitpos, LONGEST bitsize, struct value *newval)
 
void set_internalvar (struct internalvar *var, struct value *val)
 
void set_internalvar_integer (struct internalvar *var, LONGEST l)
 
void set_internalvar_string (struct internalvar *var, const char *string)
 
static void set_internalvar_function (struct internalvar *var, struct internal_function *f)
 
void clear_internalvar (struct internalvar *var)
 
const char * internalvar_name (const struct internalvar *var)
 
static struct internal_functioncreate_internal_function (const char *name, internal_function_fn handler, void *cookie)
 
const char * value_internal_function_name (struct value *val)
 
struct valuecall_internal_function (struct gdbarch *gdbarch, const struct language_defn *language, struct value *func, int argc, struct value **argv)
 
static void function_command (const char *command, int from_tty)
 
static struct cmd_list_elementdo_add_internal_function (const char *name, const char *doc, internal_function_fn handler, void *cookie)
 
void add_internal_function (const char *name, const char *doc, internal_function_fn handler, void *cookie)
 
void add_internal_function (gdb::unique_xmalloc_ptr< char > &&name, gdb::unique_xmalloc_ptr< char > &&doc, internal_function_fn handler, void *cookie)
 
static void preserve_one_internalvar (struct internalvar *var, struct objfile *objfile, htab_t copied_types)
 
static void preserve_one_varobj (struct varobj *varobj, struct objfile *objfile, htab_t copied_types)
 
void preserve_values (struct objfile *objfile)
 
static void show_convenience (const char *ignore, int from_tty)
 
LONGEST value_as_long (struct value *val)
 
gdb_mpz value_as_mpz (struct value *val)
 
CORE_ADDR value_as_address (struct value *val)
 
LONGEST unpack_long (struct type *type, const gdb_byte *valaddr)
 
CORE_ADDR unpack_pointer (struct type *type, const gdb_byte *valaddr)
 
bool is_floating_value (struct value *val)
 
struct valuevalue_static_field (struct type *type, int fieldno)
 
struct valuevalue_field (struct value *arg1, int fieldno)
 
struct valuevalue_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type, LONGEST offset)
 
LONGEST unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr, LONGEST bitpos, LONGEST bitsize)
 
int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, LONGEST embedded_offset, int fieldno, const struct value *val, LONGEST *result)
 
LONGEST unpack_field_as_long (struct type *type, const gdb_byte *valaddr, int fieldno)
 
struct valuevalue_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, LONGEST embedded_offset, const struct value *val)
 
void modify_field (struct type *type, gdb_byte *addr, LONGEST fieldval, LONGEST bitpos, LONGEST bitsize)
 
void pack_long (gdb_byte *buf, struct type *type, LONGEST num)
 
static void pack_unsigned_long (gdb_byte *buf, struct type *type, ULONGEST num)
 
struct valuevalue_from_longest (struct type *type, LONGEST num)
 
struct valuevalue_from_ulongest (struct type *type, ULONGEST num)
 
struct valuevalue_from_mpz (struct type *type, const gdb_mpz &v)
 
struct valuevalue_from_pointer (struct type *type, CORE_ADDR addr)
 
struct valuevalue_from_host_double (struct type *type, double d)
 
struct valuevalue_from_contents_and_address_unresolved (struct type *type, const gdb_byte *valaddr, CORE_ADDR address)
 
struct valuevalue_from_contents_and_address (struct type *type, const gdb_byte *valaddr, CORE_ADDR address, frame_info_ptr frame)
 
struct valuevalue_from_contents (struct type *type, const gdb_byte *contents)
 
struct valuevalue_from_history_ref (const char *h, const char **endp)
 
struct valuevalue_from_component (struct value *whole, struct type *type, LONGEST offset)
 
struct valuecoerce_ref_if_computed (const struct value *arg)
 
struct valuereadjust_indirect_value_type (struct value *value, struct type *enc_type, const struct type *original_type, struct value *original_value, CORE_ADDR original_value_address)
 
struct valuecoerce_ref (struct value *arg)
 
struct valuecoerce_array (struct value *arg)
 
enum return_value_convention struct_return_convention (struct gdbarch *gdbarch, struct value *function, struct type *value_type)
 
int using_struct_return (struct gdbarch *gdbarch, struct value *function, struct type *value_type)
 
static struct valueisvoid_internal_fn (struct gdbarch *gdbarch, const struct language_defn *language, void *cookie, int argc, struct value **argv)
 
static struct valuecreal_internal_fn (struct gdbarch *gdbarch, const struct language_defn *language, void *cookie, int argc, struct value **argv)
 
static struct valuecimag_internal_fn (struct gdbarch *gdbarch, const struct language_defn *language, void *cookie, int argc, struct value **argv)
 
void _initialize_values ()
 
void finalize_values ()
 

Variables

static struct cmd_list_elementfunctionlist
 
static std::vector< value_ref_ptrvalue_history
 
static std::vector< value_ref_ptrall_values
 
static int max_value_size = 65536
 
static gdb::optional< int > array_length_limiting_element_count
 
static std::map< std::string, internalvarinternalvars
 

Macro Definition Documentation

◆ MIN_VALUE_FOR_MAX_VALUE_SIZE

#define MIN_VALUE_FOR_MAX_VALUE_SIZE   16

Definition at line 764 of file value.c.

Referenced by set_max_value_size().

Enumeration Type Documentation

◆ internalvar_kind

Enumerator
INTERNALVAR_VOID 
INTERNALVAR_VALUE 
INTERNALVAR_MAKE_VALUE 
INTERNALVAR_FUNCTION 
INTERNALVAR_INTEGER 
INTERNALVAR_STRING 

Definition at line 1785 of file value.c.

Function Documentation

◆ _initialize_values()

void _initialize_values ( )

Definition at line 4241 of file value.c.

Referenced by initialize_all_files().

◆ access_value_history()

struct value * access_value_history ( int num)

◆ add_internal_function() [1/2]

void add_internal_function ( const char * name,
const char * doc,
internal_function_fn handler,
void * cookie )

Definition at line 2360 of file value.c.

References do_add_internal_function(), and name.

Referenced by fnpy_init().

◆ add_internal_function() [2/2]

void add_internal_function ( gdb::unique_xmalloc_ptr< char > && name,
gdb::unique_xmalloc_ptr< char > && doc,
internal_function_fn handler,
void * cookie )

◆ allocate_repeat_value()

struct value * allocate_repeat_value ( struct type * type,
int count )

◆ calculate_limited_array_length()

static ULONGEST calculate_limited_array_length ( struct type * array_type)
static

◆ call_internal_function()

struct value * call_internal_function ( struct gdbarch * gdbarch,
const struct language_defn * language,
struct value * func,
int argc,
struct value ** argv )

◆ check_type_length_before_alloc()

static void check_type_length_before_alloc ( const struct type * type)
static

◆ cimag_internal_fn()

static struct value * cimag_internal_fn ( struct gdbarch * gdbarch,
const struct language_defn * language,
void * cookie,
int argc,
struct value ** argv )
static

Definition at line 4068 of file value.c.

References check_typedef(), type::code(), value::type(), and value_imaginary_part().

◆ clear_internalvar()

void clear_internalvar ( struct internalvar * var)

◆ coerce_array()

struct value * coerce_array ( struct value * arg)

◆ coerce_ref()

struct value * coerce_ref ( struct value * arg)

◆ coerce_ref_if_computed()

struct value * coerce_ref_if_computed ( const struct value * arg)

◆ compile_internalvar_to_ax()

int compile_internalvar_to_ax ( struct internalvar * var,
struct agent_expr * expr,
struct axs_value * value )

Definition at line 1981 of file value.c.

References INTERNALVAR_MAKE_VALUE, and internalvar::kind.

Referenced by expr::internalvar_operation::do_generate_ax().

◆ complete_internalvar()

void complete_internalvar ( completion_tracker & tracker,
const char * name )

Definition at line 1931 of file value.c.

References completion_tracker::add_completion(), internalvars, name, and internalvar::name.

Referenced by condition_completer().

◆ creal_internal_fn()

static struct value * creal_internal_fn ( struct gdbarch * gdbarch,
const struct language_defn * language,
void * cookie,
int argc,
struct value ** argv )
static

Definition at line 4050 of file value.c.

References check_typedef(), type::code(), value::type(), and value_real_part().

◆ create_internal_function()

static struct internal_function * create_internal_function ( const char * name,
internal_function_fn handler,
void * cookie )
static

◆ create_internalvar()

struct internalvar * create_internalvar ( const char * name)

◆ create_internalvar_type_lazy()

struct internalvar * create_internalvar_type_lazy ( const char * name,
const struct internalvar_funcs * funcs,
void * data )

◆ do_add_internal_function()

static struct cmd_list_element * do_add_internal_function ( const char * name,
const char * doc,
internal_function_fn handler,
void * cookie )
static

◆ error_value_optimized_out()

void error_value_optimized_out ( void )

Definition at line 1074 of file value.c.

Referenced by address_from_register(), and value::require_not_optimized_out().

◆ exceeds_max_value_size()

bool exceeds_max_value_size ( ULONGEST length)

Definition at line 821 of file value.c.

References max_value_size.

Referenced by check_type_length_before_alloc(), printf_c_string(), and printf_wide_c_string().

◆ finalize_values()

void finalize_values ( )

Definition at line 4327 of file value.c.

References all_values.

Referenced by quit_force().

◆ find_array_element_type()

static struct type * find_array_element_type ( struct type * array_type)
static

◆ find_first_range_overlap()

static int find_first_range_overlap ( const std::vector< range > * ranges,
int pos,
LONGEST offset,
LONGEST length )
static

Definition at line 431 of file value.c.

References range::length, range::offset, and ranges_overlap().

Referenced by find_first_range_overlap_and_match().

◆ find_first_range_overlap_and_match()

static int find_first_range_overlap_and_match ( struct ranges_and_idx * rp1,
struct ranges_and_idx * rp2,
LONGEST offset1,
LONGEST offset2,
ULONGEST length,
ULONGEST * l,
ULONGEST * h )
static

◆ function_command()

static void function_command ( const char * command,
int from_tty )
static

Definition at line 2337 of file value.c.

Referenced by do_add_internal_function().

◆ gdb_static_assert()

gdb_static_assert ( sizeof(LONGEST)<= MIN_VALUE_FOR_MAX_VALUE_SIZE)

◆ get_internalvar_function()

static int get_internalvar_function ( struct internalvar * var,
struct internal_function ** result )
static

◆ get_internalvar_integer()

int get_internalvar_integer ( struct internalvar * var,
LONGEST * result )

◆ init_if_undefined_command()

static void init_if_undefined_command ( const char * args,
int from_tty )
static

◆ insert_into_bit_range_vector()

static void insert_into_bit_range_vector ( std::vector< range > * vectorp,
LONGEST offset,
ULONGEST length )
static

◆ internalvar_name()

const char * internalvar_name ( const struct internalvar * var)

◆ is_floating_value()

bool is_floating_value ( struct value * val)

◆ isvoid_internal_fn()

static struct value * isvoid_internal_fn ( struct gdbarch * gdbarch,
const struct language_defn * language,
void * cookie,
int argc,
struct value ** argv )
static

Definition at line 4032 of file value.c.

References value_from_longest().

◆ lookup_internalvar()

struct internalvar * lookup_internalvar ( const char * name)

◆ lookup_only_internalvar()

struct internalvar * lookup_only_internalvar ( const char * name)

◆ make_cv_value()

struct value * make_cv_value ( int cnst,
int voltl,
struct value * v )

◆ memcmp_with_bit_offsets()

static int memcmp_with_bit_offsets ( const gdb_byte * ptr1,
size_t offset1_bits,
const gdb_byte * ptr2,
size_t offset2_bits,
size_t length_bits )
static

Definition at line 459 of file value.c.

References bits.

Referenced by value::contents_bits_eq().

◆ modify_field()

void modify_field ( struct type * type,
gdb_byte * addr,
LONGEST fieldval,
LONGEST bitpos,
LONGEST bitsize )

◆ pack_long()

void pack_long ( gdb_byte * buf,
struct type * type,
LONGEST num )

◆ pack_unsigned_long()

static void pack_unsigned_long ( gdb_byte * buf,
struct type * type,
ULONGEST num )
static

◆ preserve_one_internalvar()

static void preserve_one_internalvar ( struct internalvar * var,
struct objfile * objfile,
htab_t copied_types )
static

Definition at line 2397 of file value.c.

References copy_type_recursive(), INTERNALVAR_INTEGER, INTERNALVAR_VALUE, and internalvar::kind.

Referenced by preserve_values().

◆ preserve_one_varobj()

static void preserve_one_varobj ( struct varobj * varobj,
struct objfile * objfile,
htab_t copied_types )
static

◆ preserve_values()

void preserve_values ( struct objfile * objfile)

◆ ranges_contain()

static bool ranges_contain ( const std::vector< range > & ranges,
LONGEST offset,
ULONGEST length )
static

Definition at line 88 of file value.c.

References range::length, range::offset, and ranges_overlap().

Referenced by value::bits_any_optimized_out(), and value::bits_available().

◆ ranges_copy_adjusted()

static void ranges_copy_adjusted ( std::vector< range > * dst_range,
int dst_bit_offset,
const std::vector< range > & src_range,
int src_bit_offset,
unsigned int bit_length )
static

Definition at line 1131 of file value.c.

References insert_into_bit_range_vector().

◆ ranges_overlap()

static bool ranges_overlap ( LONGEST offset1,
ULONGEST len1,
LONGEST offset2,
ULONGEST len2 )
static

Definition at line 74 of file value.c.

References offset1.

Referenced by find_first_range_overlap(), insert_into_bit_range_vector(), and ranges_contain().

◆ readjust_indirect_value_type()

struct value * readjust_indirect_value_type ( struct value * value,
struct type * enc_type,
const struct type * original_type,
struct value * original_value,
CORE_ADDR original_value_address )

◆ release_value()

value_ref_ptr release_value ( struct value * val)

◆ set_internalvar()

void set_internalvar ( struct internalvar * var,
struct value * val )

◆ set_internalvar_component()

void set_internalvar_component ( struct internalvar * var,
LONGEST offset,
LONGEST bitpos,
LONGEST bitsize,
struct value * newval )

◆ set_internalvar_function()

static void set_internalvar_function ( struct internalvar * var,
struct internal_function * f )
static

Definition at line 2253 of file value.c.

References clear_internalvar(), f(), INTERNALVAR_FUNCTION, and internalvar::kind.

Referenced by do_add_internal_function().

◆ set_internalvar_integer()

void set_internalvar_integer ( struct internalvar * var,
LONGEST l )

◆ set_internalvar_string()

void set_internalvar_string ( struct internalvar * var,
const char * string )

Definition at line 2243 of file value.c.

References clear_internalvar(), INTERNALVAR_STRING, and internalvar::kind.

Referenced by set_traceframe_context().

◆ set_max_value_size()

static void set_max_value_size ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 770 of file value.c.

References max_value_size, and MIN_VALUE_FOR_MAX_VALUE_SIZE.

◆ show_convenience()

static void show_convenience ( const char * ignore,
int from_tty )
static

◆ show_max_value_size()

static void show_max_value_size ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 786 of file value.c.

References gdb_printf(), and max_value_size.

◆ show_values()

static void show_values ( const char * num_exp,
int from_tty )
static

◆ struct_return_convention()

enum return_value_convention struct_return_convention ( struct gdbarch * gdbarch,
struct value * function,
struct type * value_type )

Definition at line 3801 of file value.c.

References code, type::code(), and gdbarch_return_value_as_value().

Referenced by using_struct_return().

◆ unpack_bits_as_long()

LONGEST unpack_bits_as_long ( struct type * field_type,
const gdb_byte * valaddr,
LONGEST bitpos,
LONGEST bitsize )

◆ unpack_field_as_long()

LONGEST unpack_field_as_long ( struct type * type,
const gdb_byte * valaddr,
int fieldno )

◆ unpack_long()

LONGEST unpack_long ( struct type * type,
const gdb_byte * valaddr )

◆ unpack_pointer()

CORE_ADDR unpack_pointer ( struct type * type,
const gdb_byte * valaddr )

◆ unpack_value_field_as_long()

int unpack_value_field_as_long ( struct type * type,
const gdb_byte * valaddr,
LONGEST embedded_offset,
int fieldno,
const struct value * val,
LONGEST * result )

◆ using_struct_return()

int using_struct_return ( struct gdbarch * gdbarch,
struct value * function,
struct type * value_type )

◆ value_actual_type()

struct type * value_actual_type ( struct value * value,
int resolve_simple_types,
int * real_type_found )

◆ value_as_address()

CORE_ADDR value_as_address ( struct value * val)

Definition at line 2636 of file value.c.

References value::address, type::arch(), type::code(), coerce_array(), value::contents(), gdbarch_addr_bits_remove(), gdbarch_integer_to_address(), gdbarch_integer_to_address_p(), type::is_pointer_or_reference(), value::type(), unpack_pointer(), and value_as_long().

Referenced by aarch64_linux_get_memtag(), aarch64_linux_memtag_matches_p(), aarch64_linux_memtag_to_string(), aarch64_linux_set_memtags(), aarch64_linux_tagged_address_p(), ada_tag_name_from_tsd(), ada_value_slice_from_ptr(), ada_varobj_adjust_for_child_access(), ada_varobj_get_ptr_number_of_children(), ada_varobj_ind(), frame_command_helper< FPTR >::address(), address_from_register(), arm_m_exception_prev_register(), c_get_string(), c_value_print(), disassemble_command(), do_one_display(), dump_arc_instruction_command(), dwarf2_evaluate_property(), dwarf2_locexpr_baton_eval(), elf_gnu_ifunc_resolve_addr(), elf_gnu_ifunc_resolver_return_stop(), eval_op_ind(), eval_op_memval(), eval_op_objc_msgcall(), expr::ada_unop_ind_operation::evaluate(), execute_stack_op(), dwarf_expr_context::fetch_result(), find_function_addr(), fortran_associated(), gdbscm_value_to_bool(), gdbscm_value_to_integer(), gdbscm_value_to_lazy_string(), get_addr_from_python(), gnuv2_value_rtti_type(), gnuv3_get_typename_from_type_info(), gnuv3_get_virtual_fn(), gnuv3_get_vtable(), gnuv3_print_vtable(), gnuv3_rtti_type(), hppa_linux_find_global_pointer(), hppabsd_find_global_pointer(), i386_mpx_set_bounds(), info_mach_region_command(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), call_site_target::iterate_over_addresses(), linespec_expression_to_pc(), linux_infcall_mmap(), memory_tag_check_command(), memory_tag_print_tag_command(), parse_and_eval_address(), parse_find_args(), parse_frame_specification(), parse_set_allocation_tag_input(), ppc64_sysv_abi_push_dummy_call(), ppc_sysv_get_return_buf_addr(), print_one_vtable(), printf_c_string(), printf_wide_c_string(), process_event_stop_test(), ptid_from_atcb_common(), read_atcb(), read_known_tasks_list(), language_defn::read_var_value(), rust_get_trait_object_pointer(), rust_slice_to_array(), rust_val_print_slice(), svr4_handle_solib_event(), valpy_lazy_string(), value_equal(), value_ind(), value_less(), rust_language::value_print_inner(), value_ptradd(), frame_command_helper< FPTR >::view(), watch_command_1(), and x_command().

◆ value_as_long()

LONGEST value_as_long ( struct value * val)

Definition at line 2554 of file value.c.

References coerce_array(), value::contents(), value::type(), and unpack_long().

Referenced by ada_array_bound(), ada_array_length(), ada_atr_enum_val(), ada_get_tcb_types_info(), ada_tag_value_at_base_address(), ada_ternop_slice(), ada_type_of_array(), ada_val_atr(), ada_which_variant_applies(), dwarf_expr_context::add_piece(), allocate_space_in_inferior(), arm_m_exception_prev_register(), expr::ada_discrete_range_association::assign(), expr::ada_name_association::assign(), call_target_sbrk(), ppc_linux_nat_target::check_condition(), checkpoint_command(), complex_binop(), desc_bounds(), expr::repeat_operation::do_generate_ax(), dwarf2_evaluate_property(), ensure_lval(), eval_binop_assign_modify(), eval_multi_subscript(), eval_op_add(), eval_op_f_abs(), eval_op_f_mod(), eval_op_f_modulo(), eval_op_m2_subscript(), eval_op_member(), eval_op_objc_msgcall(), eval_op_repeat(), eval_op_rust_array(), eval_op_sub(), eval_op_subscript(), expr::ada_binop_addsub_operation::evaluate(), expr::objc_msgcall_operation::evaluate(), expr::ternop_slice_operation::evaluate(), expr::array_operation::evaluate(), expr::rust_aggregate_operation::evaluate(), expr::structop_member_base::evaluate_funcall(), expr::array_operation::evaluate_struct_tuple(), dwarf_expr_context::execute_stack_op(), dwarf_expr_context::fetch_result(), find_func_descr(), find_function_addr(), fortran_argument_convert(), fortran_array_size(), fortran_bounds_for_dimension(), fortran_wrap2_kind(), fortran_wrap3_kind(), gdbscm_value_subscript(), gdbscm_value_to_bool(), gdbscm_value_to_integer(), gdbscm_value_to_real(), expr::operation::generate_ax(), get_baseclass_offset(), ravenscar_thread_target::get_fpu_state(), get_int_var_value(), get_internalvar_integer(), get_number_trailer(), get_ulongest(), gnuv2_virtual_fn_field(), gnuv3_baseclass_offset(), gnuv3_rtti_type(), ignore_command(), inferior_call_waitpid(), info_port_rights(), info_task(), frame_command_helper< FPTR >::level(), linespec_parse_variable(), linux_infcall_munmap(), lookup_child_selector(), lookup_objc_class(), m68hc11_frame_prev_register(), maintenance_print_frame_id(), maintenance_print_record_instruction(), mep_frame_prev_register(), mi_cmd_thread_select(), mi_cmd_trace_define_variable(), msp430_prev_register(), parse_and_eval_long(), parse_find_args(), parse_frame_specification(), pos_atr(), print_ada_task_info(), print_object_command(), printf_pointer(), ptid_from_atcb_common(), quit_command(), rank_one_type_parm_ptr(), read_atcb(), read_fat_string_value(), riscv_print_one_register_info(), rl78_prev_register(), rust_compute_range(), rust_range(), rust_slice_to_array(), rust_subscript(), rust_val_print_slice(), s12z_print_ccw_info(), s390_unwind_pseudo_register(), scalar_binop(), scan_discrim_bound(), set_internalvar_component(), svr4_handle_solib_event(), task_command_1(), trace_variable_command(), ui_printf(), valpy_binop_throw(), valpy_float(), valpy_getitem(), valpy_long(), valpy_nonzero(), value_args_as_target_float(), value_as_address(), value_as_mpz(), value_assign(), value_cast(), value_dynamic_cast(), value_equal(), value_less(), f_language::value_print_inner(), value_ptrdiff(), value_struct_elt_for_reference(), expr::fortran_undetermined::value_subarray(), vlscm_binop_gdbthrow(), and wrap_ternop_intrinsic().

◆ value_as_mpz()

gdb_mpz value_as_mpz ( struct value * val)

◆ value_field()

struct value * value_field ( struct value * arg1,
int fieldno )

◆ value_field_bitfield()

struct value * value_field_bitfield ( struct type * type,
int fieldno,
const gdb_byte * valaddr,
LONGEST embedded_offset,
const struct value * val )

◆ value_fn_field()

struct value * value_fn_field ( struct value ** arg1p,
struct fn_field * f,
int j,
struct type * type,
LONGEST offset )

◆ value_free_to_mark()

void value_free_to_mark ( const struct value * mark)

Definition at line 1437 of file value.c.

References all_values.

Referenced by scoped_value_mark::free_to_mark(), watch_command_1(), and watchpoint_check().

◆ value_from_component()

struct value * value_from_component ( struct value * whole,
struct type * type,
LONGEST offset )

◆ value_from_contents()

struct value * value_from_contents ( struct type * type,
const gdb_byte * contents )

◆ value_from_contents_and_address()

struct value * value_from_contents_and_address ( struct type * type,
const gdb_byte * valaddr,
CORE_ADDR address,
frame_info_ptr frame )

◆ value_from_contents_and_address_unresolved()

struct value * value_from_contents_and_address_unresolved ( struct type * type,
const gdb_byte * valaddr,
CORE_ADDR address )

◆ value_from_history_ref()

struct value * value_from_history_ref ( const char * h,
const char ** endp )

Definition at line 3595 of file value.c.

References access_value_history().

Referenced by get_number_trailer(), and get_ulongest().

◆ value_from_host_double()

struct value * value_from_host_double ( struct type * type,
double d )

◆ value_from_longest()

struct value * value_from_longest ( struct type * type,
LONGEST num )

Definition at line 3438 of file value.c.

References value::allocate(), value::contents_raw(), and pack_long().

Referenced by ada_array_length(), ada_atr_enum_val(), ada_atr_size(), ada_binop_in_bounds(), ada_equal_binop(), ada_pos_atr(), ada_unop_atr(), ada_unop_in_range(), ada_varobj_simple_array_elt(), expr::assign_component(), call_target_sbrk(), checkpoint_command(), complex_binop(), compute_probe_arg(), convert_value_from_python(), desc_bounds(), dwarf2_compute_name(), elf_gnu_ifunc_resolve_addr(), enum_constant_from_type(), eval_op_alignof(), eval_op_equal(), eval_op_f_abs(), eval_op_f_allocated(), eval_op_f_kind(), eval_op_f_loc(), eval_op_f_mod(), eval_op_f_modulo(), eval_op_f_rank(), eval_op_geq(), eval_op_gtr(), eval_op_leq(), eval_op_less(), eval_op_lognot(), eval_op_notequal(), eval_op_objc_msgcall(), eval_op_objc_selector(), eval_op_rust_complement(), eval_op_sub(), eval_ternop_in_range(), expr::ada_binop_addsub_operation::evaluate(), expr::c_string_operation::evaluate(), expr::opencl_logical_binop_operation::evaluate(), expr::bool_operation::evaluate(), expr::logical_and_operation::evaluate(), expr::logical_or_operation::evaluate(), expr::var_msym_value_operation::evaluate_for_sizeof(), expr::subscript_operation::evaluate_for_sizeof(), expr::unop_ind_base_operation::evaluate_for_sizeof(), expr::structop_base_operation::evaluate_funcall(), evaluate_subexp_for_sizeof_base(), fortran_array_shape(), fortran_array_size(), fortran_associated(), fortran_bounds_all_dims(), fortran_bounds_for_dimension(), fortran_ceil_operation(), fortran_floor_operation(), gdbscm_value_to_real(), inferior_call_waitpid(), inferior_id_make_value(), inferior_thread_count_make_value(), isvoid_internal_fn(), linux_infcall_mmap(), opencl_logical_not(), opencl_relop(), f_language::print_array_index(), language_defn::print_array_index(), print_scalar_formatted(), rust_subscript(), s390_unwind_pseudo_register(), shell_internal_fn(), thin_data_pntr(), thread_num_make_value_helper(), val_atr(), valpy_binop_throw(), value_allocate_space_in_inferior(), value_assign(), value_cast(), value_from_setting(), value_neg(), value_nsstring(), value_of_internalvar(), value_one(), value_struct_elt_for_reference(), value_x_unop(), vlscm_binop_gdbthrow(), vlscm_convert_number(), vlscm_convert_typed_number(), vlscm_convert_typed_value_from_scheme(), and vlscm_unop_gdbthrow().

◆ value_from_mpz()

struct value * value_from_mpz ( struct type * type,
const gdb_mpz & v )

◆ value_from_pointer()

struct value * value_from_pointer ( struct type * type,
CORE_ADDR addr )

◆ value_from_ulongest()

struct value * value_from_ulongest ( struct type * type,
ULONGEST num )

◆ value_history_count()

ULONGEST value_history_count ( )

Definition at line 1736 of file value.c.

References value_history.

Referenced by gdbpy_history_count().

◆ value_internal_function_name()

const char * value_internal_function_name ( struct value * val)

◆ value_mark()

struct value * value_mark ( void )

Definition at line 1414 of file value.c.

References all_values.

Referenced by fetch_subexp_value(), watch_command_1(), and watchpoint_check().

◆ value_of_internalvar()

struct value * value_of_internalvar ( struct gdbarch * gdbarch,
struct internalvar * var )

◆ value_release_to_mark()

std::vector< value_ref_ptr > value_release_to_mark ( const struct value * mark)

Definition at line 1475 of file value.c.

References all_values.

Referenced by fetch_subexp_value().

◆ value_static_field()

struct value * value_static_field ( struct type * type,
int fieldno )

Variable Documentation

◆ all_values

std::vector<value_ref_ptr> all_values
static

◆ array_length_limiting_element_count

gdb::optional<int> array_length_limiting_element_count
static

◆ functionlist

struct cmd_list_element* functionlist
static

Definition at line 149 of file value.c.

Referenced by do_add_internal_function().

◆ internalvars

std::map<std::string, internalvar> internalvars
static

◆ max_value_size

int max_value_size = 65536
static

◆ value_history

std::vector<value_ref_ptr> value_history
static