aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
AgeCommit message (Collapse)AuthorFilesLines
1997-10-06Remove sanitized-out Magic Cap support, will never be releasedStan Shebs1-5/+0
1997-10-03 * c-lang.h, cp-valprint.c (static_field_print): Make non-static.Per Bothner1-4/+1
* parse.c, parser-defs.h (length_of_subexp): Make non-static. * jv-exp.y (FieldAccess): Handle dollar-VARIABLE as primary. (ArrayAccess): Likewise. Also remove warnings. (CastExpression): Implement (typename) UnaryExpression. (push_qualified_expression_name): Fix small bug. * jv-lang.c: Use TYPE_TAG_NAME, not TYPE_NAME for class names. (_initialize_jave_language): Fix typo (jave -> java). (java_language): Java does *not* have C-style arrays. (java_class_from_object): Make more general (and complicated). (java_link_class_type): Fix typo "super" -> "class". Handle arrays. (java_emit_char, java_printchar): New function. (evaluate_subexp_java case BINOP_SUBSCRIPT): Handle Java arrays. * jv-valprint.c (java_value_print): Implement printing of Java arrays. (java_print_value_fields): New function. (java_val_print): Better printing of TYPE_CODE_CHAR, TYPE_CODE_STRUCT.
1996-06-28 * configure,configure.in: Add target sparclet.Dawn Perchik1-2/+2
* monitor.h,monitor.c: Added monitor flags MO_NO_ECHO_ON_SETMEM (don't expect echo on setmem command), MO_RUN_FIRST_TIME (if command to start process running on target is different from one to continue execution), MO_HEX_PREFIX (if addresses from monitor have a "0x" prefix). * monitor.c,parse.c,sparc-tdep.c: Don't require strings in the registers array. This is to allow NULLs to be place holders in the tm-*.h file so that only minor changes are needed when a new processor is introduced (eg, one without floating point). * sparc-tdep.c: Conditionally remove dependancies on floating point. * sparclet-rom.c,config/sparc/sparclet.mt,config/sparc/tm-sparclet.h: New files for target sparclet. * symfile.c: Add option for 2nd parameter on load command : a load offset added to the vma of each section.
1996-02-17 * Add native support for long double data type.Stu Grossman1-1/+1
* 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.
1995-11-04 * Makefile.in (INTERNAL_CFLAGS): Add ENABLE_CFLAGS.Stu Grossman1-2/+2
* fork-child.c (fork_inferior): Add call to TARGET_CREATE_INFERIOR_HOOK to allow target specific code to get control just before the new process executes it's first instruction. * remote-mips.c (mips_initialize): Cleanup a bit. Don't try to receive a packet at first. This speeds up initialization a lot. Use TARGET_MONITOR_PROMPT instead of "<IDT>". (common_breakpoint): Use rresponse instead of rerrflg to inspect error code. * symfile.c (syms_from_objfile reread_symbols): Call TARGET_SYMFILE_POSTREAD to allow target specific code to get control after reading new symbols. * target.h: New macros TARGET_SYMFILE_POSTREAD, and TARGET_CREATE_INFERIOR_HOOK. See above for descriptions. * config/mips/{irix5.mh nm-irix5.h}: Delete nm-irix5.h. Make NAT_FILE point directly at ../nm-sysv4.h. * config/mips/{mipsm3.mh nm-m3.h}: Delete nm-m3.h. Make NAT_FILE point directly at ../nm-m3.h. * config/mips/{mipsv4.mh nm-sysv4.h}: Delete nm-sysv4.h. Make NAT_FILE point directly at ../nm-sysv4.h. * config/mips/nm-mips.h: Improve comment at top of file. * config/mips/tm-mips.h (TARGET_MONITOR_PROMPT): Change definition into a proper string. start-sanitize-gm * configure configure.in: Add support for --enable-gm. (mips*-*-magic*): Change target from magic to idt. * eval.c expprint.c expression.h parse.c remote-mips.c utils.c: Change GENERAL_MAGIC_HACKS to GENERAL_MAGIC. * magic.c magic.h: Update files from GM. * config/mips/magic.mt: Delete. No longer necessary now that we use --enable mechanism. * config/mips/tm-idt.h: Add GM stuff needed for remote GM box. * config/mips/tm-irix5.h: Add GM stuff needed for native Irix box. * config/mips/tm-magic.h: Move up to config/tm-magic.h. Move all platform specific stuff into tm-irix.h and tm-idt.h. Add defs for TARGET_SYMFILE_POSTREAD and TARGET_CREATE_INFERIOR_HOOK. end-sanitize-gm
1995-10-27 * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGETStu Grossman1-0/+5
around calls to create_longjmp_breakpoint. Why install the breakpoints if we can't find the longjmp target? * infrun.c (wait_for_inferior): Cleanup comments near call test. * remote-mips.c: Fixed a bunch of prototypes to avoid char/int complaint from picky compilers. Add comment to mips_expect. Replace all instances of sr_get_debug with remote_debug. * (mips_readchar): Don't jam init string to monitor. mips_initialize() handles that. * (mips_receive_header): Print better message when we get too much garbage. * (mips_request): Allow caller to pass in buff to allow them to analyze the returned message. * (mips_initialize): Re-do initialization to try sending a BREAK, a ^C, and then a download escape sequence. Cleanup protocol startup. Eliminate sleeps. Clear breakpoints (if using monitor breakpoints). Re-init frame. * (mips_detach): Close down target. start-sanitize-gm * (mips_resume): Pass signal down to target. * (mips_create_inferior): Start target with TARGET_SIGNAL_PWR. end-sanitize-gm * (mips_wait): Handle return status with registers, or breakpoint stuff. * (mips_kill): Add ^C handling. * (mips_insert_breakpoint mips_remove_breakpoint): Call new breakpoint stuff if enabled. * (calculate_mask remote_mips_set_watchpoint remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint): Hardware watchpoint/breakpoint stuff. * (common_breakpoint): Common code for new monitor breakpoint commands. * (mips_load): Don't use `prompt'. It's a global variable. * top.c (dont_repeat_command): New command for use in user-defined commands to suppress auto-repeat (by hittin return key). start-sanitize-gm * utils.c (request_quit): Call target_kill here. Good idea. Needs a better implementation. end-sanitize-gm * valops.c: Add start of auto function-call abandonment capability. start-sanitize-gm * c-exp.y: Add code (currently disabled) to handle GM dynamic structures (it conflicts with @!). * eval.c (evaluate_subexp_standard): ditto. * expprint.c (print_subexp dump_expression): ditto. * expression.h (enum exp_opcode): ditto. * parse.c (length_of_subexp): ditto. * configure, configure.in: Add mip*-*-magic* target. * magic.c magic.h: Special routines to handle GM stuff (like stepping through dispatcher). end-sanitize-gm
1995-10-05 * parse.c (write_dollar_variable): New function.Per Bothner1-0/+91
* c-exp.y (yylex): Replace code for recognizing '$' pseudo-variables with a call to write_dollar_variable. Simplify grammar correspondingly. * f-exp.y: Likewise. * m2-exp.y: Likewise. * ch-exp.y: Likewise. (Remove function match_dollar_tokens.) * scm-exp.c (scm_lreadr): Call write_dollar_variable to handle '$'.
1995-10-05 * expression.h (enum exp_code): Added OP_NAME.Per Bothner1-0/+2
* expprint.c (print_subexp): Add OP_NAME support. * parse.c (length_of_subexp, prefixify_subexp): Likewise. * scm-lang.c (scm_unpack, in_eval_c, scm_lookup_name): new function. * scm-lang.h: Declare builtin_type_scm; other minor tweaks. * values.c (unpack_long): If type is SCM, call scm_unpack. * scm-valprint.c (scm_val_print): Use extract_signed_integer, instead unpack_long * scm-lang.c: More Scheme expression parsing from here ... * scm-exp.c: ... to here. New file. Also, provide for gdb to evaluate simple constants and names.. * Makefile.in: Note new scm-exp.{c,o}.
1995-09-29 * defs.h (enum language): Add language_scm.Per Bothner1-0/+2
* expression.h (enum exp_code): Added OP_EXPRSTRING. * scm-lang.c: Preliminary support for Guile /SCM dialect of Scheme. * expprint.c (print_subexp): Add OP_EXPRSTRING support. * parse.c (length_of_subexp, prefixify_subexp): Likewise. * valops.c (find_function_in_inferior): New function. (value_allocate_space_in_inferior): New function. (allocate_space_in_inferior): Redefine using previous function. * Makefile.in (SFILES): Add scm-lang.c. (COMMON_OBS): Add scm-lang.o
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-03-14 * valops.c (value_cast, value_slice), parse.c (follow_types): AddJim Kingdon1-0/+4
FIXME-type-allocation comments.
1995-02-17 * parse.c (follow_types): Given (TYPE[]) (i.e. with no length),Per Bothner1-12/+10
create a 0-length array type, and set BOUND_CANNOT_BE_DETERMINED. * valops.c (value_cast): If a cast like (TYPE[])VALUE (i.e. array of unknown length) use sizeof(VALUE)/sizeof(TYPE) as the length. * c-typeprint.c (c_type_print_varspec_suffix): If array length is 0, print it, but not if upper_bound is BOUND_CANNOT_BE_DETERMINED.
1995-02-02 * f-typeprint.c (f_type_print_varspec_suffix): Print array indexPer Bothner1-14/+0
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.
1995-02-02 * eval.c (evaluate_subexp): Clean up handling ofPer Bothner1-2/+2
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-02-01 * ch-exp.y (value_string_element, string_primitive_value,Per Bothner1-0/+4
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.
1995-01-20 * expression.h (OP_LABELED): New operator, for ChillPer Bothner1-0/+2
labeled structre tuples. * ch-exp.y (tuple_element, named_record_element, tuple_elements): New non-terminals, to handle labeled structure tuples. (tuple): Re-define using tuple_elements. * eval.c (evaluate_labeled_field_init): New function, to handle initialization of structure fields, possibly using OP_LABELED. (evaluate_subexp): Use it. * expprint.c (print_subexp case): For OP_ARRAY, use Chill syntax for Chill. Handled OP_LABELED. * parse.c (length_of_subexp, prefixify_subexp): Handle OP_LABELED. * eval.c (evaluate_subexp): Handle Chill Powerset tuples. * valarith.c (value_bit_index): Just treat bitstring as represented by an array of bytes. Alignment is handled by compiler.
1995-01-17 * parse.c (_initialize_parse): Improve wording of names ofJim Kingdon1-3/+4
msym_*_symbol_type.
1995-01-17 * parse.c (write_exp_msymbol): Use new variablesJim Kingdon1-4/+22
msym_*_symbol_type as type of msymbol expression. (_initialize_parse): Initialize them.
1994-12-02 * parse.c (msymbol_addr_type): Replaced byPeter Schauer1-12/+1
lookup_pointer_type (builtin_type_void). * printcmd.c (_initialize_printcmd): Give examine_*_type a name for `ptype $_'. * printcmd.c (print_formatted): Call val_print_string directly, rather than via value_print.
1994-08-19 Initial Fortran language support, adapted from work by Farooq ButtStan Shebs1-2/+28
(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.
1994-04-20 * parse.c: Don't define block_found; it is defined in symtab.c.Jim Kingdon1-1/+0
* parser-defs.h: Add comment regarding block_found.
1994-03-15 For Sunos 4.x targets, enable gdb to set breakpoints in sharedPeter Schauer1-0/+1
library functions before the executable is run. Retrieve dynamic symbols from stripped executables. * symtab.h (minimal_symbol_type): Add mst_solib_trampoline type. * parse.c (write_exp_msymbol), symmisc.c (dump_msymbols), symtab.c (list_symbols): Handle mst_solib_trampoline. * minsyms.c (lookup_minimal_symbol): Handle mst_solib_trampoline for all targets, remove IBM6000_TARGET dependencies. * dbxread.c (read_dbx_dynamic_symtab): New function. * dbxread.c (dbx_symfile_read): Use it. * dbxread.c (SET_NAMESTRING): Set namestring to "<bad string table index>" instead of "foo" if the string index is corrupt. * xcoffread.c (read_xcoff_symtab): Use mst_solib_trampoline instead of mst_unknown. * symtab.c (list_symbols): Take from_tty as parameter and pass it to break_command. Handle mst_file_* minimal symbol types.
1994-03-08 * parser-defs.h: Add "extern" to start of variable declarations soJim Kingdon1-1/+16
we don't end up with commons. * parse.c: Define these variables.
1994-02-08 * README: Remove note about gcc warnings on alpha, these should bePeter Schauer1-0/+1
gone now. * c-exp.y, ch-exp.y, core.c, corelow.c, eval.c, fork-child.c, m2-exp.y, minsyms.c, nlmread.c, parse.c, putenv.c, regex.c remote-utils.c, stabsread.c: Include <string.h>. * regex.c: Include "defs.h", change re_comp argument to const char *. * infptrace.c (fetch_register, store_inferior_registers): Change regaddr to type CORE_ADDR. * config/alpha/alpha-nw.mt, config/alpha/alpha-osf1.mt (MT_CFLAGS): Remove, no longer necessary now that we use bfd_vma for a CORE_ADDR.
1994-01-27 * parse.c (write_exp_msymbol): Use new type msymbol_addr_type insteadJim Kingdon1-2/+13
of builtin_type_long. It is necessary to get a type which is TARGET_PTR_BIT bits in size; builtin_type_long might not be big enough.
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-2/+2
Change all references to stdout/stderr to gdb_stdout/gdb_stderr. Replace all calls to stdio output functions with calls to corresponding _unfiltered functions (`fprintf_unfiltered') Replaced calls to fopen for output to gdb_fopen. Added sufficient goo to utils.c and defs.h to make the above work. The net effect is that stdio output functions are only directly used in utils.c. Elsewhere, the _unfiltered and _filtered functions and GDB_FILE type are used. In the near future, GDB_FILE will stop being equivalant to FILE. The semantics of some commands has changed in a very subtle way: called in the right context, they may cause new occurences of prompt_for_continue() behavior. The testsuite doesn't notice anything like this, though. Please respect this change by not reintroducing stdio output dependencies in the main body of gdb code. All output from commands should go to a GDB_FILE. Target-specific code can still use stdio directly to communicate with targets.
1993-10-24Sun Oct 24 20:16:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)Jim Kingdon1-0/+36
* parse.c, parser-defs.h (write_exp_msymbol): New function to write the appropriate expression for a minimal symbol. * c-exp.y, m2-exp.y: Use it.
1993-10-18 * parse.c, parser-defs.h (follow_types): New function.Jim Kingdon1-0/+47
* c-exp.y (ptype : typebase abs_decl): Use it. * c-exp.y (ptype): Add support for type qualifiers after the typebase. The typebase rule already has support for them before the typebase. * Makefile.in: Change the expected number of shift/reduce conflicts to 6. This is OK--the 2 new conflicts are basically the same as one of the old ones.
1993-08-18 * blockframe.c (block_innermost_frame): Uncomment.Jim Kingdon1-2/+11
Return NULL if passed NULL. * frame.h: Declare it. * expression.h (union exp_element): Add field block. * parse.c (write_exp_elt_block): New function. * expression.h (OP_VAR_VALUE): Now takes additional struct block *. * *-exp.y: Write block for OP_VAR_VALUE. * eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE. * valops.c, value.h (value_of_variable), callers: Add second argument, for block.
1993-02-03 * c-exp.y (lcurly, rcurly): New nonterminals.Fred Fish1-2/+17
* c-exp.y (exp): Use lcurly and rcurly for arrays and UNOP_MEMVAL constructs. * parse.c (free_funcalls): Moved prototype from parser-defs.h, made function static. * parse.c (struct funcall): Moved struct def from parser-defs.h. * parse.c (funcall_chain): Moved from parser-defs.h, made static. * parse.c (start_arglist): * parser-defs.h (free_funcalls): Moved prototype to parse.c. * parser-defs.h (struct funcall): Moved struct def to parse.c. * parser-defs.h (funcall_chain): Moved to parse.c. * printcmd.c (print_frame_nameless_args): Fix prototype. * tm-mips.h (setup_arbitrary_frame): Fix prototype. * tm-sparc.h (setup_arbitrary_frame): Fix prototype. * valops.c (typecmp): Moved prototype from values.h. * value.h (typecmp): Moved prototype to valops.c, made static. **** start-sanitize-chill **** * ch-exp.y (yylex): Change way control sequences are disabled. **** end-sanitize-chill ****
1993-02-01 * remote-z8k.c, z8k-tdep.c: support for the Z8001 and Z8002.Steve Chamberlain1-0/+8
* parse.c (std_regs): Only declare if NO_STD_REGS is defined.
1993-01-31Fix whitespace.Michael Tiemann1-1/+1
1993-01-16 * c-exp.y (exp:STRING): Convert C strings into array-of-charFred Fish1-0/+14
constants with an explicit null byte terminator. OP_STRING is now used for real string types. * c-lang.c (builtin_type_*): Move declarations to lang.c since they are used by all languages. * c-lang.c (_initialize_c_language): Move initializations of builtin_type_* to lang.c. * c-typeprint.c (c_type_print_varspec_prefix, c_type_print_varspec_suffix): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * c-valprint.c (c_val_print): Change the way character arrays are printed as strings to be consistent with the way strings are printed when pointer-to-char types are dereferenced. Remove test of print_max before calling val_print_string, which now does it's own test. * eval.c (evaluate_subexp): Add case for OP_ARRAY. * expprint.c (print_subexp, dump_expression): Add case for OP_ARRAY. * expression.h (enum exp_opcode): Add OP_ARRAY and document. * gdbtypes.c (builtin_type_*): Add declarations moved from c-lang.c. * gdbtypes.c (create_string_type): New function to create real string types. * gdbtypes.c (recursive_dump_type): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * gdbtypes.c (_initialize_gdbtypes): Add initializations of builtin_type_* types moved from c-lang.c. * gdbtypes.h (enum type_code): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * gdbtypes.h (builtin_type_string): Add extern declaration. * gdbtypes.h (create_string_type): Add prototype. * m2-lang.c (m2_create_fundamental_type): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * m88k-tdep.c (pushed_size): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * mipsread.c (_initialize_mipsread): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * parse.c (length_of_subexp, prefixify_subexp): Add case for OP_ARRAY. * printcmd.c (print_formatted): Recognize TYPE_CODE_STRING. * typeprint.c (print_type_scalar): TYPE_CODE_PASCAL_ARRAY renamed to TYPE_CODE_STRING. * valops.c (allocate_space_in_inferior): New function and prototype, using code ripped out of value_string. * valops.c (value_string): Rewritten to use new function allocate_space_in_inferior, but temporarily disabled until some other support is in place. * valops.c (value_array): New function to create array constants. * valprint.c (val_print_string): Add comment to document use, complete rewrite to fix several small buglets. * value.h (value_array): Add prototype. * value.h (val_print_string): Change prototype to match rewrite. **** start-sanitize-chill **** * ch-valprint.c (chill_val_print): Add case for TYPE_CODE_STRING. * ch-exp.y (match_character_literal): Disable recognition of control sequence form of character literals and document why. **** end-sanitize-chill ****
1993-01-06 * defs.h (HOST_CHAR_BIT): New macro, defaults to either CHAR_BITFred Fish1-24/+78
from a configuration file (typically including <limits.h>), or to TARGET_CHAR_BIT if CHAR_BIT is not defined. * eval.c (evaluate_subexp): Use new BYTES_TO_EXP_ELEM macro. * eval.c (evaluate_subexp): Add case for OP_BITSTRING. * expprint.c (print_subexp): Use new BYTES_TO_EXP_ELEM macro. * exppritn.c (print_subexp, dump_expression): Add case for OP_BITSTRING. * expression.h (OP_BITSTRING): New expression element type for packed bitstrings. * expression.h (EXP_ELEM_TO_BYTES, BYTES_TO_EXP_ELEM): New macros to convert between number of expression elements and bytes to store that many elements. * i960-tdep.c (leafproc_return): Use new macros to access minimal symbol name and address fields. * m88k-pinsn.c (sprint_address): Use new macros to access minimal symbol name and address fields. * nindy-tdep.c (nindy_frame_chain_valid): Use new macro to access minimal symbol address field. * parse.c (write_exp_elt, write_exp_string, prefixify_expression, parse_exp_1): Use new EXP_ELEM_TO_BYTES macro. * parse.c (write_exp_string, length_of_subexp, prefixify_expression): Use new BYTES_TO_EXP_ELEM macro. * parse.c (write_exp_bitstring): New function to write packed bitstrings into the expression element vector. * parse.c (length_of_subexp, prefixify_subexp): Add case for OP_BITSTRING. * parser-defs.h (struct stoken): Document that it is used for OP_BITSTRING as well as OP_STRING. * parser-defs.h (write_exp_bitstring): Add prototype. **** start-sanitize-chill **** * ch-exp.y (BIT_STRING_LITERAL): Change token type to sval. * ch-exp.y (NUM, PRED, SUCC, ABS, CARD, MAX, MIN, SIZE, UPPER, LOWER, LENGTH): New tokens for keywords. * ch-exp.y (chill_value_built_in_routine_call, mode_argument, upper_lower_argument, length_argument, array_mode_name, string_mode_name, variant_structure_mode_name): New non-terminals and productions. * ch-exp.y (literal): Useful production for BIT_STRING_LITERAL. * ch-exp.y (match_bitstring_literal): New lexer support function to recognize bitstring literals. * ch-exp.y (tokentab6): New token table for 6 character keywords. * ch-exp.y (tokentab5): Add LOWER, UPPER. * ch-exp.y (tokentab4): Add PRED, SUCC, CARD, SIZE. * ch-exp.y (tokentab3): Add NUM, ABS, MIN, MAX. * ch-exp.y (yylex): Check tokentab6. * ch-exp.y (yylex): Call match_bitstring_literal. **** end-sanitize-chill ****
1993-01-02 * eval.c (evaluate_subexp): Add case MULTI_SUBSCRIPT.Fred Fish1-2/+14
* expprint.c (print_subexp): Rename BINOP_MULTI_SUBSCRIPT to MULTI_SUBSCRIPT. * expprint.c (dump_expression): New function for dumping expression vectors during gdb debugging. * expression.h (BINOP_MULTI_SUBSCRIPT): Name changed to MULTI_SUBSCRIPT and moved out of BINOP range. * expression.h (DUMP_EXPRESSION): New macro that calls dump_expression if DEBUG_EXPRESSIONS is defined. * m2-exp.y (BINOP_MULTI_SUBSCRIPT): Changed to MULTI_SUBSCRIPT. * parse.c (length_of_subexp, prefixify_subexp): Change BINOP_MULTI_SUBSCRIPT to MULTI_SUBSCRIPT. * parse.c (parse_exp_1): Call DUMP_EXPRESSION before and after prefixify'ing the expression. * printcmd.c (print_command_1): Add comment. **** start-sanitize-chill **** * ch-exp.y (expression_list): Add useful actions. * ch-exp.y (value_array_element): Add useful actions. * ch-exp.y (array_primitive_value): Add production. * ch-exp.y (yylex): Recognize ',' as a token. **** end-sanitize-chill ****
1992-11-25 * parse.c (write_exp_string): Complete rewrite to store stringFred Fish1-20/+54
contants as a leading explicit length, followed by the string data, followed by a trailing explicit length. * eval.c (evaluate_subexp), expprint.c (print_subexp), parse.c (length_of_subexp), parse.c (prefixify_subexp): Use recorded explicit length of strings in expression elements, rather than strlen. Adjust code to skip over strings stored in expression elements, and code to access strings, to account for new leading explicit size expression element. * parse.c (length_of_subexp): Test for minimum endpos of 1, not 0, to avoid negative expression element indices. * valops.c (search_struct_method): Minor whitespace change.
1992-09-10Removed a large number of changes inserted by Per BothnerJohn Gilmore1-6/+6
for C++ support. These will go back in when they've been examined.
1992-09-04A ton of changes to improve C++ debugging. See ChangeLog.Per Bothner1-6/+6
1992-07-04 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,Fred Fish1-4/+4
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c, eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c, i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c, infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c, putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c, sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c, tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Remove "(void)" casts from function calls where the return value is ignored, in accordance with GNU coding standards.
1992-06-29 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,Fred Fish1-5/+5
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint. * breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c, findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c, putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c, values.c: Replace bcopy() use with memcpy(), which is more standard and can take advantage of gcc's builtin functions for increased performance. * breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c, ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h, target.c, values.c: Replace bzero() use with memset(), which is more standard and can take advantage of gcc's builtin functions for increased performance. * i386-tdep.c, main.c, valprint.c: Replace bcmp() use with memcmp(), which is more standard and can take advantage of gcc's builtin functions for increased performance.
1992-03-29LintJohn Gilmore1-2/+2
1992-03-03Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)Michael Tiemann1-1/+0
* All GDB files that #include defs.h: Removed stdio.h. (defs.h): #include stdio.h. This has been tested by building GDBs for all targets hosted on Sun4. None of the build problems were related to stdio.h inclusion. (n.b. many configurations don't build for other reasons.)
1992-02-22* Check in Fred Fish's changes in these modules. FredJohn Gilmore1-9/+17
will make ChangeLog entries for all of them.
1991-11-21* defs.h: Incorporate param.h. All users changed.John Gilmore1-1/+0
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
1991-09-19* parse.c: New file with the common code remains of expread.y.John Gilmore1-0/+628
* expread.y, expread.tab.c: Remove. * parser-defs.h: New file with common declarations from expread.y. * c-exp.y: New file with the C parser from expread.y. * m2-exp.y: New file with the Modula-2 parser.