aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
AgeCommit message (Collapse)AuthorFilesLines
2005-03-08 * ax-gdb.c (gen_expr): Add UNOP_PLUS case.Nathan Sidwell1-0/+9
* c-exp.y (exp): Add unary plus. * eval.c (evaluate_subexp_standard): Add UNOP_PLUS case. * valarith.c (value_x_unop): Add UNOP_PLUS case. (value_pos): New. * value.h (value_pos): Declare. * gdb.cp/userdef.cc (A1::operator+): New unary plus. (A2): New class. (main): Test operator+. * gdb.cp/userdef.exp: Test unary plus. Use A2::operator+ for breakpoint test.
2005-02-112005-02-10 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-48/+48
Mark up all error and warning messages. * ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update. * bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update. * core-aout.c, core-regset.c, corefile.c, corelow.c: Update. * cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update. * dbxread.c, demangle.c, doublest.c, dsrec.c: Update. * dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update. * dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update. * event-top.c, exec.c, expprint.c, f-lang.c: Update. * f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update. * frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update. * gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update. * hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update. * hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update. * hpread.c, hpux-thread.c, i386-linux-nat.c: Update. * i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update. * i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update. * ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update. * infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update. * inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update. * kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update. * linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update. * m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update. * m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update. * maint.c, mdebugread.c, mem-break.c, memattr.c: Update. * mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update. * nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update. * observer.c, ocd.c, p-lang.c, p-typeprint.c: Update. * p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update. * ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update. * remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update. * remote-rdp.c, remote-sim.c, remote-st.c: Update. * remote-utils.c, remote-utils.h, remote.c: Update. * rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update. * ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update. * sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update. * solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update. * solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update. * somread.c, somsolib.c, source.c, stabsread.c: Update. * stack.c, std-regs.c, symfile-mem.c, symfile.c: Update. * symmisc.c, symtab.c, target.c, thread.c, top.c: Update. * tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update. * uw-thread.c, valarith.c, valops.c, valprint.c: Update. * value.c, varobj.c, version.in, win32-nat.c, wince.c: Update. * xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update. * cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update. * cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update. * mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update. * mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update. * mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update. * tui/tui-win.c: Update.
2005-02-092005-02-08 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-0/+1
* value.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET) (METHOD_PTR_TO_VOFFSET): Move from here ... * cp-support.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET) (METHOD_PTR_TO_VOFFSET): ... to here. * cp-valprint.c, p-valprint.c, eval.c: Include "cp-support.h". * Makefile.in: Update dependencies.
2005-02-072005-02-07 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-4/+4
* value.h (deprecated_set_value_type): Declare. * value.c (deprecated_set_value_type): Define. * hpacc-abi.c, gnu-v2-abi.c, cp-valprint.c: Update. * c-valprint.c, jv-lang.c, objc-lang.c, ada-lang.c: Update. * infcall.c, printcmd.c, valops.c, eval.c, p-exp.y: Update. * ax-gdb.c, tracepoint.c: Update.
2005-02-072005-02-07 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
* value.h (value_embedded_offset): Delete. (value_embedded_offset): Declare. * value.c (value_embedded_offset): Define. * valops.c, p-valprint.c, mi/mi-main.c, hpacc-abi.c: Update. * gnu-v3-abi.c, eval.c, c-valprint.c, cp-valprint.c: Update. * cp-abi.h: Update.
2005-02-072005-02-06 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-8/+8
* value.c (value_contents, value_contents_writeable): New functions. * value.h (VALUE_CONTENTS): Delete macro. (value_contents, value_contents_writeable): Declare. * xstormy16-tdep.c, value.c, valops.c, valarith.c: Update. * stack.c, sparc-tdep.c, sparc64-tdep.c, sh-tdep.c: Update. * sh64-tdep.c, scm-valprint.c, scm-exp.c, s390-tdep.c: Update. * rs6000-tdep.c, p-valprint.c, printcmd.c: Update. * ppc-sysv-tdep.c, mips-tdep.c, mi/mi-main.c: Update. * m88k-tdep.c, m68hc11-tdep.c, m32r-tdep.c: Update. * jv-valprint.c, ia64-tdep.c, hppa-tdep.c: Update. * hpacc-abi.c, f-valprint.c, frv-tdep.c, eval.c: Update. * c-valprint.c, cris-tdep.c, cp-valprint.c: Update. * cli/cli-dump.c, breakpoint.c, avr-tdep.c, arm-tdep.c: Update. * arm-linux-tdep.c, amd64-tdep.c, alpha-tdep.c: Update. * ada-valprint.c, ada-lang.c: Update.
2005-02-022005-02-02 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
* value.h (value_lazy): Declare. * varobj.c, value.c, valops.c, valarith.c, printcmd.c: Update. * cp-valprint.c, breakpoint.c, ada-lang.c: Update.
2005-02-022005-02-01 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-8/+8
* value.c (value_contents_all_raw) (value_contents_raw): New functions. * value.h (VALUE_CONTENTS_ALL_RAW, VALUE_CONTENTS_RAW): Delete. (value_contents_raw, value_contents_all_raw): Declare functions. (VALUE_CONTENTS, VALUE_CONTENTS_ALL): Update. * std-regs.c, valarith.c, valops.c, eval.c: Update. * tracepoint.c, findvar.c: Update.
2004-11-122004-11-12 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-62/+62
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE) (VALUE_BITPOS): Delete. (value_type, value_offset, value_bitsize, value_bitpos): Declare. * value.c (value_type, value_offset, value_bitpos) (value_bitsize): New functions. Update references. * arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update. * f-valprint.c, cp-valprint.c, c-valprint.c: Update. * ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update. * p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update. * objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update. * infcall.c, linespec.c, printcmd.c, valarith.c: Update. * valops.c, eval.c, findvar.c, breakpoint.c: Update. * tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c: * rs6000-tdep.c, ppc-sysv-tdep.c: Update.
2004-11-102004-11-10 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
* value.h (COERCE_REF, COERCE_ARRAY, COERCE_NUMBER, COERCE_ENUM) (coerce_ref, coerce_array, coerce_number, coerce_enum): Replace macros with function declarations. * value.c (coerce_ref, coerce_array, coerce_number) (coerce_enum): New functions. (value_as_long, value_as_address): Update. * ada-lang.c (ada_coerce_ref, ada_value_binop) (ada_evaluate_subexp, ada_value_assign, ada_value_struct_elt): Update. * jv-lang.c (evaluate_subexp_java): Update. * valarith.c (value_less, value_neg, value_complement) (value_binop, value_add, value_subscript, value_x_binop) (value_logical_not, value_sub): Update. * valops.c (check_field, value_struct_elt, value_ind) (value_find_oload_method_list, value_cast, value_assign): Update. * eval.c (evaluate_subexp_standard): Update.
2004-11-092004-11-09 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-2/+1
* value.h (struct value): Delete field bfd_section. (VALUE_BFD_SECTION): Delete macro. (COERCE_REF): Update. (value_at, value_at_lazy): Delete asection parameter. * printcmd.c (print_formatted, x_command): Update. (do_examine): Delete asection parameter. (next_section): Delete variable. * valops.c (value_cast, value_at, value_at_lazy) (value_coerce_function, value_addr, value_ind, value_string) (find_rt_vbase_offset, value_full_object): Update. * hpacc-abi.c (hpacc_virtual_fn_field) (hpacc_value_rtti_type): Update. * gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_virtual_fn_field) (gnuv3_baseclass_offset): Update. * f-valprint.c (f_val_print): Update. * c-valprint.c (c_val_print): Update. * p-valprint.c (pascal_val_print): Update. * jv-valprint.c (java_value_print): Update. * jv-lang.c (java_class_from_object, evaluate_subexp_java): Update. * ada-lang.c (ada_value_primitive_packed_val) (ada_evaluate_subexp): Update. * dwarf2loc.c (dwarf2_evaluate_loc_desc): Update. * expprint.c (print_subexp_standard): Update. * infcall.c (call_function_by_hand): Update. * valarith.c (value_add): Update. * eval.c (evaluate_subexp_standard): Update. * values.c (allocate_value, value_copy, value_static_field): Update. * findvar.c (read_var_value, locate_var_value): Update.
2004-10-292004-10-29 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-2/+2
* frame.h (get_selected_frame): Add message parameter. * frame.c (get_selected_frame): Add and use message parameter. * stack.c (current_frame_command, return_command, locals_info) (catch_info, args_info, up_silently_base, down_silently_base): Use get_selected_frame with an explicit message. * thread.c, stack.c, sh-tdep.c, sh64-tdep.c: Update. * remote-rdp.c, remote-mips.c, remote-e7000.c: Update. * ocd.c, mi/mi-main.c, mi/mi-cmd-stack.c: Update. * infrun.c, inflow.c, infcmd.c, frame.c: Update. * findvar.c, eval.c, corelow.c, bsd-kvm.c: Update. * breakpoint.c: Update.
2004-08-292004-08-29 David Lecomber <david@streamline-computing.com>David Lecomber1-10/+14
Fix PR gdb/648 * language.h (enum array_ordering): New enum. * language.h (struct language_defn): New la_array_ordering attribute. * language.c (unknown_language_defn, auto_language_defn) (local_language_defn): Ditto. * ada-lang.c (ada_language_defn): Ditto. * c-lang.c (c_language_defn, cplus_language_defn) (asm_language_defn, minimal_language_defn): Ditto. * f-lang.c (f_language_defn): Ditto. * jv-lang.c (java_language_defn): Ditto. * m2-lang.c (f_language_defn): Ditto. * objc-lang.c (objc_language_defn): Ditto. * p-lang.c (pascal_language_defn): Ditto. * scm-lang.c (scm_language_defn): Ditto. * eval.c (evaluate_subexp_standard): Assume Fortran arrays are oriented large to small in type structure. * dwarf2read.c (read_array_order): New function. (read_array_type): Use read_array_order to check row/column major ordering.
2004-04-082004-04-08 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-9/+6
* breakpoint.h (deprecated_exception_catchpoints_are_fragile) (deprecated_exception_support_initialized): Declare. * hppa-hpux-tdep.c (initialize_hp_cxx_exception_support) (initialize_hp_cxx_exception_support) (child_enable_exception_callback): Update. * breakpoint.c (deprecated_exception_catchpoints_are_fragile) (deprecated_exception_support_initialized): Rename deprecated_exception_catchpoints_are_fragile and deprecated_exception_support_initialized. (breakpoint_init_inferior, breakpoint_init_inferior): Update. * symtab.c (deprecated_hp_som_som_object_present): Rename hp_som_som_object_present. * symtab.h (deprecated_hp_som_som_object_present): Declare. * symfile.c (hp_som_som_object_present, RESET_HP_UX_GLOBALS): Update. Delete extern declaration. * valops.c (hp_som_som_object_present): Ditto. * parse.c (deprecated_hp_som_som_object_present) (parse_nested_classes_for_hpacc): Ditto. * hpread.c (hp_som_som_object_present, hpread_expand_symtab): Ditto. * hppa-hpux-tdep.c (hp_som_som_object_present) (initialize_hp_cxx_exception_support): Ditto. * eval.c (hp_som_som_object_present, evaluate_subexp_standard): Ditto. * cp-valprint.c (hp_som_som_object_present) (cp_print_class_method): Ditto. * c-typeprint.c (hp_som_som_object_present): (c_type_print_base): Ditto. * c-exp.y (hp_som_som_object_present): Ditto.
2004-02-182004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>Jim Blandy1-8/+18
Committed by Jim Blandy <jimb@redhat.com>. * eval.c (evaluate_subexp_standard, case OP_OBJC_MSGCALL): Use CORE_ADDR as type for selectors. Correct types for GNU run time message lookup function to use double indirection. * objc-lang.c (lookup_child_selector): Use CORE_ADDR as return type. * objc-lang.h (lookup_child_selector): Adapt prototype.
2003-11-232003-11-23 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* symfile.c (symbol_file_command): Replace STREQ with strcmp. * defs.h (DEPRECATED_STREQN): Rename STREQN. (DEPRECATED_STREQ): Rename STREQ. * ada-exp.y, ada-lang.c, ada-lex.l, coffread.c: Update. * config/mips/tm-irix5.h, config/mips/tm-irix6.h: Update. * config/mips/tm-mipsv4.h, config/sparc/tm-sun4sol2.h: Update. * dbxread.c, dwarf2read.c, dwarfread.c, environ.c: Update. * eval.c, exec.c, f-lang.c, hppa-tdep.c, hpread.c: Update. * jv-exp.y, language.c, m2-exp.y, mcore-rom.c: Update. * mdebugread.c, mipsread.c, objc-exp.y, objfiles.c: Update. * p-exp.y, p-typeprint.c, p-valprint.c, rs6000-nat.c: Update. * source.c, sparc-tdep.c, stack.c, target.c: Update.
2003-09-252003-09-25 David Carlton <carlton@kealia.com>David Carlton1-5/+3
* c-exp.y: Include cp-support.h. Add qualified_type. (yylex): Delete nested type hack; add comments. * cp-namespace.c (cp_lookup_nested_type): New function. * cp-support.h: Declare cp_lookup_nested_type. * eval.c (evaluate_subexp_standard): Call value_aggregate_elt instead of value_struct_elt_for_reference. * valops.c: Include cp-support.h. (value_aggregate_elt): New function. (value_namespace_elt): Ditto. (value_struct_elt_for_reference): Make static. * value.h: Delete declaration of value_struct_elt_for_reference; add declaration for value_aggregate_elt. * Makefile.in (c-exp.tab.o): Depend on $(cp_support_h). (valops.o): Ditto. 2003-09-25 David Carlton <carlton@kealia.com> * gdb.cp/namespace.exp: Tweak comments. Add non-quoted versions of some print tests, where appropriate. Add tests for C::D::cd, E::ce, F::cXfX, G::XgX. * gdb.cp/namespace.cc: Add XgX, cXfX, ce.
2003-09-25* parser-defs.h (struct exp_descriptor): New definition, containingPaul N. Hilfinger1-1/+3
language-specific info for printing, prefixifying, dumping, and evaluating expressions. (exp_descriptor_standard): Declare new variable. (print_subexp): Make global and declare here (from expprint.c). (dump_subexp): Ditto. (dump_subexp_body_standard): Declare. (operator_length_standard): Declare. (op_name_standard): Declare. (print_subexp): Declare. (print_subexp_standard): Declare. * language.h (struct language_defn): Add la_exp_desc field to hold pointer to table for language-specific operators. Remove evaluate_exp field, which is now in struct exp_descriptor. * parse.c (operator_length): Move most code to new operator_length_standard function. Use language-specific information. (operator_length_standard): New function taking most code from operator_length. (exp_descriptor_standard): New constant. * expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0 and OP_EXTENDED_LAST. * expprint.c (print_subexp): Use language-specific print_subexp. Make global; remove static declaration. Move most code to print_subexp_standard. (print_subexp_standard): New function, containing code formerly in print_subexp. (op_name): Add expression to argument signature. Use langauge-specific op_name. Move most code to op_name_standard. (op_name_standard): New function, containing code formerly in op_name. (dump_subexp): Use new version of op_name function. Use language-specific dump_subexp_body, and move most existing code to dump_subexp_body_standard. (dump_raw_expression): Use new op_name interface. (dump_subexp_body): Move most code to dump_subexp_body_standard. (dump_subexp_body_standard): New function, containing code formerly in dump_subexp_body. * language.c (unknown_language): Add default la_exp_desc field and remove evaluate_exp field. (auto_language): Ditto. (local_language): Ditto. * f-lang.c (f_language_defn): Ditto. * c-lang.c (c_language_defn): Ditto. (cplus_language_defn): Ditto. (asm_language_defn): Ditto. (minimal_language_defn): Ditto. * p-lang.c (pascal_language_defn): Ditto. * m2-lang.c (m2_language_defn): Ditto. * objc-lang.c (objc_language_defn): Ditto. * jv-lang.c (exp_descriptor_java): New variable, containing Java-specific expression evaluator. (java_language_defn): Add la_exp_desc field and remove evaluate_exp field. * scm-lang.c (exp_descriptor_scm): New variable, containing Scheme-specific expression evaluator. (scm_language_defn): Add la_exp_desc field and remove evaluate_exp field. * objc-lang.c (print_object_command): Take evaluate_exp from the la_exp_desc field. * Makefile.in (eval.o): Add dependency on parser-defs.h. * eval.c: Include parser-defs.h for the full declaration of la_exp_desc's type. (evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
2003-09-162003-09-16 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-11/+11
* buildsym.c: Remove more occurances of "register". * coffread.c, dbxread.c, dcache.c, dwarf2read.c: Ditto. * environ.c, eval.c, f-valprint.c, findvar.c: Ditto. * gdbtypes.c, gnu-v2-abi.c, h8300-tdep.c, hppa-tdep.c: Ditto. * infcmd.c, mdebugread.c, minsyms.c, mips-tdep.c: Ditto. * printcmd.c, remote-vx.c, sh-stub.c, sh-tdep.c: Ditto. * sh64-tdep.c, source.c, stabsread.c, stack.c: Ditto. * standalone.c, symfile.c, symmisc.c, symtab.c: Ditto. * utils.c, valops.c, values.c, xcoffread.c: Ditto.
2003-09-142003-09-14 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-13/+13
* alpha-nat.c: Remove some occurances of "register". * alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto. * buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto. * corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto. * dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto. * environ.c, eval.c, event-top.c, f-typeprint.c: Ditto. * f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto. * h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto. * hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto. * infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto. * infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto. * jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto. * mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto. * mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto. * ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto. * p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto. * remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto. * rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto. * solib.c, somread.c, source.c, sparc-tdep.c: Ditto. * stabsread.c, stack.c, standalone.c, symfile.c: Ditto. * symmisc.c, symtab.c, top.c, tracepoint.c: Ditto. * typeprint.c, utils.c, valarith.c, valops.c: Ditto. * values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-132003-09-13 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* values.c (using_struct_return): Delete "function" and "funcaddr" parameters. * value.h (using_struct_return): Update declaration. * infcmd.c (finish_command_continuation): Update. (finish_command): Update. * infcall.c (call_function_by_hand): Update. * eval.c (evaluate_subexp_standard): Update.
2003-09-09Reverting until I learn how to conform..David Lecomber1-9/+5
2003-09-09Change array element access to something similar to way C works.David Lecomber1-5/+9
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-07-072003-07-07 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+1
* 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-04-30* eval.c (evaluate_subexp_standard): Handle ObjC ops.Adam Fedor1-0/+284
* infcall.c (find_function_addr): Make non-static. * infcall.h (find_function_addr): Declare. * Makefile.in (eval.o): Update dependencies.
2003-04-212003-04-21 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-0/+1
* 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-03-122003-03-12 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+1
* 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-01-142003-01-13 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-3/+4
* 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-022003-01-02 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-5/+6
* 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.
2002-11-292002-11-29 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-1/+1
* 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-09-252002-09-25 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+2
* 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-08-012002-08-01 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-9/+7
* 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-04-122002-04-12 Michael Snyder <msnyder@redhat.com>Michael Snyder1-6/+6
* eval.c: Indentation fix-ups.
2002-03-16 * eval.c (evaluate_subexp_standard): Fix setup of ``this'' pointerPeter Schauer1-8/+9
for method resolution. Restore adjustment of ``this'' pointer after calling value_struct_elt, which was accidentally removed during the HP merge.
2002-03-16* eval.c (evaluate_subexp_standard): Pass ``selected_frame'' toAndrew Cagney1-2/+1
value_of_register. * findvar.c (value_of_register): Add ``frame'' parameter. Pass to get_saved_register. * value.h (value_of_register): Update.
2002-01-042002-01-04 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+1
* 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.
2001-12-25* cli/cli-script.c (execute_control_command): Replace value_ptrAndrew Cagney1-3/+3
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-10Approved by Jim Blandy:Fred Fish1-2/+2
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-11-12Patch from Andreas Schwab <schwab@suse.de>:Jim Blandy1-2/+2
* eval.c (evaluate_subexp_standard): Fix memory leak: use alloca instead of xmalloc.
2001-11-10s/value_ptr/struct value */Andrew Cagney1-46/+49
2001-10-16* value.h (value_as_address): Rename value_as_pointer.Andrew Cagney1-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.
2001-04-27(Changes from Daniel Berlin, with revisions by Jim Blandy.)Jim Blandy1-0/+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).
2001-03-19Zap __STDC__ references.Andrew Cagney1-3/+0
2001-03-072001-03-06 J.T. Conklin <jtc@redback.com>J.T. Conklin1-1/+0
* 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-06Update/correct copyright notices.Kevin Buettner1-1/+2
2000-10-30 * eval.c (parse_and_eval_long): New function.David Taylor1-0/+15
* 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-09-01Correct spelling in comment: tupes -> tuples.David Anderson1-1/+1
2000-07-30Protoization.Kevin Buettner1-53/+24
2000-05-28PARAMS removal.Kevin Buettner1-11/+10
2000-04-26 * ax-gdb.c (agent_command): Remove now useless cast ofPhilippe De Muyter1-4/+4
`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.