Commit Graph

87 Commits

Author SHA1 Message Date
David Lecomber cd859a2010 Change array element access to something similar to way C works.
The old method would drag in the entire array, then look for the
single element.  This method just gets the right element out instead.
Saves memory, and saves a crash for array with (*) as one of the
dimensions when it would previously have allocated (unsigned int) -1 bytes.
2003-09-09 16:51:54 +00:00
Andrew Cagney eb8bc28217 2003-07-07 Andrew Cagney <cagney@redhat.com>
* expprint.c: Include "user-regs.h" instead of "frame.h".
	(print_subexp): Use user_reg_map_regnum_to_name, instead of
	frame_map_regnum_to_name.
	* frame.c: Include "user-regs.h" instead of "builtin-regs.h".
	(frame_map_name_to_regnum): Simplify, call
	user_reg_map_name_to_regnum.
	(frame_map_regnum_to_name): Simplify, call
	user_reg_map_regnum_to_name.
	(frame_register_unwind): Update.
	* std-regs.c: Include "user-regs.h" instead of "builtin-regs.h".
	(_initialize_frame_reg): Call user_reg_add_builtin.
	* findvar.c: Include "user-regs.h" instead of "builtin-regs.h".
	(value_of_register): Use value_of_user_reg.
	* eval.c (evaluate_subexp_standard): Update.
	* parse.c (write_dollar_variable): Update.
	* d10v-tdep.c (d10v_print_registers_info): Update.
	* infcmd.c (registers_info): Update.
	* Makefile.in (SFILES): Delete "builtin-regs.c", add "user-regs.c".
	(builtin_regs_h): Delete macro.
	(user_regs_h): Define.
	(COMMON_OBS): Delete "builtin-regs.o", add "user-regs.o".
	(builtin-regs.o): Delete target.
	(user-regs.o): Specify dependencies.
	(expprint.o): Update dependencies.
	(findvar.o): Update dependencies.
	(frame.o): Update dependencies.
	(std-regs.o): Update dependencies.
2003-07-07 14:36:58 +00:00
Adam Fedor a9fa03de24 * eval.c (evaluate_subexp_standard): Handle ObjC ops.
* infcall.c (find_function_addr): Make non-static.
* infcall.h (find_function_addr): Declare.
* Makefile.in (eval.o): Update dependencies.
2003-04-30 01:27:53 +00:00
Andrew Cagney 04714b914f 2003-04-21 Andrew Cagney <cagney@redhat.com>
* infcall.c: New file.
	* infcall.h: New file.
	* valarith.c: Include "infcall.h".
	* scm-lang.c, objc-lang.cm, hppa-tdep.c, gcore.c: Ditto.
	* eval.c, ada-valprint.c, ada-lang.c: Ditto.
	* Makefile.in (valarith.o, scm-lang.o): Update dependencies.
	(objc-lang.o, hppa-tdep.o, gcore.o): Update dependencies.
	(eval.o, ada-valprint.o, ada-lang.o): Update dependencies.
	(SFILES): Add "infcall.c"
	(COMMON_OBS): Add "infcall.o".
	(infcall.o): Specify dependencies.
	* value.h (call_function_by_hand): Delete declaration.
	* inferior.h (run_stack_dummy): Delete declaration.
	* infcmd.c (breakpoint_auto_delete_contents): Move to "infcall.c".
	(run_stack_dummy): Move to "infcall.c", merged into
	call_function_by_hand.
	* valops.c (call_function_by_hand): Moved to "infcall.c".
	(find_function_addr, value_arg_coerce): Ditto.
	(unwindonsignal_p, coerce_float_to_double): Ditto.
	(_initialize_valops): Move "set/show coerce-float-to-double", and
	"set/show unwindonsignal" commands to "infcall.c".
	* v850-tdep.c, target.h: Update comments.
	* sparc-tdep.c (sparc_fix_call_dummy): Update comments.
	* sh-tdep.c (sh_init_extra_frame_info): Update comments.
	(sh64_init_extra_frame_info): Update comments.
	* mn10300-tdep.c: Update comments.
	* mcore-tdep.c (mcore_init_extra_frame_info): Update comments.
	* config/sparc/tm-sparc.h: Update comments.
	* breakpoint.h: Update comments.
	* avr-tdep.c (avr_init_extra_frame_info): Update comments.
	* arm-tdep.c: Update comment.
