summaryrefslogtreecommitdiffstats
path: root/gdb/f-typeprint.c
Commit message (Collapse)AuthorAgeFilesLines
* import gdb-2000-02-01 snapshotJason Molenda2000-02-021-15/+15
|
* import gdb-1999-07-07 post reformatJason Molenda1999-07-071-49/+49
|
* Initial creation of sourceware repositoryStan Shebs1999-04-161-0/+458
|
* Initial creation of sourceware repositoryStan Shebs1999-04-161-458/+0
|
* all remaining *.c *.h files from hp merge.David Taylor1998-12-311-11/+13
|
* See gdb ChangeLog entry with header:Fred Fish1996-07-261-1/+3
| | | | | | | Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com> for a rather huge set of changes. I was going to put them here, but it made cvs dump core. :-(
* * core-aout.c (fetch_core_registers): Cast core_reg_size to intFred Fish1996-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * f-typeprint.c, valarith.c, valprint.c, typeprint.c, eval.c:Per Bothner1995-11-301-15/+9
| | | | | | | | | | 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.
* Update FSF address.Fred Fish1995-08-021-1/+1
|
* * configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1995-08-011-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.
* * dache.c (struct dcache_block): Change data member from unsigned charFred Fish1995-07-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* * utils.c (fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,J.T. Conklin1995-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | printf_filtered, printf_unfiltered, printfi_filtered, query, warning, error, fatal, fatal_dump_core): Use stdarg.h macros when compiling with an ANSI compiler. * complain.c (complain): Likewise. * language.c (type_error, range_error): Likewise. * monitor.c (monitor_printf, monitor_printf_noecho): Likewise. * remote-array.c (printf_monitor, debuglogs): Likewise. * remote-mips.c (mips_error): Likewise. * remote-os9k.c (printf_monitor): Likewise. * remote-st.c (printf_stdebug): Likewise. * gdbtk.c (gdbtk_query): Likewise. * defs.h, complain.h, language.h, monitor.h: Add prototypes to match above changes. * printcmd.c: Remove uneeded #include <varargs.h>. * remote-e7000.c: Likewise. * f-typeprint.c (f_type_print_base): Fix typo found by above changes.
* * f-typeprint.c (f_type_print_varspec_suffix): Print array indexPer Bothner1995-02-021-3/+7
| | | | | | | | | | | ranges in reverse order. * f-valprint.c (f77_create_arrayprint_offset_tbl): Fix calculation. * eval.c (evaluate_subscript): Don't call value_subscript, since it adjusts for lower bound and enforces ranges. * expression.h (exp_code): Remove MULTI_F77_SUBSCRIPT, OP_F77_SUBSTR. * eval.c, parse.c: Removed uses of removed opcodes.
* * eval.c (evaluate_subexp): Clean up handling ofPer Bothner1995-02-021-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * c-typeprint.c (c_type_print_varspec_prefix,Stan Shebs1994-09-071-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Initial Fortran language support, adapted from work by Farooq ButtStan Shebs1994-08-191-0/+457
(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.
OpenPOWER on IntegriCloud