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.
* 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.
* 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.
* 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.
* 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.
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.
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.
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).
Submitted by Paul Hilfinger (hilfingr@gnat.com)
and Andrei Petrov (and@genesyslab.com).
* findvar.c: Buffers of size MAX_REGISTER_RAW_SIZE or REGISTER_BYTES
must be allocated dynamically, since these are no longer constants.
* infcmd.c: Ditto.
* regcache.c: Ditto.
* remote.c: Ditto.
* sol-thread.c: Ditto.
* valops.c: Ditto.
* config/sparc/sun4sol2.mh (MH_CFLAGS): Add -I/usr/include/v9, as a
work-around for a missing Sun header file in solaris for sparc64.
issue a message about truncation unless it exceeds the length of
an address, not the length of a pointer. This is because what the
user gives us is an address, not a pointer, and we will ultimately
convert it (via ADDRESS_TO_POINTER) to a pointer, not truncate it
to a pointer. This allows things like "print *(int *)0x01000234"
to work without generating a misleading message on a target having
two byte pointers and four byte addresses.
* valops.c (value_cast): Indentation fix-up.
* acconfig.h (HAVE_PRGREGSET32_T, HAVE_PRFPREGSET32_T,
HAVE_STRUCT_LINK_MAP32): New configure macros.
* config.in: Ditto.
* configure.in: Test for the above new macros.
* breakpoint.c: Update copyright date.
* core-sol2.c: Include v9/sys/privregs.h directly to
work around a bug in Sun's Solaris 8 header files.
(fetch_core_registers): Use the above new configure macros to
handle cross-debugging of 32-bit core files on a 64-bit host.
* sol-thread.c (ps_pdmodel) New function.
(rw_common): For debugging of 32-bit apps on a 64-bit host,
truncate addresses to 32 bits.
* solib.c (solib_extract_address): Functionize. Make 32/64 aware.
(LM_ADDR, LM_NEXT, LM_NAME): Ditto.
(IGNORE_FIRST_LINK_MAP): Ditto.
(first_link_map_member): Make 32/64 aware.
(open_symbol_file_object): Ditto.
(current_sos): Ditto.
equivalence.
(rank_one_type): Use strcmp instead of == to compare type names.
Don't swap parm with arg when checking TYPE_CODE_REF types.
* valops.c (find_overload_match): Fix indentation. Compare
parameter rankings to 0..9, 10..99, and 100+ instead of 0, 10,
and 100.
run-time test for STACK_ALIGN_P.
* gdbarch.sh: Add support for function and variable predicates.
(STACK_ALIGN): Add. Implement with predicate - STACK_ALIGN_P.
* gdbarch.h, gdbarch.c: Re-generate.
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.
* infcmd.c (run_stack_dummy): Do not pop frame on random signal.
* valops.c (_initialize_valops): Add command "set unwindonsignal".
(hand_function_call): Test for unwind_on_signal and act accordingly.
* valops.c (COERCE_FLOAT_TO_DOUBLE): Rework definition to be
more function-like.
(default_coerce_float_to_double, standard_coerce_float_to_double):
New functions.
(value_arg_coerce): Adjust for new definition.
* value.h (default_coerce_float_to_double,
standard_coerce_float_to_double): New declarations for the above.
* gdbarch.sh (coerce_float_to_double): New entry, replacing macro.
* gdbarch.c, gdbarch.h: Regenerated.
* tm-alpha.h, tm-fr30.h, tm-m32r.h, tm-mips.h, tm-hppa.h,
tm-rs6000.h, tm-sh.h, tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Change
definitions.
* mips-tdep.c (mips_coerce_float_to_double): Supply our own custom
function here.
(mips_gdbarch_init): Install that as our coerce_float_to_double
function.
destructor name with call to destructor_name_p.
* c-lang.h, c-typeprint.c (cp_type_print_method_args): Removed,
no longer needed.
* c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base):
Replace remaining fprintf_unfiltered calls with their filtered variant.
(c_type_print_base): Do not print return type for destructors from
template classes.
Replace cp_type_print_method_args with cplus_demangle call to get
consistent type output for stubbed and unstubbed methods.
* cp-valprint.c (cp_print_class_method): Replace
cp_type_print_method_args with cplus_demangle call to get consistent
type output for stubbed and unstubbed methods.
* gdbtypes.c, gdbtypes.h (get_destructor_fn_field): New function
to find the destructor field indices for a type.
* gdbtypes.h (struct type): Clarify comments for vptr_basetype
and arg_types fields.
(struct fn_field): Remove args field, no longer used.
* symtab.c (decode_line_1), valops.c (value_struct_elt,
check_field_in): Use get_destructor_fn_field to find the destructor
field indices instead of assuming that the compiler passes the member
function fields in a specific order.
* symtab.c (find_methods): Pass NULL instead of SYMBOL_BLOCK_VALUE
to lookup_symbol.
(list_symbol): Replace cp_type_print_method_args with cplus_demangle
call in zapped out code and explain why this code is zapped out.
Added some generic target-independant code for managing call-dummy frames.
Wed Nov 27 10:32:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
* breakpoint.c: DELETE command will not delete CALL_DUMMY breakpoint.
* blockframe.c: Add target-independant support for managing
CALL_DUMMY frames on the host side.
* frame.h: Declarations for generic CALL_DUMMY frame support.
* h8300-tdep.c: Add target function calls using generic frame support.
* config/h8300/tm-h8300.h: config for generic target function calls.
start-sanitize-m32r
* m32r-tdep.c: Add target function calls using generic frame support.
* config/m32r/tm-m32r.h: config for generic target function calls.
end-sanitize-m32r
* sh-tdep.c: Add target function calls using generic frame support.
* config/sh/tm-sh.h: config for generic target function calls.
start-sanitize-v850
* v850-tdep.c: Add target function calls using generic frame support.
* config/v850/tm-v850.h: config for generic target function calls.
end-sanitize-v850
* valops.c: ADD PUSH_RETURN_ADDRESS so that it doesn't have to be
done by PUSH_ARGUMENTS when there's no CALL_DUMMY.
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.
* c-exp.y (%union): Change dval to typed_val_float. Use DOUBLEST
to store actual data. Change types of INT and FLOAT tokens to
typed_val_int and typed_val_float respectively. Create new token
DOUBLE_KEYWORD to specify the string `double'. Make production
for FLOAT use type determined by parse_number. Add production for
"long double" data type.
* (parse_number): Use sscanf to parse numbers as float, double or
long double depending upon the type of typed_val_float.dval. Also
allow user to specify `f' or `l' suffix to explicitly specify
float or long double constants. Change typed_val to
typed_val_int.
* (yylex): Change typed_val to typed_val_int. Also, scan for
"double" keyword.
* coffread.c (decode_base_type): Add support for T_LNGDBL basic
type.
* configure, configure.in: Add check for long double support in
the host compiler.
* defs.h: Define DOUBLEST appropriatly depending on whether
HAVE_LONG_DOUBLE (from autoconf) is defined. Also, fix prototypes
for functions that handle this type.
* expression.h (union exp_element): doubleconst is now type
DOUBLEST.
* m2-exp.y f-exp.y (%union): dval becomes type DOUBLEST.
* findvar.c (extract_floating): Make return value be DOUBLEST.
Also, add support for numbers with size of long double.
* (store_floating): Arg `val' is now type DOUBLEST. Handle all
floating types.
* parser-defs.h parse.c (write_exp_elt_dblcst): Arg expelt is now
DOUBLEST.
* valarith.c (value_binop): Change temp variables v1, v2 and v to
type DOUBLEST. Coerce type of result to long double if either op
was of that type.
* valops.c (value_arg_coerce): If argument type is bigger than
double, coerce to long double.
* (call_function_by_hand): If REG_STRUCT_HAS_ADDR is defined, and
arg type is float and > 8 bytes, then use pointer-to-object
calling conventions.
* valprint.c (print_floating): Arg doub is now type DOUBLEST.
Use appropriate format and precision to print out floating point
values.
* value.h: Fixup prototypes for value_as_double,
value_from_double, and unpack_double to use DOUBLEST.
* values.c (record_latest_value): Remove check for invalid
floats. Allow history to store them so that people may examine
them in hex if they want.
* (value_as_double unpack_double): Change return value to DOUBLEST.
* (value_from_double): Arg `num' is now DOUBLEST.
* (using_struct_return): Use RETURN_VALUE_ON_STACK macro (target
specific) to expect certain types to always be returned on the stack.
* ch-exp.c: New file. Use recursive-descent.
Recognize labelled array tuples and powerset ranges.
* Makefile.in: Update for no longer using yacc for ch-exp.
* c-lang.c: Make various functions non-static.
* c-lang.h: Add bunches of prototypes.
* cp-valprint.c (cp_print_value_fields): Also take address.
(cp_print_value): Likewise. Use baselcass_offset.
* stabsread.c (current_symbol): New static variable.
(type_synonym_name): Remove.
(read_type): If copying, make copy be a TYPE_CODE_TYPEDEF.
(read_array_type): Don't need to handle undefined element type here.
(cleanup_undefined_types): Ditto.
(read_range_type): Look for Chill ranges.
* valops.c (value_assign): Fix case lval_internalvar - don't try
to assign into old value (which might be too small!).
(value_coerce_array): No longer need special VALUE_REPEATED handling.
(value_arg_coerce): Cleaner array->pointer decay mechanism.
(search_struct_field): Use baseclass_offset rather than
baseclass_addr.
(value_slice): Use get_discrete_bounds.
* value.h (COERCE_VARYING_ARRAY): Take type argumnt as well.
* values.c (baseclass_offset): Change parameter interface.
(baseclass_addr): Removed.
* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
Add check_typedef/CHECK_TYPEDEF as needed.
Do not set saved registers from heuristics for a sigtramp frame.
* dwarfread.c (enum_type): Determine signedness of enum type
from enumerators.
* mips-tdep.c: Include gdb_string.h, gcc -Wall lint.
* rs6000-nat.c (xcoff_relocate_core): Fix typo.
* valops.c (value_repeat): Fix length of memory transfer to
match recent allocate_repeat_value change.
structure tuples. Now also handles Chill variant records.
(get_label): New function, used by evaluate_struct_tuple.
(evaluate_subexp_standard case OP_ARRAY): Use evaluate_struct_tuple.
(evaluate_labeled_field_init): Removed.
* valops.c (search_struct_field): Generalize to work with Chill
variant records.
* valops.c (value_bitstring): TYPE_LENGTH is bytes, not bits.
* gdbtypes.c (force_to_range_type): Calculate upper limit of
TYPE_CODE_CHAR depending on TYPE_LENGTH (instead of just using 255).
we coerce array to pointer (in case arg2 is already array).
* valops.c (call_function_by_hand): Set using_gcc to 2 if using
gcc2. Needed for REG_STRUCT_HAS_ADDR to work on sparc.
Also check REG_STRUCT_HAS_ADDR for union, array and string types.
* valops.c (call_function_by_hand): Re-arrange code for pushing
paramaters on the stack so we can do better STACK_ALIGN.
* valops.c (call_function_by_hand): Call error if the number
of arguments is fewer than parameter types in function type.
start_element, left_element, right_element, slice_size,
lower_element, upper_element, first_element): Removed.
(value_string_slice, value_array_slice): Replaced by ...
(slice): New non-terminal, with working slice support.
(primitive_value_lparen, rparen): New non-terminals.
(maybe_tuple_elements): New non-terminal, to allow empty tuples.
(idtokentab): Added "up".
* value.h (COERCE_VARYING_ARRAY): New macro.
* valarith.c (value_subscript): Use it.
* valops.c (value_cast): Likewise. Also, do nothing if already
correct type, and allow converting from/to range to/from scalar.
* valops.c, value.h (varying_to_slice, value_slice): New functions.
* eval.c (OP_ARRAY): Add cast for array element.
* expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT): New exp_opcodes.
* valops.c (chill_varying_type): Moved function frp, here ...
* gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here.
* parse.c (length_of_subexp, prefixify_subexp): Add support
for TERNOP_SLICE, TERNOP_SLICE_COUNT.
* expprint.c (print_subexp, dump_expression): Likewise.
* eval.c (evaluate_subexp): Likewise.
* eval.c (evaluate_subexp case MULTI_SUBSCRIPT): Don't call
value_x_binop on a Chill varying string.
* ch-exp.y (match_bitstring_literal): Fix for proper endianness.
* expprint.c (print_subexp): Don't call error on OP_BITSTRING,
just print B'<unimlemented>'.
* gdbtypes.c (create_set_type): Fix bug in length calculation.
* valops.c, value.h (value_bitstring): New function.
* eval.c (evaluate_subexp): Implement support for OP_BITSTRING.
* ch-typeprint.c (chill_type_print_base): For TYPE_CODE_FUNC,
check that return type is non-void, and print in proper Chill syntax.
symbol_completion_function, takes the line buffer and the
point in the line buffer as additional arguments.
(readline_line_completion_function): New function, interface
between readline and line_completion_function.
(init_main): Use it.
(complete_command): Use line_completion_function instead of
abusing rl_line_buffer. Free completion strings after printing
them.
* symtab.c (completion_list_add_name): Recheck for duplicates
if we intend to add a modified symbol.
* gdbtypes.h (cplus_struct_type): nfn_fields_total no longer
includes the number of methods from the baseclasses.
* stabsread.c (attach_fn_fields_to_type): No longer add the
number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
the baseclass type might not have been completely filled in yet.
* symtab.c (total_number_of_methods): New function to compute
the total number of methods for a type, including the methods
from baseclasses.
(decode_line_1): Use it instead of TYPE_NFN_FIELDS_TOTAL to
allocate the symbol array for find_methods.
* stabsread.c (scan_file_globals): Add default case to minimal
symbol type switch, to avoid gcc -Wall warnings.
* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
Don't test for zero backchain pointer to recognize a signal
handler frame, if read() gets interrupted by a signal, the
backchain will be non zero.
(SIG_FRAME_FP_OFFSET): Move to here from rs6000-tdep.c,
improve comment.
(SIG_FRAME_PC_OFFSET): New definition.
(FRAME_SAVED_PC): Return saved pc from sigcontext if this
is a signal handler frame.
* rs6000-tdep.c (function_frame_info): Do not error out
if we can't access the instructions.
* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
New definition to get the function address from a function pointer.
* valops.c (find_function_addr): Use it when calling a user
function through a function pointer.
(fmbutt@engage.sps.mot.com).
* Makefile.in: Add Fortran-related files and dependencies.
* defs.h (language_fortran): New language enum.
* language.h (_LANG_fortran): Define.
(MAX_FORTRAN_DIMS): Define.
* expression.h: Reformat to standard.
(MULTI_F77_SUBSCRIPT, OP_F77_UNDETERMINED_ARGLIST,
OP_F77_LITERAL_COMPLEX, OP_F77_SUBSTR): New expression opcodes.
* gdbtypes.h (TYPE_CODE_COMPLEX, TYPE_CODE_LITERAL_COMPLEX,
TYPE_CODE_LITERAL_STRING): New type codes.
(type): New fields upper_bound_type and lower_bound_type.
(TYPE_ARRAY_UPPER_BOUND_TYPE, TYPE_ARRAY_LOWER_BOUND_TYPE,
TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): New
macros.
(builtin_type_f_character, etc): Declare.
* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_START): Define.
* f-exp.y: New file, Fortran expression grammar.
* f-lang.c: New file, Fortran language support functions.
* f-lang.h: New file, Fortran language support declarations.
* f-typeprint.c: New file, Fortran type printing.
* f-valprint.c: New file, Fortran value printing.
* eval.c (evaluate_subexp): Add code for new expression opcodes,
fix wording of error message.
* gdbtypes.c (f77_create_literal_complex_type,
f77_create_literal_string_type): New functions.
* language.c (set_language_command): Add Fortran info.
(calc_f77_array_dims): New function.
* parse.c (length_of_subexp, prefixify_subexp): Add cases for new
expression opcodes.
* symfile.c (deduce_language_from_filename): Recognize .f and .F
as Fortran source files.
* valops.c (f77_value_literal_string, f77_value_substring,
f77_value_literal_complex): New functions.
* values.c (allocate_value, record_latest_value, value_copy): Set it.
(record_latest_value): Don't mess with VALUE_LVAL of value.
* valops.c (value_assign): Check it. Reword existing error
message on not_lval.
ChangeLog valops.c
* valops.c(search_struct_method): to use unified search so type
conversion operator works in calling method. (this file should be
checked in with last commit, I missed it).
ChangeLog eval.c valops.c
* valops.c (typecmp): improve prototype matching when calling
a method. Make 'p (*(ostream *) &cout) << "lll" ' to work.
* eval.c(evalute_subexp): fix operator search problem when call
like p x.'operator+'(i).