summaryrefslogtreecommitdiff
path: root/gdb/valops.c
Commit message (Collapse)AuthorAgeFilesLines
* 2002-01-07 Michael Snyder <msnyder@redhat.com>Michael Snyder2002-01-081-0/+1
| | | | | | | | * cp-valprint.c (cp_print_value): FIXME comment, alloca size. * p-valprint.c (pascal_object_print_value): Ditto. * somread.c (som_symtab_read): Ditto. * symfile.c (simple_free_overlay_region_table): Ditto. * valops.c (value_assign): Ditto.
* * valops.c (value_arg_coerce): Fix formatting.Mark Kettenis2002-01-061-2/+3
|
* s/BIG_ENDIAN/BFD_ENDIAN_BIG/Andrew Cagney2002-01-051-1/+1
|
* 2002-01-04 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-01-041-1/+11
| | | | | | | | * valops.c (find_overload_match): Accept obj as a reference parameter. Update it before returning. * value.h (find_overload_match): Update prototype. * eval.c (evaluate_subexp_standard): Pass object to find_overload_match by reference.
* s/value_ptr/struct value */Andrew Cagney2002-01-041-114/+113
|
* Approved by Jim Blandy:Fred Fish2001-12-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | 2001-12-11 Fred Fish <fnf@redhat.com> * c-typeprint.c (c_type_print_base): Use type flags access macros to test bits. * ch-typeprint.c (chill_type_print_base): Ditto. * ch-valprint.c (chill_val_print): Ditto. * d10v-tdep.c (d10v_pointer_to_address): Ditto. * dwarf2read.c (dwarf2_add_member_fn): Ditto. * dwarfread.c (read_structure_scope): Ditto. * gdbtypes.c (create_range_type): Dittol (create_set_type): Ditto. (check_typedef): Ditto. * jv-typeprint.c (java_type_print_base): Ditto. * p-typeprint.c (pascal_type_print_base): Ditto * p-valprint.c (pascal_val_print): Ditto. * stabsread.c (read_cfront_member_functions): Ditto. (read_member_functions): Ditto. (cleanup_undefined_types): Ditto. * valprint.c (val_print): Ditto. * valops.c (hand_function_call): Remove is_prototyped variable and just use type flag test macro directly.
* Undo accidental commit of a separate patch.Daniel Jacobowitz2001-12-071-11/+1
|
* * valops.c (hand_function_call): Check for method arguments inDaniel Jacobowitz2001-12-071-2/+33
| | | | TYPE_ARG_TYPES(), not in TYPE_FIELD ().
* * valops.c (default_coerce_float_to_double,Jim Blandy2001-11-131-14/+28
| | | | standard_coerce_float_to_double): Doc fixes.
* Add predicate for PUSH_RETURN_ADDRESS.Andrew Cagney2001-11-061-12/+12
|
* * value.h (value_as_address): Rename value_as_pointer.Andrew Cagney2001-10-161-3/+3
| | | | | | * eval.c, findvar.c, gnu-v2-abi.c, gnu-v3-abi.c, jv-lang.c, jv-valprint.c, printcmd.c, stack.c, top.c, valarith.c, valops.c, values.c: Update.
* Clean up the D10V port so that GDB and the target program noJim Blandy2001-07-101-47/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | longer disagree on how big pointers are. * findvar.c (value_from_register): Remove special case code for D10V. * printcmd.c (print_frame_args): Same. * valops.c (value_at, value_fetch_lazy): Same. * values.c (unpack_long): Same. * gdbarch.sh: Changes to effect the following: * gdbarch.h (GDB_TARGET_IS_D10V, D10V_MAKE_DADDR, gdbarch_d10v_make_daddr_ftype, gdbarch_d10v_make_daddr, set_gdbarch_d10v_make_daddr, D10V_MAKE_IADDR, gdbarch_d10v_make_iaddr_ftype, gdbarch_d10v_make_iaddr, set_gdbarch_d10v_make_iaddr, D10V_DADDR_P, gdbarch_d10v_daddr_p_ftype, gdbarch_d10v_daddr_p, set_gdbarch_d10v_daddr_p, D10V_IADDR_P, gdbarch_d10v_iaddr_p_ftype, gdbarch_d10v_iaddr_p, set_gdbarch_d10v_iaddr_p, D10V_CONVERT_DADDR_TO_RAW, gdbarch_d10v_convert_daddr_to_raw_ftype, gdbarch_d10v_convert_daddr_to_raw, set_gdbarch_d10v_convert_daddr_to_raw, D10V_CONVERT_IADDR_TO_RAW, gdbarch_d10v_convert_iaddr_to_raw_ftype, gdbarch_d10v_convert_iaddr_to_raw, set_gdbarch_d10v_convert_iaddr_to_raw): Delete declarations. * gdbarch.c: Delete the corresponding definitions. (struct gdbarch): Delete members d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p, d10v_convert_daddr_to_raw, and d10v_convert_iaddr_to_raw. (startup_gdbarch): Remove initializers for the above. (verify_gdbarch, gdbarch_dump): Don't verify or dump them any more. * d10v-tdep.c (d10v_register_virtual_type): Rather that claiming the stack pointer and PC are 32 bits long (which they aren't), say that the stack pointer is an int16_t, and the program counter is a function pointer. This allows the rest of GDB to make the appropriate conversions between the code pointer format and real addresses. (d10v_register_convertible, d10v_register_convert_to_virtual, d10v_register_convert_to_raw): Delete function; no registers are convertible now, so we use generic_register_convertible_not instead. (d10v_address_to_pointer, d10v_pointer_to_address): New gdbarch methods. (d10v_push_arguments, d10v_extract_return_value): Remove special cases for code and data pointers. (d10v_gdbarch_init): Set gdbarch_ptr_bit to 16, so that GDB and the target agree on how large pointers are. Say that addresses are 32 bits long. Register the address_to_pointer and pointer_to_address conversion functions. Since no registers are convertible now, register generic_register_convertible_not as the gdbarch_register_convertible method instead of d10v_register_convertible. Remove registrations for d10v_register_convert_to_virtual, d10v_register_convert_to_raw, gdbarch_d10v_make_daddr, gdbarch_d10v_make_iaddr, gdbarch_d10v_daddr_p, gdbarch_d10v_iaddr_p, gdbarch_d10v_convert_daddr_to_raw, and gdbarch_d10v_convert_iaddr_to_raw.
* * valops.c (value_cast): When casting a pointer to an integer,Jim Blandy2001-07-101-1/+12
| | | | don't convert it to an address.
* 2001-05-07 Daniel Berlin <dan@cgsoftware.com>Daniel Berlin2001-05-191-6/+6
| | | | | | | | | | | | | | | | | | Changes by Jim Ingham: * values.c (value_change_enclosing_type): New function. If the new enclosing type is larger than the old one, we need to allocate more space. * value.h: Add value_change_enclosing_type prototype. * valops.c (value_cast): Use it. (value_assign): Use it. (value_addr): Use it. (value_ind): Use it. (value_full_object): Use it. 2001-05-07 Daniel Berlin <dan@cgsoftware.com> * values.c (value_static_field): Handle static fields that have a constant value.
* (Changes from Daniel Berlin, with revisions by Jim Blandy.)Jim Blandy2001-04-271-220/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abstract out operations specific to particular C++ ABI's, and invoke them through a function table. This removes the C++ ABI dependencies scattered throughout the code, and allows us to cleanly add support for new C++ ABI's. * cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files. * c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c, jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c: #include "cp-abi.h". These files all use functions now declared there. * symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P): Deleted. These services are now provided by functions declared in cp-abi.h. * value.h (value_rtti_type, value_virtual_fn_field): Same. * values.c (value_virtual_fn_field): Same, for this definition. * valops.c (value_rtti_type): Same. * c-typeprint.c (c_type_print_base): Use the functions from "cp-abi.h", instead of the old macros, or hard-coded ABI-specific tests. * dbxread.c (record_minimal_symbol): Same. * gdbtypes.c (get_destructor_fn_field, virtual_base_index, virtual_base_index_skip_primaries): Same. * jv-typeprint.c (java_type_print_base): Same. * linespec.c (find_methods, decode_line_1): Same. * symtab.c (gdb_mangle_name): Same. * Makefile.in (SFILES): Add the new .c files mentioned above. (cp_abi_h): New variable. (COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o. (cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets. (c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o, jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add dependency on $(cp_abi_h).
* * valops.c (hand_function_call): Simplify computation of theAndrew Cagney2001-03-191-12/+5
| | | | address of the pushed argument.
* Update/correct copyright notices.Kevin Buettner2001-03-061-2/+2
|
* Create new file regcache.h. Update all uses.Andrew Cagney2001-03-011-2/+3
|
* 2001-02-06 Michael Snyder <msnyder@makita.cygnus.com>Michael Snyder2001-02-061-3/+3
| | | | | | | | | | | | | | Submitted by Paul Hilfinger (hilfingr@gnat.com) and Andrei Petrov (and@genesyslab.com). * findvar.c: Buffers of size MAX_REGISTER_RAW_SIZE or REGISTER_BYTES must be allocated dynamically, since these are no longer constants. * infcmd.c: Ditto. * regcache.c: Ditto. * remote.c: Ditto. * sol-thread.c: Ditto. * valops.c: Ditto. * config/sparc/sun4sol2.mh (MH_CFLAGS): Add -I/usr/include/v9, as a work-around for a missing Sun header file in solaris for sparc64.
* * valops.c (value_cast): If casting a scalar to a pointer, do notDavid Taylor2001-02-061-4/+15
| | | | | | | | | | issue a message about truncation unless it exceeds the length of an address, not the length of a pointer. This is because what the user gives us is an address, not a pointer, and we will ultimately convert it (via ADDRESS_TO_POINTER) to a pointer, not truncate it to a pointer. This allows things like "print *(int *)0x01000234" to work without generating a misleading message on a target having two byte pointers and four byte addresses.
* * valops.c (VALUE_SUBSTRING_START): Delete.Nicholas Duffek2001-01-041-2/+0
|
* Replace free() with xfree().Kevin Buettner2000-12-151-2/+2
|
* Protoization.Kevin Buettner2000-11-081-4/+1
|
* * arch-utils.c, arch-utils.h (default_convert_from_func_ptr_addr):Peter Schauer2000-10-261-5/+0
| | | | | | | | | | | | | | | | New function. * gdbarch.sh (CONVERT_FROM_FUNC_PTR_ADDR): Add. * gdbarch.c, gdbarch.h: Regenerate. * valops.c (find_function_addr): Use CONVERT_FROM_FUNC_PTR_ADDR unconditionally. * config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR): Delete definition. * config/powerpc/tm-linux.h (CONVERT_FROM_FUNC_PTR_ADDR): Remove undef. * rs6000-tdep.c (rs6000_convert_from_func_ptr_addr): Fix comment. (rs6000_gdbarch_init): Register rs6000_convert_from_func_ptr_addr if not ELFOSABI_LINUX.
* 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder2000-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | * valops.c (value_cast): Indentation fix-up. * acconfig.h (HAVE_PRGREGSET32_T, HAVE_PRFPREGSET32_T, HAVE_STRUCT_LINK_MAP32): New configure macros. * config.in: Ditto. * configure.in: Test for the above new macros. * breakpoint.c: Update copyright date. * core-sol2.c: Include v9/sys/privregs.h directly to work around a bug in Sun's Solaris 8 header files. (fetch_core_registers): Use the above new configure macros to handle cross-debugging of 32-bit core files on a 64-bit host. * sol-thread.c (ps_pdmodel) New function. (rw_common): For debugging of 32-bit apps on a 64-bit host, truncate addresses to 32 bits. * solib.c (solib_extract_address): Functionize. Make 32/64 aware. (LM_ADDR, LM_NEXT, LM_NAME): Ditto. (IGNORE_FIRST_LINK_MAP): Ditto. (first_link_map_member): Make 32/64 aware. (open_symbol_file_object): Ditto. (current_sos): Ditto.
* Multi-arch EXTRA_STACK_ALIGNMENT_NEEDED (nee NO_EXTRA_ALIGNMENT_NEEDED).Andrew Cagney2000-08-041-20/+20
|
* Protoization.Kevin Buettner2000-07-301-175/+61
|
* modify error messageDaniel Berlin2000-07-171-4/+4
|
* Properly handle referencesDaniel Berlin2000-07-151-12/+22
|
* * valops.c (value_cast): Allow cast from INT, ENUM or RANGE toAndrew Cagney2000-07-121-0/+14
| | | | POINTER.
* * gdbtypes.c (is_ancestor): Infer type equivalence from nameNicholas Duffek2000-07-091-19/+15
| | | | | | | | | equivalence. (rank_one_type): Use strcmp instead of == to compare type names. Don't swap parm with arg when checking TYPE_CODE_REF types. * valops.c (find_overload_match): Fix indentation. Compare parameter rankings to 0..9, 10..99, and 100+ instead of 0, 10, and 100.
* 2000-06-15 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder2000-06-151-2/+4
| | | | * valops.c (value_cast): Break up long lines.
* 2000-06-12 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser2000-06-121-1/+2
| | | | | * valops.c (value_assign): Adjust the length to take into consideration that we are not starting from the beginning.
* PARAMS removal.Kevin Buettner2000-05-281-15/+20
|
* Purge (almost) make_cleanup_func.Andrew Cagney2000-05-221-2/+1
|
* * target.h (target_memory_bfd_section): Removed declaration.J.T. Conklin2000-05-201-3/+3
| | | | | | | | | | | | | | | | | | | * target.c (target_memory_bfd_section): Removed. * exec.c (xfer_memory): Removed #if'ed-out code which referenced target_memory_bfd_section. * target.h (target_read_memory_section): Removed declaration. * target.c (target_read_memory_section): Removed. (target_xfer_memory): Update, removed bfd_section argument. (target_read_string, target_read_memory, target_write_memory): Update for above change. * gdbcore.h (read_memory_section): Removed declaration. * corefile.c (read_memory_section): Removed. * jv-lang.c (get_java_utf8_name): Changed calls to read_memory_section to read_memory. * printcmd.c (printf_command): Likewise. * valops.c (value_at, value_fetch_lazy): Likewise.
* Convert SAVE_DUMMY_FRAME_TOS to multi-arch.Andrew Cagney2000-05-151-3/+2
|
* Convert REG_STRUCT_HAS_ADDR to multi-arch. Use REG_STRUCT_HAS_ADDR_PAndrew Cagney2000-04-221-66/+66
| | | | in conversion.
* * valops.c (hand_function_call): Replace #ifdef STACK_ALIGN withAndrew Cagney2000-04-211-20/+15
| | | | | | | run-time test for STACK_ALIGN_P. * gdbarch.sh: Add support for function and variable predicates. (STACK_ALIGN): Add. Implement with predicate - STACK_ALIGN_P. * gdbarch.h, gdbarch.c: Re-generate.
* * remote.c (REMOTE_TRANSLATE_XFER_ADDRESS), mem-break.cAndrew Cagney2000-04-171-12/+0
| | | | | | | | | | | | | | | | | | | | | | (MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT), target.h (BREAKPOINT_FROM_PC), valops.c (COERCE_FLOAT_TO_DOUBLE), gdbarch.sh (D10V_MAKE_DADDR, D10V_MAKE_IADDR, FRAMELESS_FUNCTION_INVOCATION, REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, REGISTER_NAME), findvar.c (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Delete default definition. Handled by gdbarch. * gdbarch.sh: Make multi-arch defaults, defaults for non- multi-arch targets. (REGISTER_NAME, COERCE_FLOAT_TO_DOUBLE, REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, D10V_MAKE_DADDR, D10V_MAKE_IADDR, BREAKPOINT_FROM_PC, MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT, REMOTE_TRANSLATE_XFER_ADDRESS, FRAMELESS_FUNCTION_INVOCATION): Provide default/legacy implementation. (REGISTER_NAMES, CALL_DUMMY): Allow legacy definition. * gdbarch.h, gdbarch.c: Re-generate.
* * gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two newJim Blandy2000-04-141-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions which architectures can redefine, defaulting to generic_pointer_to_address and generic_address_to_pointer. * findvar.c (extract_typed_address, store_typed_address, generic_pointer_to_address, generic_address_to_pointer): New functions. (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default definitions. (extract_address, store_address): Doc fixes. * values.c (value_as_pointer): Doc fix. (value_from_pointer): New function. * defs.h (extract_typed_address, store_typed_address): New declarations. * inferior.h (generic_address_to_pointer, generic_pointer_to_address): New declarations. * value.h (value_from_pointer): New declaration. * ax-gdb.c (const_var_ref): Use value_from_pointer, not value_from_longest. * blockframe.c (generic_push_dummy_frame): Use read_pc and read_sp, not read_register. * c-valprint.c (c_val_print): Use extract_typed_address instead of extract_address to extract vtable entries and references. * cp-valprint.c (cp_print_value_fields): Use value_from_pointer instead of value_from_longest to extract the vtable's address. * eval.c (evaluate_subexp_standard): Use value_from_pointer instead of value_from_longest to compute `this', and for doing pointer-to-member dereferencing. * findvar.c (read_register): Use extract_unsigned_integer, not extract_address. (read_var_value): Use store_typed_address instead of store_address for building label values. (locate_var_value): Use value_from_pointer instead of value_from_longest. * hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer, instead of value_from_longest, to build arguments to __d_shl_get. * printcmd.c (set_next_address): Use value_from_pointer, not value_from_longest. (x_command): Use value_from_pointer, not value_from_longest. * tracepoint.c (set_traceframe_context): Use value_from_pointer, not value_from_longest. * valarith.c (value_add, value_sub): Use value_from_pointer, not value_from_longest. * valops.c (find_function_in_inferior, value_coerce_array, value_coerce_function, value_addr, hand_function_call): Same. * value.h (COERCE_REF): Use unpack_pointer, not unpack_long. * values.c (unpack_long): Use extract_typed_address to produce addresses from pointers and references, not extract_address. (value_from_longest): Use store_typed_address instead of store_address to produce pointer and reference values.
* Compare VALUE_ADDRESS() return value with ZERO not NULL.Andrew Cagney2000-04-091-1/+1
|
* C++ changes for 5.0, finally committed.Daniel Berlin2000-04-041-114/+212
|
* From Daniel Berlin:Andrew Cagney2000-03-131-13/+59
| | | | Fix C++ overloading, add support for seeing through references.
* Revert: ``Fix C++ overload support, see through references''.Andrew Cagney2000-03-131-131/+89
| | | | Change also contained numerous white-space changes.
* Fix C++ overload support, see through referencesDaniel Berlin2000-03-101-89/+131
|
* 2000-02-23 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser2000-02-231-8/+50
| | | | | | * infcmd.c (run_stack_dummy): Do not pop frame on random signal. * valops.c (_initialize_valops): Add command "set unwindonsignal". (hand_function_call): Test for unwind_on_signal and act accordingly.
* Bring COERCE_FLOAT_TO_DOUBLE under gdbarch's control.Jim Blandy2000-02-221-10/+41
| | | | | | | | | | | | | | | | | | | * valops.c (COERCE_FLOAT_TO_DOUBLE): Rework definition to be more function-like. (default_coerce_float_to_double, standard_coerce_float_to_double): New functions. (value_arg_coerce): Adjust for new definition. * value.h (default_coerce_float_to_double, standard_coerce_float_to_double): New declarations for the above. * gdbarch.sh (coerce_float_to_double): New entry, replacing macro. * gdbarch.c, gdbarch.h: Regenerated. * tm-alpha.h, tm-fr30.h, tm-m32r.h, tm-mips.h, tm-hppa.h, tm-rs6000.h, tm-sh.h, tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Change definitions. * mips-tdep.c (mips_coerce_float_to_double): Supply our own custom function here. (mips_gdbarch_init): Install that as our coerce_float_to_double function.
* import gdb-2000-01-31 snapshotJason Molenda2000-02-011-2/+23
|
* import gdb-1999-12-06 snapshotJason Molenda1999-12-071-2/+2
|