Commit Graph

174 Commits

Author SHA1 Message Date
Andrew Cagney 7a424e9969 2002-12-03 Andrew Cagney <ac131313@redhat.com>
* frame.h (get_frame_id): Convert to a function.
	(null_frame_id, frame_id_p): Declare.
	(frame_id_eq, frame_id_inner): Declare.
	(frame_id_build): New function.
	* frame.c (get_frame_id): Update.  Use null_frame_id.
	(frame_find_by_id): Rewrite using frame_id_p, frame_id_eq and
	frame_id_inner.
	(null_frame_id, frame_id_p): Define.
	(frame_id_eq, frame_id_inner): Define.
	(frame_id_build): New function.
	* varobj.c (varobj_create): Update.
	(varobj_update): Update.
	* valops.c (value_assign): Update.
	(new_root_variable): Update.
	* infrun.c (save_inferior_status): Update.
	* breakpoint.c (watch_command_1): Update.
2002-12-04 00:05:54 +00:00
Andrew Cagney 6e7f8b9cba 2002-11-29 Andrew Cagney <ac131313@redhat.com>
* stack.c (selected_frame, select_frame): Move from here ...
	* frame.c (selected_frame, select_frame): ... to here.  Include
	"language.h".
	* Makefile.in (frame.o): Update dependencies.
	* frame.c (get_selected_frame): New function.
	* frame.h (get_selected_frame): Declare.
	(deprecated_selected_frame): Rename selected_frame.
	* ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update.
	* eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update.
	* h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update.
	* inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update.
	* mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update.
	* remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update.
	* stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update.
	* z8k-tdep.c, cli/cli-cmds.c: Update.

Index: mi/ChangeLog
2002-11-29  Andrew Cagney  <ac131313@redhat.com>

	* mi/mi-cmd-stack.c, mi/mi-main.c: Update to use
	deprecated_selected_frame.

Index: tui/ChangeLog
2002-11-29  Andrew Cagney  <ac131313@redhat.com>

	* tui/tui-hooks.c: Update to use deprecated_selected_frame.
	* tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
	* tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-11-29 19:15:16 +00:00
Andrew Cagney 07555a7286 2002-11-28 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Rename
	USE_GENERIC_DUMMY_FRAMES.
	* gdbarch.h, gdbarch.c: Regenerate.
	* valops.c, frame.c: Update.
	* config/z8k/tm-z8k.h, config/mn10200/tm-mn10200.h: Update.
	* config/m32r/tm-m32r.h, config/h8500/tm-h8500.h: Update.
	* config/pa/tm-hppa.h, blockframe.c: Update.
	* vax-tdep.c, sparc-tdep.c, ns32k-tdep.c: Ditto.
	* m68k-tdep.c, alpha-tdep.c: Ditto.

	* arm-tdep.c: Eliminate USE_GENERIC_DUMMY_FRAMES as always 1.
	* mips-tdep.c: Ditto.

Index: doc/ChangeLog
2002-11-28  Andrew Cagney  <ac131313@redhat.com>

	* gdbint.texinfo (Host Definition): Delete documentation on
	USE_GENERIC_DUMMY_FRAMES.
2002-11-28 21:38:44 +00:00
Andrew Cagney c193f6ac9c 2002-11-19 Andrew Cagney <ac131313@redhat.com>
* frame.h (FRAME_FP): Delete macro.
	(get_frame_base): New function declaration.
	* frame.c (get_frame_base): New function.
	(get_frame_id): Use ->frame.
	(frame_find_by_id): Rewrite to use get_frame_id.
	* blockframe.c: Use get_frame_base instead of FRAME_FP.
	* cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
	* hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
	* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
	* mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
	* sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
	* v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
