aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-lang.c
AgeCommit message (Collapse)AuthorFilesLines
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-08-01* configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1-1/+1
strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-07-18 * dache.c (struct dcache_block): Change data member from unsigned charFred Fish1-0/+2
to char, since everything passed in and out of dcache is char or casted to appropriate type anyway. (dcache_alloc): Move assignment of db out of test and combine separate tests into if-else. (dcache_peek_byte): Change ptr from unsigned char* to char*. (dcache_peek_byte): Remove now unnecessary cast in read_memory call. (dcache_peek): Change cast of incoming data arg. (dcache_poke): Change cast of addr of incoming data arg. (dcache_info): Mask data passed to printf_filtered to lsbyte only. (dcache_info): Change printf_filtered arg from "% 2x" to " %2x". * target.c (debug_to_thread_alive): Change return type to int and return zero, for type compatibility with other *_thread_alive funcs. (cleanup_target): Change cast of ignore function to match type of the to_thread_alive member. * defs.h (error_hook): Add ATTR_NORETURN. * defs.h (NORETURN, ATTR_NORETURN): Switch from volatile to __attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug. * remote.c (remote_wait): Cast first arg to strtol, strchr, and strncmp to "const char *" from "unsigned char *". (remote_wait): Cast arg to putpkt and strcpy from "unsigned char *" to "char *". (remote_wait): Change printf format for long arg from "%d" to "%ld". (getpkt): Remove unused variable "bp". (remote_fetch_word, remote_store_word): Ifdef out apparently unused functions. * breakpoint.c (watchpoint_check): Removed unused variables "saved_level" and "saved_frame". * valops.c (value_arg_coerce): Add other enum TYPE_CODE_* and default cases to switch for completeness. * infrun.c (wait_for_inferior): Enclose "have_waited" label in #ifdef that matches the one in which it is referenced. * ser-unix.c (hardwire_noflush_set_tty_state): Enclose otherwise unused variable "state" in #ifdef that matches one in which it is referenced. * eval.c (evaluate_subexp_standard): Remove unused variable "var". * eval.c (evaluate_subexp_standard): Remove unused variable "tmp_symbol". * valarith.c (value_subscript): Remove unused variable "lowerbound", which is redeclared in a nested scope prior to use. * printcmd.c (print_frame_nameless_args): Use "%ld" to print long arg, not "%d". * {mem-break.c, remote-pa.c, remote.c, saber.suppress}: Remove unused static var "check_break_insn_size". * buildsym.c (finish_block): Add other enum LOC_* and default cases to switch for completeness. ch-lang.c (type_lower_upper): Removed unused label "retry". Add other enum TYPE_* and default cases to switch for completeness. * f-typeprint.c (f_type_print_args): Ifdef out unused function that may be used someday when Fortran support is complete. * ch-valprint.c (chill_print_type_scalar): Add other enum TYPE_* and default cases to switch for completeness. (chill_val_print): Remove unused local var "high_bound" that is redeclared in a nested scope prior to use. (chill_var_print): Use "%ld" to print long arg, not "%d". * regex.c (re_compile_fastmap, re_match_2): Add remaining enum types and default to switches for completeness. * minsyms.c (lookup_minimal_symbol_text): Delete unused variable "trampoline_symbol". (prim_record_minimal_symbol_and_info): Return NULL rather than trash. * elfread.c (elf_symtab_read): Don't dereference NULL returns from record_minimal_symbol_and_info. * f-lang.c (saved_function_list_end): Ifdef out unused variable that may be used someday. * f-valprint.c (f_val_print): Remove unused local variable "straddr".
1995-02-12 * language.h (struct language_defn): New field evaluate_exp.Per Bothner1-0/+1
* c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn), f-lang.c (f_language_defn), language.c (unknown_language_defn, auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn): Set evaluate_exp to evaluate_subexp_standard. * ch-lang.c (evaluate_subexp_chill): New function. Chill-specific support for MULTI_SUBSCRIPT. (chill_language_defn): Set evaluate_exp to evaluate_subexp_chill. * eval.c (enum noside): Move from here .... * expression.h (enum noside): ... to here. (evaluate_subexp_standard): New prototype. * eval.c (evaluate_subexp): Renamed to evaluate_subexp_standard. Removed lo-longer-needed test for chill_varying_type. (evaluate_subexp): New. Calls exp->language_defn->evaluate_exp.
1995-02-02 * eval.c (evaluate_subexp): Clean up handling ofPer Bothner1-28/+35
OP_UNDETERMINED_ARGLIST (no backtracking, more general). * f-valprint.c (f_val_print): Print TYPE_CODE_STRING using LA_PRINT_STRING, and not val_print_string (which reads from inferior). * ch-lang.c (chill_is_varying_struct), ch-lang.h: Remve function duplicate function made redundant by chill_varying_type. Re-write of f77 string and complex number support: * language.h (struct language_defn): New fields string_lower_bound and string_char_type. * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn), language.c (unknown_language_defn, auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn), f-lang.c (f_language_defn), ch-lang.c (chill_language_defn): Set new fields. * gdbtypes.c (create_string_type): Use new string_char_type field. * valops.c (value_string): Use new string_lower_bound field. * defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT): Removed. * f-lang.c (f_create_fundamental_type, _initialize_f_language), m2-lang.c (m2_create_fundamental_type), gdbtypes.c (_initialize_gdbtypes): Set TYPE_TARGET_TYPE of complex types. Set their TYPE_CODEs to TYPE_CODE_COMPLEX. * mdebugread.c (mdebug_type_complex, mdebug_type_double_complex): Removed. Use builtin_type_complex and builtin_type_double_complex. * gdbtypes.h (enum type_code): Removed TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX. * c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c: Removed uses of TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX. * gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type, f77_create_literal_string_type): Removed. * value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR, VALUE_SUBSTRING_MYADDR): Removed. * expression.h (enum exp_opcode): Rename OP_F77_LITERAL_COMPLEX to OP_COMPLEX. * parse.c: Update accordingly. * f-valprint.c (f77_print_cmplx): Removed. (f_val_print case TYPE_CODE_COMPLEX): Re-write to use print_floating. * f-exp.y (STRING_LITERAL): Use OP_STRING instead of OP_ARRAY. * eval.c (evaluate_subexp): For case OP_ARRAY, don't call f77_value_literal_string. * valops.c, value.h (f77_value_literal_string, f77_value_substring, f77_assign_from_literal_string, f77_assign_from_literal_complex): Removed. (value_assign): No longer need to handle literal types. * valops.c (f77_value_literal_complex), value.h: Re-written and renamed to value_literal_complex. Last arg is now a (complex) type. * valops.c (f77_cast_into_complex): Re-written and renamed to cast_into_complex. * eval.c (evaluate_subexp): Update accordingly.
1995-01-26 * language.h (struct language_defn): New field c_style_arrays.Per Bothner1-0/+1
* language.c (unknown_language_defn, auto_language_defn, local_language_defn), c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn): Set c_style_arrays to true. * m2-lang.c (m2_language_defn), ch-lang.c (chill_language_defn), f-lang.c (f_language_defn): Set c_style_arrays to false. * valops.c (value_string): If c_style_array is not set, allocate string in gdb (not inferior) using allocate_value. * value.h (COERCE_ARRAY), valops.c (value_addr, value_arg_coerce): Only call value_coerce_array if current_language->c_style_arrays. * values.c: Add #include "language.h". (Needed for COERCE_ARRAY.) * valops.c (chill_varying_type): New predicate. * valops.c (value_cast): Support assigning a fixed string or array to a variable string/array structure. * valarith.c (value_subscripted_rvalue): Extra parameter lowerbound. Check index>=lowerbound, and then add lowerbound to index here, instead of in caller. Generalize to arbitrary lval_types. (value_subscript): Use enhanced value_subscripted_rvalue if c_style_arrays is false (and index is in range).
1994-12-12 * f-lang.c: Remove duplicate declaration ofJim Kingdon1-3/+2
builtin_type_f_integer, and only include it in the f_builtin_types once. * somread.c (som_symfile_read): Just assign to objfile->obj_private, not OBJ_UNWIND_INFO. Assigning to a cast is a GCC-ism which the HP compiler doesn't like.
1994-09-07 * c-typeprint.c (c_type_print_varspec_prefix,Stan Shebs1-1/+1
c_type_print_varspec_suffix): Add cases for Fortran type codes. * eval.c (evaluate_subexp): For OP_ARRAY expressions in Fortran, call f77_value_literal_string instead. * f_exp.y: Include <string.h>, move include of parser-defs.h. (parse_number): Translate 'd' floats to 'e' so atof() works. (yylex): Remove unused variables. * f-lang.c: Include <string.h>. (get_bf_for_fcn): Remove unused variable. * f-typeprint.c (f_type_print_varspec_prefix, f_type_print_varspec_suffix): Remove unused variables, add cases to switch statements. (f_type_print_base): Remove unused variables. * f-valprint.c (gdbcore.h, command.h): Include. (f77_get_dynamic_lowerbound, f77_get_dynamic_upperbound): Call read_memory_integer with correct number of arguments. (f77_get_dynamic_upperbound): Call f77_get_dynamic_lowerbound with correct argument type. (f77_print_array): Removed unused array array_size_array. (f_val_print): Don't use a CORE_ADDR as a char *. * valops.c (value_cast): Handle COMPLEX and BOOL types. (value_assign): Handle Fortran literal string and complex values. (f77_cast_into_complex, f77_assign_from_literal_string, f77_assign_from_literal_complex): New functions.
1994-08-19 Initial Fortran language support, adapted from work by Farooq ButtStan Shebs1-0/+945
(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.