2003-04-21 16:48:41 +00:00
Andrew Cagney 0a1e1ca1f6 2003-03-12 Andrew Cagney <cagney@redhat.com>
* frame.c (get_current_frame): Check target_has_registers before
	checking target_has_stack.
	* eval.c (evaluate_subexp_standard): Use get_selected_frame,
	instead of deprecated_selected_frame.
	* findvar.c (value_of_register): Pass "frame", not
	deprecated_selected_frame, to value_of_builtin_reg.
2003-03-12 22:39:16 +00:00
Andrew Cagney 1bac305b72 2003-01-13 Andrew Cagney <ac131313@redhat.com>
* ax-gdb.c, c-valprint.c, charset.c, corefile.c: Update copyright.
	* demangle.c, disasm.c, dwarf2cfi.c, dwarfread.c: Update copyright.
	* elfread.c, eval.c, expprint.c, expression.h: Update copyright.
	* f-typeprint.c, findvar.c, gcore.c, gdb_mbuild.sh: Update copyright.
	* gdbtypes.h, gnu-v2-abi.c, inferior.h, inftarg.c: Update copyright.
	* language.c, language.h, m32r-tdep.c: Update copyright.
	* mn10200-tdep.c, scm-lang.c, scm-lang.h: Update copyright.
	* somsolib.c, somsolib.h, symfile.c, symtab.h: Update copyright.
	* thread-db.c, typeprint.c, utils.c, valarith.c: Update copyright.
	* values.c, win32-nat.c, x86-64-linux-nat.c: Update copyright.
	* x86-64-linux-tdep.c, z8k-tdep.c: Update copyright.
	* cli/cli-decode.h, config/h8500/tm-h8500.h: Update copyright.

Index: mi/ChangeLog
2003-01-13  Andrew Cagney  <ac131313@redhat.com>

	* mi-cmd-env.c: Update copyright.