2002-11-24 19:48:13 +00:00
Andreas Schwab 7a67d0fe2b * valops.c (value_slice): Move declaration of `offset' to avoid
warning.
2002-11-22 16:32:45 +00:00
Andrew Cagney 492254e9db 2002-11-06 Andrew Cagney <ac131313@redhat.com>
* valops.c (value_assign): Merge lval_register case into
	lval_reg_frame_relative.  Use frame_register and
	regcache_cooked_write instead of get_saved_register and
	write_register_bytes.  After flushing the register cache, try to
	re-select the selected frame.
2002-11-07 02:45:27 +00:00
Michael Snyder 2625d86c46 2002-10-23 Michael Snyder <msnyder@redhat.com>
* printcmd.c (address_info): Restore quotes in output.
	* valops.c (value_of_local): Restore quotes in error message.
2002-10-23 21:33:07 +00:00
Michael Snyder 19de93d0c6 2002-10-23 Michael Snyder <msnyder@redhat.com>
* valops.c (value_of_local): Restore quotes in error message.
2002-10-23 19:22:28 +00:00
Adam Fedor d069f99d46 valops.c (value_of_local): New function.
(value_of_this): Use it.
value.h (value_of_local): Declared.
2002-10-14 02:02:42 +00:00
Andrew Cagney 389e51db10 Revert previous change. Not obvious. 2002-09-19 03:58:41 +00:00
Michael Snyder 3b4efeaa2d 2002-09-18 Michael Snyder <msnyder@redhat.com>
Preliminary support for Objective-C:
	* defs.h (language_objc): New enum value.
	(puts_filtered_tabular): Declaration only, exported from utils.c.
	(skip_quoted): Delete, declared in completer.h.
	* c-exp.y: Include completer.h.
	* p-exp.y: Ditto.
	* jv-exp.y: Ditto.
	* expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING):
	New operator enum values.
	* language.h (CAST_IS_CONVERSION): Test for language_objc.
	* language.c (binop_result_type): Handle language_objc case.
	(integral_type, character_type, string_type, boolean_type,
	structured_type, binop_type_check): Ditto.
	* symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define.
	(struct objc_specific): Add to general_symbol_info.
	(SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization.
	(SYMBOL_DEMANGLED_NAME): Handle objc case.
	* parser-defs.h (struct objc_class_str): New struct type.
	(start_msglist, end_msglist, add_msglist): Declaration only,
	exported from objc-lang.c.
	* value.h (value_of_local, value_nsstring,
	call_function_by_hand_expecting_type): Exported from valops.c.
	* valops.c (find_function_addr): Export.
	(call_function_by_hand_expecting_type): New function.
	(value_of_local): New function.
	* symfile.c (init_filename_language_table): Add ".m" extension
	for Objective-C.
	* utils.c (puts_filtered_tabular): New function.
	(fprintf_symbol_filtered): Add objc demangling support (disabled).
	(set/show demangle): Extend help-string to refer to ObjC.
	* elfread.c (elf_symtab_read): Skip Objective-C special symbols.
	* stabsread.c (symbol_reference_defined): Objective-C symbols
	may contain colons: make allowances when scanning stabs strings
	for colons.
	(objc_find_colon): New function.
	* printcmd.c (address_info): If language == objc then print
	"self" instead of "this".
	* parse.c (length_of_subexp): Handle new operators OP_MSGCALL,
	OP_NSSTRING, and OP_SELF.
	(prefixify_subexp): Ditto.
	* source.c (print_source_lines): Mention objc in comment.
	* breakpoint.c (parse_breakpoint_sals): Recognize Objective-C
	method names.
2002-09-19 01:34:51 +00:00
Andrew Cagney dc60453953 2002-09-18 Andrew Cagney <ac131313@redhat.com>
* valops.c (hand_function_call): Align the initial stack pointer
	and STRUCT_ADDR using frame_align.  When STRUCT_RETURN and
	FRAME_ALIGN_P, use STRUCT_ADDR to obtain the called function's
	return value.
	* mips-tdep.c (mips_frame_align): New function.
	(mips_gdbarch_init): Set frame_align.
	* gdbarch.sh (FRAME_ALIGN): New method.
	* gdbarch.h, gdbarch.c: Re-generate.
2002-09-18 15:37:18 +00:00
Daniel Jacobowitz de17c821b3 * gdbtypes.c (check_stub_method): Make static.
(check_stub_method_group): New function.
        * gdbtypes.h: Update prototypes.
        * cp-support.c: New file.
        * cp-support.h: New file.

        * stabsread.c: Include "cp-abi.h" and "cp-support.h".
        (update_method_name_from_physname): New function.
        (read_member_functions): Correct method names for operators
        and v3 constructors/destructors.  Separate v2 constructors and
        destructors.
        * Makefile.in (stabsread.o): Update dependencies.
        (SFILES): Add cp-support.c.
        (COMMON_OBS): Add cp-support.o.
        (cp_support_h, cp-support.o): Add.

        * cp-valprint.c (cp_print_class_method): Call
        check_stub_method_group instead of check_stub_method.  Remove
        extraneous QUITs.
        * p-valprint.c (pascal_object_print_class_method): Likewise.
        * valops.c (search_struct_method): Likewise.
        (find_method_list, value_struct_elt_for_reference): Likewise.
2002-09-14 02:09:39 +00:00
Joel Brobecker 5720643ce8 * gdbarch.sh (NAME_OF_MALLOC): New variable in the architecture
vector. Will be useful for Interix.
       * gdbarch.h, gdbarch.c: Regenerate.

       * valops.c (value_allocate_space_in_inferior): Replace hard-coded
       name of the malloc function by NAME_OF_MALLOC.
2002-09-13 00:38:48 +00:00
Joel Brobecker 3bada2a2df * value.h (find_function_in_inferior): Add const keyword to
one of the parameters. Allows us to invoke this function with
       a const char *.
       * valops.c (find_function_in_inferior): Likewise.
2002-09-13 00:18:33 +00:00
Jim Blandy d174216d52 * valops.c (value_cast): Simplify and correct logic for doing a
static cast from a pointer to a base class to a pointer to a
derived class.
2002-08-21 17:24:31 +00:00
Keith Seitz e23792ccb6 * gdb-events.sh: Add target-changed event.
* gdb-events.c: Regenerated.
        * gdb-events.c: Regenerated.
        * valops.c (value_assign): Add target-changed event notification
        to inlval_register, lval_memory, and lval_reg_frame_relative.
2002-08-21 15:34:36 +00:00
David Carlton 2c2738a0e0 2002-08-19 David Carlton <carlton@math.stanford.edu>
* valops.c (search_struct_field): Change error message to treat
	return value of 0 from value_static_field as meaning that field is
	optimized out.
	(value_struct_elt_for_reference): Ditto.
	* values.c (value_static_field): Treat an unresolved location the
	same as a nonexistent symbol.  Fix PR gdb/635.
2002-08-19 23:19:53 +00:00
Andrew Cagney db034ac512 2002-08-01 Andrew Cagney <cagney@redhat.com>
* NEWS: Menion that CHILL has been made obsolete.

* gdbtypes.c (chill_varying_type): Make chill references obsolete.
* gdbserver/Makefile.in: Ditto.
* stabsread.c (read_range_type): Ditto.
* gdbtypes.h: Ditto.
* language.c (binop_type_check): Ditto.
(binop_result_type): Ditto.
(integral_type): Ditto.
(character_type): Ditto.
(string_type): Ditto.
(boolean_type): Ditto.
(structured_type): Ditto.
(lang_bool_type): Ditto.
(binop_type_check): Ditto.
* language.h (_LANG_chill): Ditto.
* dwarfread.c (set_cu_language): Ditto.
* dwarfread.c (CHILL_PRODUCER): Ditto.
* dwarfread.c (handle_producer): Ditto.
* expression.h (enum exp_opcode): Ditto.
* eval.c: Ditto for comments.
* typeprint.c (typedef_print) [_LANG_chill]: Ditto.
* expprint.c (print_subexp): Ditto.
(print_subexp): Ditto.
* valops.c (value_cast): Ditto.
(search_struct_field): Ditto.
* value.h (COERCE_VARYING_ARRAY): Ditto.
* symfile.c (init_filename_language_table): Ditto.
(add_psymbol_with_dem_name_to_list): Ditto.
* valarith.c (value_binop): Ditto.
(value_neg): Ditto.
* valops.c (value_slice): Ditto.
* symtab.h (union language_specific): Ditto.
(SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
(SYMBOL_DEMANGLED_NAME): Ditto.
(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
* defs.h (enum language): Ditto.
* symtab.c (got_symtab): Ditto.
* utils.c (fprintf_symbol_filtered): Ditto.

* ch-typeprint.c: Make file obsolete.
* ch-valprint.c: Make file obsolete.
* ch-lang.h: Make file obsolete.
* ch-exp.c: Make file obsolete.
* ch-lang.c: Make file obsolete.

* Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
CHILL_LIB.
(TARGET_FLAGS_TO_PASS): Ditto.
(CHILLFLAGS): Obsolete.
(CHILL): Obsolete.
(CHILL_FOR_TARGET): Obsolete.
(CHILL_LIB): Obsolete.
(SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
ch-valprint.c.
(HFILES_NO_SRCDIR): Remove ch-lang.h.
(COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
ch-lang.o.
(ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
targets.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references
to CHILL.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* Makefile.in (TARGET_FLAGS_TO_PASS): Remove CHILLFLAGS, CHILL,
CHILL_FOR_TARGET and CHILL_LIB.
* configure.in (configdirs): Remove gdb.chill.
* configure: Regenerate.
* lib/gdb.exp: Obsolete references to chill.
* gdb.fortran/types.exp: Ditto.
* gdb.fortran/exprs.exp: Ditto.
2002-08-01 17:18:35 +00:00
Daniel Jacobowitz 295401f78c 2002-07-12 Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
* valops.c (find_method_list): Remove comment about
        removed STATIC_MEMFUNCP argument.
        (value_find_oload_method_list): Likewise.
2002-07-12 19:15:30 +00:00
Daniel Jacobowitz 02f0d45d87 2002-07-10 Daniel Jacobowitz <drow@mvista.com>
* valops.c (find_overload_match): Free oload_syms.
2002-07-10 17:18:16 +00:00
Andrew Cagney 36160dc4b2 * infcmd.c (print_return_value): Remove compatibility code calling
deprecated_grub_regcache_for_registers.

* values.c: Include "regcache.h".
(value_being_returned): Update.  Use
deprecated_grub_regcache_for_registers to extract the register
buffer address.
* value.h (value_being_returned): Change ``retbuf'' parameter to a
``struct regcache''.
* Makefile.in (values.o): Add dependency on $(regcache_h).

* inferior.h (run_stack_dummy): Change type of second parameter to
a ``struct regcache''.
* valops.c (hand_function_call): Change type of retbuf to ``struct
regcache''.  Allocate using regcache_xmalloc, clean using
make_cleanup_regcache_xfree.
* infcmd.c (run_stack_dummy): Update.  Use
regcache_cpu_no_passthrough instead of memcpy to copy the buffer.

* regcache.c (do_regcache_xfree): New function.
(make_cleanup_regcache_xfree): New function.
* regcache.h (make_cleanup_regcache_xfree): Declare.
2002-07-03 20:36:54 +00:00
Andrew Cagney 26e6c56a66 * valops.c (hand_function_call): Move declaration of retbuf to
start of function, allocate using malloc, add a cleanup but before
the inf_status cleanup, cleanup the buffer.  Rename local variable
old_chain to inf_status_cleanup.
2002-07-03 18:31:29 +00:00
Don Howard 56468235ec 2002-06-18 Don Howard <dhoward@redhat.com>
* valops.c (value_ind): Use value_at_lazy() when dereferencing
        type int expressions.  Thanks to Jim Blandy <jimb@redhat.com> for
        suggesting this solution.
2002-06-18 23:41:02 +00:00
Daniel Jacobowitz ad2f7632f9 2002-06-14 Daniel Jacobowitz <drow@mvista.com>
* gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
        (struct main_type): Remove arg_types member.  Update comments for
        struct field.
        (TYPE_ARG_TYPES): Remove.
        (TYPE_FN_FIELD_ARGS): Update.
        (smash_to_method_type): Update prototype.

        * c-typeprint.c (cp_type_print_method_args): Take method type
        instead of argument list.  Use new argument layout.  Simplify.
        (c_type_print_args): Use new argument layout.  Simplify.
        (c_type_print_base): Update call to cp_type_print_method_args.
        * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
        argument; use die->type instead.  Update call to
        smash_to_method_type.
        (read_structure_scope): Update call to dwarf2_add_member_fn.
        * gdbtypes.c (allocate_stub_method): Update comment.
        (smash_to_method_type): Take new NARGS and VARARGS arguments.
        Use new argument layout.
        (check_stub_method): Use new argument layout.  Don't count
        void as an argument.
        (print_arg_types): Update comments.  Use new argument layout.
        (recursive_dump_type): Don't print arg_types member.
        * hpread.c (hpread_read_struct_type): Use new argument layout.
        (fixup_class_method_type): Likewise.
        (hpread_type_lookup): Likewise.
        * stabsread.c (read_type): Update calls to read_args and
        smash_to_method_type.
        (read_args): Use new argument layout.  Simplify.
        * valops.c (typecmp): Use new argument layout.  Update parameters
        and comments.  Simplify.
        (hand_function_call): Use new argument layout.
        (search_struct_method): Update call to typecmp.
        (find_overload_match): Use new argument layout.
2002-06-14 14:34:26 +00:00
Daniel Jacobowitz 0004e5a2cf 2002-05-13 Daniel Jacobowitz <drow@mvista.com>
* ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary)
        (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref)
        (gen_address_of, gen_struct_ref, gen_repeat): Use type
        access macros.
        * c-typeprint.c (cp_type_print_method_args): Likewise.
        (c_type_print_args): Likewise.
        * d10v-tdep.c (d10v_push_arguments): Likewise.
        (d10v_extract_return_value): Likewise.
        * expprint.c (print_subexp): Likewise.
        * gdbtypes.c (lookup_primitive_typename): Likewise.
        (lookup_template_type, add_mangled_type, print_arg_types): Likewise.
        * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB)
        (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE)
        (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS)
        (TYPE_VECTOR): Likewise.
        * hpread.c (hpread_read_struct_type)
        (fix_static_member_physnames, fixup_class_method_type)
        (hpread_type_lookup): Likewise.
        * mdebugread.c (parse_symbol, parse_type): Likewise.
        * p-lang.c (is_pascal_string_type): Likewise.
        * valops.c (hand_function_call): Likewise.
        * x86-64-tdep.c (classify_argument): Likewise.

        * hpread.c (hpread_read_function_type)
        (hpread_read_doc_function_type): Call replace_type.
        * dstread.c (create_new_type): Delete.
        (decode_dst_structure, process_dst_function): Call alloc_type.
        Use type access macros.
2002-05-13 14:00:36 +00:00
Andrew Cagney 13d0122493 * arch-utils.h (legacy_register_to_value): Declare.
(legacy_value_to_register): Declare.
(legacy_convert_register_p): Declare.
* arch-utils.c (legacy_register_to_value): New function.
(legacy_value_to_register): New function.
(legacy_convert_register_p): New function.

* gdbarch.sh (REGISTER_TO_VALUE): Define.
(VALUE_TO_REGISTER): Define.
(CONVERT_REGISTER_P): Define.
* gdbarch.h, gdbarch.c: Regenerate.

* valops.c (value_assign): Use CONVERT_REGISTER_P and
VALUE_TO_REGISTER.
* findvar.c (value_from_register): Use REGISTER_TO_VALUE and
CONVERT_REGISTER_P.

* gdbint.texinfo (Target Architecture Definition): Document
REGISTER_TO_VALUE and VALUE_TO_REGISTER and CONVERT_REGISTER_P.
(Target Architecture Definition): Revise section `Using Different
Register and Memory Data Representations'.  Add section `Raw and
Virtual Register Representations'.
2002-05-12 03:09:12 +00:00
Daniel Jacobowitz 4a1970e4a4 2005-05-11 Daniel Jacobowitz <drow@mvista.com>
Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>

        * Makefile.in: Update dependencies for valops.c.
        * valops.c: Include "gdb_assert.h".
        (typecmp): Skip THIS parameter to methods.
        (find_method_list): Remove static_memfuncp argument,
        update callers.  Check for stub methods.
        (find_value_oload_method_list): Don't set *static_memfuncp.
        (find_overload_match): Don't check for stub methods.  Assert
        that methods are not stubbed.  Handle static methods.
        (value_find_oload_method_list): Remove static_memfuncp argument.
        * gdbtypes.c (check_stub_method): Do not add THIS pointer
        to the argument list for static stub methods.
        * value.h (value_find_oload_method_list): Update prototype.
