GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "charset.h"
#include "cp-abi.h"
#include "infcall.h"
#include "symtab.h"
#include "language.h"
#include "valprint.h"
#include "value.h"
#include "guile-internal.h"
Go to the source code of this file.
Classes | |
struct | _value_smob |
Typedefs | |
typedef struct _value_smob | value_smob |
Functions | |
void | gdbscm_preserve_values (const struct extension_language_defn *extlang, struct objfile *objfile, htab_t copied_types) |
static void | vlscm_remember_scheme_value (value_smob *v_smob) |
static void | vlscm_forget_value_smob (value_smob *v_smob) |
static size_t | vlscm_free_value_smob (SCM self) |
static int | vlscm_print_value_smob (SCM self, SCM port, scm_print_state *pstate) |
static SCM | vlscm_equal_p_value_smob (SCM v1, SCM v2) |
static SCM | vlscm_make_value_smob (void) |
int | vlscm_is_value (SCM scm) |
static SCM | gdbscm_value_p (SCM scm) |
SCM | vlscm_scm_from_value (struct value *value) |
static SCM | vlscm_get_value_arg_unsafe (SCM self, int arg_pos, const char *func_name) |
static value_smob * | vlscm_get_value_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name) |
struct value * | vlscm_scm_to_value (SCM v_scm) |
static SCM | gdbscm_make_value (SCM x, SCM rest) |
static SCM | gdbscm_make_lazy_value (SCM type_scm, SCM address_scm) |
static SCM | gdbscm_value_optimized_out_p (SCM self) |
static SCM | gdbscm_value_address (SCM self) |
static SCM | gdbscm_value_dereference (SCM self) |
static SCM | gdbscm_value_referenced_value (SCM self) |
static SCM | gdbscm_value_type (SCM self) |
static SCM | gdbscm_value_dynamic_type (SCM self) |
static SCM | vlscm_do_cast (SCM self, SCM type_scm, enum exp_opcode op, const char *func_name) |
static SCM | gdbscm_value_cast (SCM self, SCM new_type) |
static SCM | gdbscm_value_dynamic_cast (SCM self, SCM new_type) |
static SCM | gdbscm_value_reinterpret_cast (SCM self, SCM new_type) |
static SCM | gdbscm_value_field (SCM self, SCM field_scm) |
static SCM | gdbscm_value_subscript (SCM self, SCM index_scm) |
static SCM | gdbscm_value_call (SCM self, SCM args) |
static SCM | gdbscm_value_to_bytevector (SCM self) |
static int | is_intlike (struct type *type, int ptr_ok) |
static SCM | gdbscm_value_to_bool (SCM self) |
static SCM | gdbscm_value_to_integer (SCM self) |
static SCM | gdbscm_value_to_real (SCM self) |
static SCM | gdbscm_value_to_string (SCM self, SCM rest) |
static SCM | gdbscm_value_to_lazy_string (SCM self, SCM rest) |
static SCM | gdbscm_value_lazy_p (SCM self) |
static SCM | gdbscm_value_fetch_lazy_x (SCM self) |
static SCM | gdbscm_value_print (SCM self) |
static SCM | gdbscm_parse_and_eval (SCM expr_scm) |
static SCM | gdbscm_history_ref (SCM index) |
static SCM | gdbscm_history_append_x (SCM value) |
void | gdbscm_initialize_values (void) |
Variables | |
static const char | value_smob_name [] = "gdb:value" |
static scm_t_bits | value_smob_tag |
static value_smob * | values_in_scheme |
static SCM | type_keyword |
static SCM | encoding_keyword |
static SCM | errors_keyword |
static SCM | length_keyword |
static SCM | error_symbol |
static SCM | escape_symbol |
static SCM | substitute_symbol |
static const scheme_function | value_functions [] |
typedef struct _value_smob value_smob |
|
static |
Definition at line 1387 of file scm-value.c.
References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, record_latest_value(), RETURN_MASK_ALL, TRY, _value_smob::value, and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 1363 of file scm-value.c.
References access_value_history(), CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_parse_function_args(), RETURN_MASK_ALL, TRY, and vlscm_scm_from_value().
void gdbscm_initialize_values | ( | void | ) |
Definition at line 1578 of file scm-value.c.
References encoding_keyword, error_symbol, errors_keyword, escape_symbol, gdbscm_define_functions(), gdbscm_make_smob_type(), length_keyword, substitute_symbol, type_keyword, value_smob_name, value_smob_tag, vlscm_equal_p_value_smob(), vlscm_free_value_smob(), and vlscm_print_value_smob().
|
static |
Definition at line 361 of file scm-value.c.
References CATCH, do_cleanups(), END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_parse_function_args(), gdbscm_throw(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, type, tyscm_get_type_smob_arg_unsafe(), tyscm_type_smob_type(), value_from_contents_and_address(), value_mark(), and vlscm_scm_from_value().
|
static |
Definition at line 314 of file scm-value.c.
References current_language, do_cleanups(), FUNC_NAME, gdbscm_is_exception(), gdbscm_parse_function_args(), gdbscm_throw(), get_current_arch(), make_cleanup_value_free_to_mark(), type_keyword, tyscm_get_type_smob_arg_unsafe(), tyscm_type_smob_type(), value_mark(), vlscm_convert_typed_value_from_scheme(), and vlscm_scm_from_value().
|
static |
Definition at line 1322 of file scm-value.c.
References CATCH, do_cleanups(), END_CATCH, FUNC_NAME, gdb_assert, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_parse_function_args(), gdbscm_throw(), make_cleanup(), make_cleanup_value_free_to_mark(), parse_and_eval(), RETURN_MASK_ALL, TRY, value_mark(), vlscm_scm_from_value(), and xfree().
void gdbscm_preserve_values | ( | const struct extension_language_defn * | extlang, |
struct objfile * | objfile, | ||
htab_t | copied_types | ||
) |
Definition at line 87 of file scm-value.c.
References _value_smob::next, preserve_one_value(), and _value_smob::value.
|
static |
Definition at line 426 of file scm-value.c.
References _value_smob::address, CATCH, do_cleanups(), END_CATCH, FUNC_NAME, gdbscm_is_exception(), gdbscm_throw(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, _value_smob::value, value_addr(), value_mark(), vlscm_get_value_smob_arg_unsafe(), and vlscm_scm_from_value().
|
static |
Definition at line 818 of file scm-value.c.
References _, call_function_by_hand(), CATCH, check_typedef(), current_language, do_cleanups(), END_CATCH, FUNC_NAME, gdb_assert, GDBSCM_ARG_NONE, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_is_exception(), gdbscm_is_true, gdbscm_throw(), get_current_arch(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, TYPE_CODE, TYPE_CODE_FUNC, _value_smob::value, value_mark(), value_type(), vlscm_convert_value_from_scheme(), vlscm_get_value_smob_arg_unsafe(), and vlscm_scm_from_value().
|
static |
Definition at line 681 of file scm-value.c.
References FUNC_NAME, and vlscm_do_cast().
|
static |
Definition at line 467 of file scm-value.c.
References CATCH, do_cleanups(), END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_throw(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, _value_smob::value, value_ind(), value_mark(), vlscm_get_value_smob_arg_unsafe(), and vlscm_scm_from_value().
|
static |
Definition at line 689 of file scm-value.c.
References FUNC_NAME, and vlscm_do_cast().
|
static |
Definition at line 568 of file scm-value.c.
References CATCH, CHECK_TYPEDEF, coerce_ref(), do_cleanups(), _value_smob::dynamic_type, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_value_type(), lookup_pointer_type(), lookup_reference_type(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_TARGET_TYPE, tyscm_scm_from_type(), _value_smob::value, value_ind(), value_mark(), value_rtti_type(), value_type(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 1255 of file scm-value.c.
References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, RETURN_MASK_ALL, TRY, _value_smob::value, value_fetch_lazy(), value_lazy(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 707 of file scm-value.c.
References _, CATCH, do_cleanups(), END_CATCH, FUNC_NAME, gdb_assert, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_scm_to_c_string(), gdbscm_throw(), make_cleanup(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, _value_smob::value, value_mark(), value_struct_elt(), vlscm_get_value_smob_arg_unsafe(), vlscm_scm_from_value(), and xfree().
|
static |
Definition at line 1243 of file scm-value.c.
References FUNC_NAME, _value_smob::value, value_lazy(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 402 of file scm-value.c.
References CATCH, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, RETURN_MASK_ALL, TRY, _value_smob::value, value_optimized_out(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 248 of file scm-value.c.
References vlscm_is_value().
|
static |
Definition at line 1278 of file scm-value.c.
References CATCH, common_val_print(), current_language, value_print_options::deref_ref, do_cleanups(), END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, get_user_print_options(), host_charset(), make_cleanup_ui_file_delete(), mem_fileopen(), RETURN_MASK_ALL, TRY, ui_file_xstrdup(), _value_smob::value, vlscm_get_value_smob_arg_unsafe(), and xfree().
|
static |
Definition at line 508 of file scm-value.c.
References _, CATCH, check_typedef(), coerce_ref(), do_cleanups(), END_CATCH, error(), FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_throw(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, _value_smob::value, value_ind(), value_mark(), value_type(), vlscm_get_value_smob_arg_unsafe(), and vlscm_scm_from_value().
|
static |
Definition at line 697 of file scm-value.c.
References FUNC_NAME, and vlscm_do_cast().
|
static |
Definition at line 752 of file scm-value.c.
References _, CATCH, check_typedef(), coerce_ref(), current_language, do_cleanups(), END_CATCH, error(), FUNC_NAME, gdb_assert, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_throw(), get_type_arch(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, _value_smob::value, value_as_long(), value_mark(), value_subscript(), value_type(), vlscm_convert_value_from_scheme(), vlscm_get_value_smob_arg_unsafe(), and vlscm_scm_from_value().
|
static |
Definition at line 941 of file scm-value.c.
References _, CATCH, CHECK_TYPEDEF, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, is_intlike(), RETURN_MASK_ALL, TRY, type, TYPE_CODE, TYPE_CODE_PTR, _value_smob::value, value_as_address(), value_as_long(), value_type(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 895 of file scm-value.c.
References CATCH, CHECK_TYPEDEF, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, type::length, RETURN_MASK_ALL, TRY, type, TYPE_LENGTH, _value_smob::value, value_contents(), value_type(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 984 of file scm-value.c.
References _, CATCH, CHECK_TYPEDEF, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_scm_from_longest(), gdbscm_scm_from_ulongest(), is_intlike(), RETURN_MASK_ALL, TRY, type, TYPE_CODE, TYPE_CODE_PTR, TYPE_UNSIGNED, _value_smob::value, value_as_address(), value_as_long(), value_type(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 1190 of file scm-value.c.
References CATCH, do_cleanups(), encoding, encoding_keyword, END_CATCH, exception_none, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_is_exception(), gdbscm_parse_function_args(), gdbscm_throw(), length_keyword, lsscm_make_lazy_string(), make_cleanup(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, TYPE_CODE, TYPE_CODE_PTR, _value_smob::value, value_address(), value_ind(), value_mark(), value_type(), vlscm_get_value_smob_arg_unsafe(), and xfree().
|
static |
Definition at line 1030 of file scm-value.c.
References _, CATCH, CHECK_TYPEDEF, END_CATCH, FUNC_NAME, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_out_of_range_error(), is_intlike(), RETURN_MASK_ALL, TRY, type, TYPE_CODE, TYPE_CODE_FLT, _value_smob::value, value_as_double(), value_type(), and vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 1095 of file scm-value.c.
References _, CATCH, discard_cleanups(), do_cleanups(), encoding, encoding_keyword, END_CATCH, error_symbol, errors_keyword, FUNC_NAME, gdbscm_dynwind_xfree(), gdbscm_guile_version_is_at_least(), GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_make_out_of_range_error(), gdbscm_parse_function_args(), gdbscm_throw(), LA_GET_STRING, length_keyword, make_cleanup(), RETURN_MASK_ALL, substitute_symbol, TRY, TYPE_LENGTH, _value_smob::value, vlscm_get_value_smob_arg_unsafe(), and xfree().
|
static |
Definition at line 553 of file scm-value.c.
References FUNC_NAME, _value_smob::type, tyscm_scm_from_type(), _value_smob::value, value_type(), and vlscm_get_value_smob_arg_unsafe().
Referenced by gdbscm_value_dynamic_type().
Definition at line 928 of file scm-value.c.
References TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_ENUM, TYPE_CODE_INT, and TYPE_CODE_PTR.
Referenced by gdbscm_value_to_bool(), gdbscm_value_to_integer(), and gdbscm_value_to_real().
|
static |
Definition at line 634 of file scm-value.c.
References CATCH, do_cleanups(), END_CATCH, FUNC_NAME, gdb_assert, GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS, gdbscm_is_exception(), gdbscm_throw(), make_cleanup_value_free_to_mark(), RETURN_MASK_ALL, TRY, tyscm_get_type_smob_arg_unsafe(), tyscm_type_smob_type(), _value_smob::value, value_cast(), value_dynamic_cast(), value_mark(), value_reinterpret_cast(), vlscm_get_value_smob_arg_unsafe(), and vlscm_scm_from_value().
Referenced by gdbscm_value_cast(), gdbscm_value_dynamic_cast(), and gdbscm_value_reinterpret_cast().
|
static |
Definition at line 193 of file scm-value.c.
References CATCH, END_CATCH, GDBSCM_HANDLE_GDB_EXCEPTION, RETURN_MASK_ALL, TRY, _value_smob::value, and value_equal().
Referenced by gdbscm_initialize_values().
|
static |
Definition at line 111 of file scm-value.c.
References gdb_assert, _value_smob::next, and _value_smob::prev.
Referenced by vlscm_free_value_smob().
|
static |
Definition at line 128 of file scm-value.c.
References _value_smob::value, value_free(), and vlscm_forget_value_smob().
Referenced by gdbscm_initialize_values().
Definition at line 276 of file scm-value.c.
References value_smob_name, and vlscm_is_value().
Referenced by vlscm_get_value_smob_arg_unsafe().
|
static |
Definition at line 288 of file scm-value.c.
References vlscm_get_value_arg_unsafe().
Referenced by gdbscm_history_append_x(), gdbscm_value_address(), gdbscm_value_call(), gdbscm_value_dereference(), gdbscm_value_dynamic_type(), gdbscm_value_fetch_lazy_x(), gdbscm_value_field(), gdbscm_value_lazy_p(), gdbscm_value_optimized_out_p(), gdbscm_value_print(), gdbscm_value_referenced_value(), gdbscm_value_subscript(), gdbscm_value_to_bool(), gdbscm_value_to_bytevector(), gdbscm_value_to_integer(), gdbscm_value_to_lazy_string(), gdbscm_value_to_real(), gdbscm_value_to_string(), gdbscm_value_type(), and vlscm_do_cast().
int vlscm_is_value | ( | SCM | scm | ) |
Definition at line 240 of file scm-value.c.
References value_smob_tag.
Referenced by gdbscm_value_p(), ppscm_pretty_print_one_value(), vlscm_convert_typed_value_from_scheme(), vlscm_get_value_arg_unsafe(), and vlscm_scm_to_value().
|
static |
Definition at line 215 of file scm-value.c.
References _value_smob::address, _value_smob::dynamic_type, gdbscm_init_gsmob(), _value_smob::next, _value_smob::prev, scm_new_smob(), _value_smob::type, _value_smob::value, value_smob_name, and value_smob_tag.
Referenced by vlscm_scm_from_value().
|
static |
Definition at line 141 of file scm-value.c.
References CATCH, common_val_print(), current_language, value_print_options::deref_ref, do_cleanups(), END_CATCH, GDBSCM_HANDLE_GDB_EXCEPTION, gdbscm_printf(), get_user_print_options(), make_cleanup_ui_file_delete(), mem_fileopen(), value_print_options::raw, RETURN_MASK_ALL, TRY, ui_file_xstrdup(), _value_smob::value, value_smob_name, and xfree().
Referenced by gdbscm_initialize_values().
|
static |
Definition at line 99 of file scm-value.c.
References _value_smob::next, _value_smob::prev, and values_in_scheme.
Referenced by vlscm_scm_from_value().
SCM vlscm_scm_from_value | ( | struct value * | value | ) |
Definition at line 258 of file scm-value.c.
References release_value_or_incref(), _value_smob::value, vlscm_make_value_smob(), and vlscm_remember_scheme_value().
Referenced by gdbscm_apply_val_pretty_printer(), gdbscm_frame_read_register(), gdbscm_frame_read_var(), gdbscm_history_ref(), gdbscm_lazy_string_to_value(), gdbscm_make_lazy_value(), gdbscm_make_value(), gdbscm_parse_and_eval(), gdbscm_symbol_value(), gdbscm_value_address(), gdbscm_value_call(), gdbscm_value_dereference(), gdbscm_value_field(), gdbscm_value_referenced_value(), gdbscm_value_subscript(), vlscm_binop(), vlscm_do_cast(), and vlscm_unop().
struct value* vlscm_scm_to_value | ( | SCM | v_scm | ) |
Definition at line 300 of file scm-value.c.
References gdb_assert, _value_smob::value, and vlscm_is_value().
Referenced by vlscm_convert_typed_value_from_scheme().
|
static |
Definition at line 71 of file scm-value.c.
Referenced by gdbscm_initialize_values(), gdbscm_value_to_lazy_string(), and gdbscm_value_to_string().
|
static |
Definition at line 76 of file scm-value.c.
Referenced by gdbscm_initialize_values(), and gdbscm_value_to_string().
|
static |
Definition at line 72 of file scm-value.c.
Referenced by gdbscm_initialize_values(), and gdbscm_value_to_string().
|
static |
Definition at line 77 of file scm-value.c.
Referenced by gdbscm_initialize_values().
|
static |
Definition at line 73 of file scm-value.c.
Referenced by gdbscm_initialize_values(), gdbscm_value_to_lazy_string(), and gdbscm_value_to_string().
|
static |
Definition at line 78 of file scm-value.c.
Referenced by gdbscm_initialize_values(), and gdbscm_value_to_string().
|
static |
Definition at line 70 of file scm-value.c.
Referenced by gdbscm_initialize_values(), and gdbscm_make_value().
|
static |
Definition at line 1411 of file scm-value.c.
|
static |
Definition at line 59 of file scm-value.c.
Referenced by gdbscm_initialize_values(), vlscm_get_value_arg_unsafe(), vlscm_make_value_smob(), and vlscm_print_value_smob().
|
static |
Definition at line 62 of file scm-value.c.
Referenced by gdbscm_initialize_values(), vlscm_is_value(), and vlscm_make_value_smob().
|
static |
Definition at line 67 of file scm-value.c.
Referenced by vlscm_remember_scheme_value().