2003-01-14 00:49:06 +00:00
Andrew Cagney 1b831c9308 2003-01-02 Andrew Cagney <ac131313@redhat.com>
* valarith.c (value_binop): Delete obsolete code and comments.
	* configure.host: Ditto.
	* buildsym.h (make_blockvector): Ditto.
	* buildsym.c (make_blockvector): Ditto.
	* defs.h (enum language): Ditto.
	(chill_demangle): Ditto.
	* elfread.c (elf_symtab_read): Ditto.
	* dwarfread.c (CHILL_PRODUCER): Ditto.
	(set_cu_language): Ditto.
	(handle_producer): Ditto.
	* expprint.c (print_subexp): Ditto.
	* gdbtypes.c (chill_varying_type): Ditto.
	* gdbtypes.h (builtin_type_chill_bool): Ditto.
	(builtin_type_chill_char, builtin_type_chill_long): Ditto.
	(builtin_type_chill_ulong, builtin_type_chill_real): Ditto.
	(chill_varying_type): Ditto.
	* language.h (_LANG_chill): Ditto.
	* language.c (binop_result_type, integral_type): Ditto.
	(character_type, string_type, structured_type): Ditto.
	(lang_bool_type, binop_type_check): Ditto.
	* stabsread.h (os9k_stabs): Ditto.
	* stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto.
	(define_symbol, read_type, read_struct_fields): Ditto.
	(read_array_type, read_enum_type, read_huge_number): Ditto.
	(read_range_type, start_stabs): Ditto.
	* symfile.c (init_filename_language_table): Ditto.
	(add_psymbol_with_dem_name_to_list): Ditto.
	* symtab.c (symbol_init_language_specific): Ditto.
	(symbol_init_demangled_name, symbol_demangled_name): Ditto.
	* symtab.h (struct general_symbol_info): Ditto.
	(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
	* typeprint.c (typedef_print): Ditto.
	* utils.c (fprintf_symbol_filtered): Ditto.
	* valops.c (value_cast, search_struct_field, value_slice): Delete
	obsolete code.
	(varying_to_slice): Delete function.
	* value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents.
	(varying_to_slice): Delete declaration.
	* MAINTAINERS: Update.
2003-01-02 14:27:27 +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 e36180d795 2002-09-25 Andrew Cagney <cagney@redhat.com>
* frame.c: Include "gdb_string.h" and "builtin-regs.h".
	(frame_map_regnum_to_name): New function.
	(frame_map_name_to_regnum): New function.
	* frame.h (frame_map_name_to_regnum): Declare.
	(frame_map_regnum_to_name): Declare.
	* builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
	* builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
	* parse.c: Do not include "builtin-regs.h".
	(target_map_name_to_register): Delete function.
	(write_dollar_variable): Use frame_map_name_to_regnum.
	* parser-defs.h (target_map_name_to_register): Delete declaration.
	* expprint.c: Include "frame.h".
	(print_subexp): Use frame_map_regnum_to_name.
	* eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
	* infcmd.c (registers_info): Use frame_map_name_to_regnum.

2002-09-25  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/pc-fp.exp, gdb.base/pc-fp.c: New test.
2002-09-25 20:30:38 +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
Michael Snyder 62995fc4a5 2002-04-12 Michael Snyder <msnyder@redhat.com>
* eval.c: Indentation fix-ups.
2002-04-12 22:54:17 +00:00
Peter Schauer 9b013045b0 * eval.c (evaluate_subexp_standard): Fix setup of ``this'' pointer
for method resolution.  Restore adjustment of ``this'' pointer after
	calling value_struct_elt, which was accidentally removed during the
	HP merge.
2002-03-16 20:51:44 +00:00
Andrew Cagney 376c960019 * eval.c (evaluate_subexp_standard): Pass ``selected_frame'' to
value_of_register.
* findvar.c (value_of_register): Add ``frame'' parameter.  Pass to
get_saved_register.
* value.h (value_of_register): Update.
2002-03-16 02:57:42 +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 f976f6d464 * cli/cli-script.c (execute_control_command): Replace value_ptr
with a struct value pointer.
* ch-lang.c (evaluate_subexp_chill): Ditto.
* printcmd.c (printf_command): Ditto.
* tracepoint.c (set_traceframe_context): Ditto.
(encode_actions): Ditto.
* eval.c (evaluate_subexp_standard): Ditto.
2001-12-25 22:24:39 +00:00
Fred Fish 0478d61cc2 Approved by Jim Blandy:
2001-12-10  Fred Fish  <fnf@redhat.com>
	* values.c (value_fn_field): Add physname variable.  Use a minimal
	symbol if we don't find a full symbol.  Remove setting of the new
	value's type since that was already done by allocate_value().
	Remove obsolete commented out error call since callees need to
	handle a NULL return, which is possible result not an error.
	* eval.c (evaluate_subexp_standard): Move check for inlined
	functions to precede attempt to dereference a NULL argvec[0].
2001-12-10 23:05:00 +00:00
Jim Blandy c263635274 Patch from Andreas Schwab <schwab@suse.de>:
* eval.c (evaluate_subexp_standard): Fix memory leak: use alloca
instead of xmalloc.
2001-11-12 21:20:18 +00:00
Andrew Cagney 610510309f s/value_ptr/struct value */ 2001-11-10 20:15:13 +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 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
Andrew Cagney cf4eee44fd Zap __STDC__ references. 2001-03-19 23:31:41 +00:00
J.T. Conklin 5565b5569b 2001-03-06 J.T. Conklin <jtc@redback.com>
* symtab.h (decode_line_1): Removed declaration.

        * symfile.c (#include <assert.h>): Removed.

        * arch-utils.c (#include <ctype.h>): Removed.
        * c-typeprint.c: Likewise.
        * dbxread.c: Likewise.
        * gdbtypes.c: Likewise.
        * target.c: Likewise.
        * os9kread.c: Likewise.

        * c-valprint.c (#include "demangle.h"): Removed.
        * ch-typeprint.c: Likewise.
        * eval.c: Likewise.
        * f-typeprint.c: Likewise.
        * f-valprint.c: Likewise.
        * m2-typeprint.c: Likewise.
        * typeprint.c: Likewise.
        * p-typeprint.c: Likewise.
        * valarith.c: Likewise.
        * valprint.c: Likewise.

        * m2-typeprint.c (#include "gdb_string.h"): Removed.
        * nlmread.c: Likewise.

        * mdebugread.c (#include "gdb-stabs.h"): Removed.
        * minsyms.c: Likewise.
        * mipsread.c: Likewise.
        * nlmread.c: Likewise.

        * m2-typeprint.c (#include "obstack.h"): Removed.
        * m2-valprint.c: Likewise.

        * event-loop.c (#include <setjmp.h>): Removed.
2001-03-07 02:57:08 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
David Taylor bb518678ac * eval.c (parse_and_eval_long): New function.
* value.h: Declare it.

	* breakpoint.c (breakpoints_info, maintenance_info_breakpoints):
	Call parse_and_eval_long, not parse_and_eval_address.
	* command.c (do_setshow_command): Ditto.
	* infcmd.c (step_1, signal_command, continue_command): Ditto.
	* infrun.c (signals_info): Ditto.
	* stack.c (set_backtrace_limit_command, backtrace_command_1,
	up_silently_base, down_silently_base): Ditto.
	* tracepoints.c (tracepoints_info, trace_find_command,
 	trace_find_tracepoint_command): Ditto.
	* valprint.c (set_radix): Ditto.
	* values.c (show_values): Ditto.
2000-10-30 15:32:51 +00:00
David Anderson 67e469d175 Correct spelling in comment: tupes -> tuples. 2000-09-01 23:50:17 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Philippe De Muyter c13c43fdda * ax-gdb.c (agent_command): Remove now useless cast of
`free_current_contents' when passed to `make_cleanup'.
	* coffread.c (coff_symfile_read): Ditto.
	* dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto.
	(dwarf_decode_lines): Ditto.
	* eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto.
	(parse_and_eval, parse_to_comma_and_eval): Ditto.
	* parse.c (parse_exp_1): Ditto.
	* printcmd.c (print_command_1, output_command, set_command): Ditto.
	(x_command, print_frame_args, printf_command): Ditto.
	* top.c (execute_control_command): Ditto.
	* tracepoint.c (validate_actionline): Ditto.
	* typeprint.c (whatis_exp, ptype_command): Ditto.
	(maintenance_print_type): Ditto.
2000-04-26 12:41:48 +00:00
Jim Blandy 4478b372e9 * gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two new
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.
2000-04-14 18:43:41 +00:00
Daniel Berlin 070ad9f02e C++ changes for 5.0, finally committed. 2000-04-04 04:53:50 +00:00
Elena Zannoni 751a959bb8 2000-03-14 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* eval.c (evaluate_subexp_with_coercion): Add call to
 	check_typedef, to handle typedeffed vars correctly.

	* gdb.base/printcmds.c: Add typedeffed arrays.

	* gdb.base/printcmds.exp (test_print_typedef_arrays): New
 	procedure to test arrays that are typedef'd.
2000-03-14 17:01:05 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 2df3850c7b import gdb-1999-10-11 snapshot 1999-10-12 04:37:53 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Peter Schauer 27f1958c24 start-sanitize-gdbtk
* gdbtk.c (gdb_get_breakpoint_info):  Add string for new
	enumeration del_at_next_stop to bpdisp array.

end-sanitize-gdbtk
	* eval.c (evaluate_subexp_for_sizeof):  Handle dereferencing
	of non-pointer values.

	* symtab.c (gdb_mangle_name):  Improve mangling of nested types,
	their physical names already include the class name.

	* valops.c (value_cast):  Handle upcast of a class pointer.

	From Andreas Schwab (schwab@issan.informatik.uni-dortmund.de):
	* corelow.c (get_core_registers):  Make secname big enough.
1997-06-07 09:38:31 +00:00
Wilfried Moser b5865bb263 * ch-exp.c (parse_tuple_element): Allow (*): for array tuples
if we have a type.

        * eval.c (evaluate_subexp_standard): In case of OP_ARRAY:
        check number of args against bounds of array to avoid
        memory corruption.

        * value.h (COERCE_REF): Do a CHECK_TYPEDEF in case we get
        a TYPE_CODE_TYPEDEF.
1996-09-04 14:29:37 +00:00
Wilfried Moser a539f6d8b9 * eval.c (evaluate_subexp_standard): In case of TYPE_CODE_SET:
Add some checks for powerset compatibility.

        * valops.c (value_slice): Use lowbound instead of lowerbound for
        call to slice_range_type to get correct bounds.
1996-04-09 08:28:50 +00:00
Fred Fish b52cac6b76 * core-aout.c (fetch_core_registers): Cast core_reg_size to int
before testing against reg_ptr.
	* eval.c (evaluate_subexp_standard): Cast type of
	TYPE_FN_FIELD_VOFFSET to int.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer): Cast type of sizeof to int.
	* values.c (unpack_field_as_long, modify_field): Ditto.
	* valops.c (value_assign, call_function_by_hand): Ditto.
	* infcmd.c (do_registers_info): Ditto.
	* ser-tcp.c (tcp_open): Ditto
	* remote.c (putpkt): Ditto.
	* dcache.c (dcache_peek): Ditto.
	* dcache.c (dcache_poke): Ditto.
	* m2-exp.y (yylex): Ditto.
	* gnu-regex.c (re_match_2): Ditto.
	* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
	out unused macro definition and variables.
	* inftarg.c (proc_wait): Move from main.c to here, and make static.
	* valprint.c (val_print_string): Change bufsize from int to unsigned.
	* main.c (wait.h): Include
	* top.c (command_line_input): Remove unused variable "c".
	* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
	value TYPE_CODE_TYPEDEF to switch statement.
	(f_type_print_varspec_suffix): Add missing enum value
	TYPE_CODE_TYPEDEF to switch statement.
	* ch-exp.c (parse_primval): Add remaining enumeration values to
	switch statement, with no specific action.
	(ch_lex): Add LOC_UNRESOLVED in switch statement.
	(pushback_token): Ifdef out, since code using it is ifdef'd out.
	* stabsread.c (cleanup_undefined_types): Remove unused label
	"badtype".
	* objfiles.h (print_symbol_bcache_statistics): Add prototype.
	* maint.c (objfiles.h): Include.
	(maintenance_print_statistics): Remove unused variable "temp".
	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	unused variable "found_file_symbol".
	* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
	* language.c (lang_bool_type): Use existing function local type
	variable rather than create block local variables.
	* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
	* infptrace.c (wait.h, command.h): Include.
	* ser-tcp.c (gdb_string.h): Include
	* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
	(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
	* command.c (complete_on_enum): Make assignment used as truth value
	explictly check against NULL.
	(wait.h): Include.
	* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
	that uses it is ifdef'd out.
	* parser-defs.h: Add prototype for write_dollar_variable.
	* infrun.c: Add prototype for write_pc_pid.
	* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
	* symmisc.c (bcache.h): Include.
	* bcache.h: Add prototype for print_bcache_statistics.
	* symfile.c: Include <time.h>.
	* printcmd.c (print_scalar_formatted): Change len to unsigned int.
	* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
	* valarith.c (value_binop): Change result_len, promoted_len1,
 	and promoted_len2 to unsigned int.
	* valarith.c (value_subscripted_rvalue): Change elt_offs and
 	elt_size to unsigned int.
	* valops.c (value_array): Change typelength to unsigned int.
	(destructor_name_p): Change len to unsigned int.
	* scm-lang.h (scm_parse): Add prototype for scm_unpack.
	* symfile.c (decrement_reading_symtab): Change return type to void.
	* valarith.c (value_subscript): Remove unused variable "word".
	(value_subscript): Remove unused variable "tint".
	* valops.c (auto_abandon): Ifdef out, since code using it is also
	ifdef'd out.
	* eval.c (init_array_element): Remove unused variable "val".
	* Makefile.in (values.o): Depends on scm-lang.h.
	(command.o): Depends upon wait_h.
	(ser-tcp.o): Depends upon gdb_string.h.
	(infptrace.o): Depends upon wait_h and command_h.
	(maint.o): Depends on objfiles.h and symfile.h.
	* values.c (allocate_repeat_value): Remove unused variable
	"element_type".
	(scm-lang.h): Include.
	* breakpoint.c (create_longjmp_breakpoint): Enclose in
	GET_LONGJMP_TARGET define, unused otherwise.
	* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
	i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-03-30 05:45:10 +00:00
Per Bothner 1c486a2ba5 * stabsread.c (define-symbol): Use invisible references
for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
	* eval.c (evaluate_subexp_standard):  When known, use the formal
	parameter type as the expected type when evaluating arg expressions.
	* ch-lang.c (evaluate_subexp_chill):  Likewise (for MULTI_SUBSCRIPT).
This (with a fix to gcc/config/sparc/sparc.h) fixes PR chill/8742.
1996-01-12 01:31:37 +00:00
Per Bothner a56c9325ec * eval.c (evaluate_subexp_standard case): Fix typo. 1995-12-03 20:32:55 +00:00
Per Bothner a366d882c0 * language.c (lang_bool_type), language.h: New function.
* language.h (LA_BOOL_TYPE):  New macro.
	* eval.c (evaluate_subexp_standard)  Use LA_BOOL_TYPE instead
	of builtin_type_int where appropriate,
	* valarith.c (value_subscript):  Likewise.
1995-12-01 08:08:41 +00:00
Per Bothner bcbf388e99 * f-typeprint.c, valarith.c, valprint.c, typeprint.c, eval.c:
Add check_typedef/CHECK_TYPEDEF as needed.
	* f-typeprint.c:  Various cleaning up.
	* valarith.c (value_subscript):  Also subscript bitstrings (for Chill).
	* typeprint.c (print_type_scalar):  Also support TYPE_CODE_RANGE.
	* eval.c (evaluate_subexp_standard case OP_ARRAY):  Implement
	support for labelled array tuples and ranges in powerset tuples.
	(init_array_element):  New function.
1995-11-30 02:32:29 +00:00
Per Bothner badefd2800 * expression.h (enum exp_opcode): Add BINOP_RANGE.
* expprint.c (dump_expression):  Support BINOP_RANGE.
	* eval.c (evaluate_subexp_standard):  Handle BINOP_RANGE (as error).
	(case MULTI_SUBSCRIPT):  Fix broken f77 value->int ad hoc conversion.
	* ch-lang.c (chill_op_print_tab):  Support BINOP_RANGE.
	(evaluate_subexp_chill):  Error on BINOP_COMMA.
1995-11-29 22:59:31 +00:00
Fred Fish bfe8f51619 * magic.h: Renamed to gmagic.h to avoid <magic.h> conflict.
* magic.c:  Renamed to gmagic.c in sympathy.
	* eval.c, gmagic.c, config/tm-magic.h:
 	Include "gmagic.h" rather than "magic.h".
1995-11-28 19:33:22 +00:00
Stu Grossman cd10c7e388 * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGET
around calls to create_longjmp_breakpoint.  Why install the
	breakpoints if we can't find the longjmp target?
	* infrun.c (wait_for_inferior):  Cleanup comments near call test.
	* remote-mips.c:  Fixed a bunch of prototypes to avoid char/int
	complaint from picky compilers.  Add comment to mips_expect.
	Replace all instances of sr_get_debug with remote_debug.
	* (mips_readchar):  Don't jam init string to monitor.
	mips_initialize() handles that.
	* (mips_receive_header):  Print better message when we get too
	much garbage.
	* (mips_request):  Allow caller to pass in buff to allow them to
	analyze the returned message.
	* (mips_initialize):  Re-do initialization to try sending a BREAK,
	a ^C, and then a download escape sequence.  Cleanup protocol
	startup.  Eliminate sleeps.  Clear breakpoints (if using monitor
	breakpoints).  Re-init frame.
	* (mips_detach):  Close down target.
start-sanitize-gm
	* (mips_resume):  Pass signal down to target.
	* (mips_create_inferior):  Start target with TARGET_SIGNAL_PWR.
end-sanitize-gm
	* (mips_wait):  Handle return status with registers, or breakpoint stuff.
	* (mips_kill):  Add ^C handling.
	* (mips_insert_breakpoint mips_remove_breakpoint):  Call new
	breakpoint stuff if enabled.
	* (calculate_mask remote_mips_set_watchpoint
	remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
	Hardware watchpoint/breakpoint stuff.
	* (common_breakpoint):  Common code for new monitor breakpoint commands.
	* (mips_load):  Don't use `prompt'.  It's a global variable.
	* top.c (dont_repeat_command):  New command for use in
	user-defined commands to suppress auto-repeat (by hittin return key).
start-sanitize-gm
	* utils.c (request_quit):  Call target_kill here.  Good idea.
	Needs a better implementation.
end-sanitize-gm
	* valops.c:  Add start of auto function-call abandonment capability.

start-sanitize-gm
	* c-exp.y:  Add code (currently disabled) to handle GM dynamic
	structures (it conflicts with @!).
	* eval.c (evaluate_subexp_standard):  ditto.
	* expprint.c (print_subexp dump_expression):  ditto.
	* expression.h (enum exp_opcode):  ditto.
	* parse.c (length_of_subexp):  ditto.
	* configure, configure.in:  Add mip*-*-magic* target.
	* magic.c magic.h:  Special routines to handle GM stuff (like
	stepping through dispatcher).
end-sanitize-gm
1995-10-27 17:48:36 +00:00