2002-05-12 02:20:38 +00:00
Elena Zannoni a3162708df 2002-05-02 Elena Zannoni <ezannoni@redhat.com>
* valops.c (value_arg_coerce): Don't coerce arrays to pointers if
	we are dealing with vectors.
2002-05-02 19:00:36 +00:00
Andrew Cagney 6096c27ac0 * valops.c (hand_function_call): Call
generic_save_call_dummy_addr.
* frame.h (generic_save_call_dummy_addr): Declare.
* blockframe.c (struct dummy_frame): Add fields call_lo and
call_hi.
(generic_find_dummy_frame): Check for PC in range call_lo to
call_hi instead of entry_point_address.
(generic_pc_in_call_dummy): Search the dummy frames for a PC in
the call_lo to call_hi range.  Allow for DECR_PC_AFTER_BREAK.
(generic_save_call_dummy_addr): New function.
2002-04-26 03:37:42 +00:00
Jason Thorpe baa6f10b32 * findvar.c (extract_signed_integer): Cast printf argument
to suppress format warning.
(extract_unsigned_integer): Likewise.
* infcmd.c (registers_info): Likewise.
* top.c (get_prompt_1): Likewise.
* valops.c (value_assign): Likewise.
* valprint.c (print_decimal): Likewise.
2002-04-23 03:00:57 +00:00
Daniel Jacobowitz 3121eff097 2002-03-22 Daniel Jacobowitz <drow@mvista.com>
* symtab.h (lookup_block_symbol): Add mangled_name argument
        to prototype.

        * symmisc.c (maintenance_check_symtabs): Call lookup_block_symbol
        with new mangled_name argument.
        * linespec.c (decode_line_1): Likewise.
        * valops (value_of_this): Likewise.
        * symtab.c (lookup_transparent_type): Likewise.
        (lookup_symbol_aux): Likewise.  Accept new mangled_name argument.
        (lookup_symbol): If we are given a mangled name, pass it down
        to lookup_symbol_aux.
        (lookup_block_symbol): If we are given a mangled name to check
        against, only return symbols which match it.
2002-03-22 18:57:08 +00:00
Daniel Jacobowitz 491b894671 2002-02-16 Daniel Jacobowitz <drow@mvista.com>
* valarith.c (value_x_unop): Fix decrement; support post-decrement.

2002-02-16  Daniel Jacobowitz  <drow@mvista.com>

        From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>:
        * valops.c (value_arg_coerce): Don't take the address of a reference
        to convert an argument to a reference.
2002-02-16 22:25:50 +00:00
Andrew Cagney c203844d97 * valops.c (PUSH_ARGUMENTS): Delete definition.
* gdbarch.sh (PUSH_ARGUMENTS): Don't require when multi-arch
partial.  Default to default_push_arguments.
* gdbarch.h, gdbarch.c: Regenerate.
2002-02-10 05:50:34 +00:00
Daniel Jacobowitz acf5ed49a0 2002-02-03 Daniel Jacobowitz <drow@mvista.com>
* c-valprint.c (c_val_print): Pass a proper valaddr to
        cp_print_class_method.
        * valops.c (search_struct_method): If there is only one method
        and args is NULL, return that method.
2002-02-04 02:14:46 +00:00
Michael Snyder 34c0bd933d 2002-01-07 Michael Snyder <msnyder@redhat.com>
* 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.
2002-01-08 02:09:31 +00:00
Mark Kettenis 290b2c7ad8 * valops.c (value_arg_coerce): Fix formatting. 2002-01-06 22:09:08 +00:00
Andrew Cagney d7449b42d3 s/BIG_ENDIAN/BFD_ENDIAN_BIG/ 2002-01-05 04:30:46 +00:00
Daniel Jacobowitz 7f8c928258 2002-01-04 Daniel Jacobowitz <drow@mvista.com>
* 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.
2002-01-04 17:51:38 +00:00
Andrew Cagney f23631e444 s/value_ptr/struct value */ 2002-01-04 05:20:09 +00:00
Fred Fish 74a9bb82c5 Approved by Jim Blandy:
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.
2001-12-12 02:11:52 +00:00
Daniel Jacobowitz 2abae2c765 Undo accidental commit of a separate patch. 2001-12-07 22:16:43 +00:00
Daniel Jacobowitz 76b2e19d24 * valops.c (hand_function_call): Check for method arguments in
TYPE_ARG_TYPES(), not in TYPE_FIELD ().
2001-12-07 22:14:30 +00:00
Jim Blandy 641225a400 * valops.c (default_coerce_float_to_double,
standard_coerce_float_to_double): Doc fixes.
2001-11-13 16:44:13 +00:00
Andrew Cagney 69a0d5f4fa Add predicate for PUSH_RETURN_ADDRESS. 2001-11-06 18:06:00 +00:00
Andrew Cagney 1aa20aa88f * value.h (value_as_address): Rename value_as_pointer.
* 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.
2001-10-16 01:58:07 +00:00
Jim Blandy 75af7f6801 Clean up the D10V port so that GDB and the target program no
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.
2001-07-10 21:24:48 +00:00
Jim Blandy 2bf1f4a12e * valops.c (value_cast): When casting a pointer to an integer,
don't convert it to an address.
2001-07-10 21:15:28 +00:00
Daniel Berlin 2b12787743 2001-05-07 Daniel Berlin <dan@cgsoftware.com>
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.
2001-05-19 15:20:14 +00:00
Jim Blandy 015a42b4cf (Changes from Daniel Berlin, with revisions by Jim Blandy.)
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).
2001-04-27 00:19:09 +00:00