aboutsummaryrefslogtreecommitdiff
path: root/gdb/ch-exp.y
AgeCommit message (Collapse)AuthorFilesLines
1995-11-30 * ch-exp.y: Replaced by ...Per Bothner1-1664/+0
* 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.
1995-10-09 * ch-exp.y (yylex): Also look for '$' following '$'.Per Bothner1-1/+1
1995-10-08fix typoMichael Meissner1-1/+1
1995-10-05 * parse.c (write_dollar_variable): New function.Per Bothner1-150/+8
* 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-08-05 * ch-exp.y (write_lower_upper_value): Add prototype so bisonFred Fish1-1/+4
generated parser will insert prototype before first func usage. Bison and byacc order the output sections differently. Also make function static.
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-06-14 * ch-exp.y: Remove lots of unsupported productions and names.Per Bothner1-265/+48
Add support for IF-expressions, ORIF, ANDID, NUM, and ADDR. This makes progress for PR 5826.
1995-06-14 * parser-defs.h (enum precedence): Added PREC_BUILTIN_FUNCTION.Per Bothner1-30/+24
* expression.h (enum exp_opcode): Added UNOP_LOWER, UNOP_UPPER, UNUP_LENGTH. * expprint.c (dump_expression): Handle the new exp_opcodes. (print_subexp): Handle PREC_BUILTIN_FUNCTION. (print_simple_m2_func): Removed. (print_subexp): Remove support for Modula2 builtin functions. * m2-lang.c (m2_op_print_tab): Add support for builtin functions. * ch-exp.y: Parse LOWER, UPPER, and LENGTH builtins. (write_lower_upper_value): Convenience function for LOWER and UPPER. (upper_lower_argument, length_argument): Removed non-terminals. * ch-lang.c (chill_op_print_tab): Entries for UPPER, LOWER, LENGTH. (type_lower_upper): New function. Calculate LOWER/UPPER of type. (value_chill_length): New function. Calcalate LENGTH of ARRAY/STRING. (evaluate_subexp_chill): Handle UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH. This fixes PR 5015 (and 5826 which is a duplicate).
1995-06-08 * ch-exp.y: Handle <primitive_value> "->" <modename>.Per Bothner1-0/+7
This fixes PR chill/6932.
1995-03-01Add Linux yacc suport.Michael Meissner1-0/+9
1995-02-22 * ch-exp.y (expression_conversion): Recognize 'ARRAY () TYPE (EXPR)'Per Bothner1-0/+18
(same as C's '(TYPE[])EXPR')
1995-02-12 * ch-exp.y (maybe_expression_list): New non-terminal.Per Bothner1-1/+8
(primitive_value): Allow empty parameter list.
1995-02-01 * ch-exp.y (value_string_element, string_primitive_value,Per Bothner1-58/+25
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-23 Add support for Chill bitstring literals (e.h. H'FF00').Per Bothner1-15/+20
* 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.
1995-01-20 * expression.h (OP_LABELED): New operator, for ChillPer Bothner1-2/+30
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-04 * ch-exp.y (literal): Recognize NULL.Per Bothner1-5/+30
(tuple): Parse simple unlabelled tuples. * eval.c (evaluate_subexp case OP_ARRAY): Use expect_type to evaluate brace-initializer-expressions depending on context. (evaluate_subexp case UNOP_CAST): Pass the target type as expected type when evaluating the expression.
1994-11-11 * ch-exp.y (yylex): Fix off-by-one error when converting string toJeff Law1-1/+2
lowercase. Null terminate new string.
1994-09-16 * ch-exp.y: Get rid of some extra non-terminals, and movePer Bothner1-68/+23
their rules into primitive_value. * ch-lang.c (chill_op_print_tab): Add '->'. * expprint.c (print_subexp): Recognize unary postfix operator.
1994-07-07 * ch-exp.y (match_simple_name_string): Don't lower-case here.Per Bothner1-11/+20
* ch-exp.y (yylex): First try name lookup using exact name typed by user; if that fails, try lower-cased name.
1994-05-12Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-10/+2
* c-exp.y (yyerror): Display a more informative error message. * ch-exp.y (yyerror): Ditto, don't use global yychar. * m2-exp.y (yyerror): Ditto.
1994-03-30 * ch-exp.y (decode_integer_value, match_character_literal,Peter Schauer1-3/+7
match_bitstring_literal): Guard tolower calls with isupper, tolower on old BSD systems blindly subtracts a constant. * dbxread.c (read_ofile_symtab): Check for __gnu_compiled_* as well when determining the producer of the object file. * mdebugread.c (has_opaque_xref): New function to check for cross reference to an opaque aggregate. * mdebugread.c (parse_symbol, parse_partial_symbols): Do not enter typedefs to opaque aggregates into the symbol tables. * mdebugread.c (parse_external): Remove skip_procedures argument, it has always been 1. Remove code that handled stProc symbols, it was never executed and was wrong, as the index of a stProc symbol points to the local symbol table and not to the auxiliary symbol info. Update caller. * mdebugread.c (parse_partial_symbols): Do not enter external stProc symbols into the partial symbol table, they are already entered into the minimal symbol table. * config/i386/tm-symmetry.h: Clean up, it is now only used for Dynix. Remove all conditionals and definitions for ptx. I386_REGNO_TO_SYMMETRY moved to here from symm-tdep.c. Fix addresses of floating point registers in REGISTER_U_ADDR. STORE_STRUCT_RETURN now handles cc and gcc conventions. FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET defined to make backtracing through signal trampoline code work. * config/i386/xm-symmetry.h: Clean up, it is now only used for Dynix. Remove all conditionals and definitions for ptx. Remove KDB definitions. * symm-nat.c (store_inferior_registers): Fetch registers before storing them to obtain valid floating point control registers. Store fpu registers. * symm-nat.c (print_1167_control_word): Dynix 3.1.1 defines FPA_PCR_CC_C0 and FPA_PCR_CC_C1, avoid duplicate case value. * symm-nat.c (fetch_inferior_registers, child_xfer_memory): Fix typos. * symm-nat.c (child_resume): Update type of `signal' parameter. * symm-tdep.c (I386_REGNO_TO_SYMMETRY): Moved to tm-symmetry.h.
1994-03-30 * ch-exp.y: Implement SIZE(mode_name) and SIZE(expression).Per Bothner1-9/+8
1994-03-04 * ch-exp.y (match_simple_name_string): Accept '_' as well as anJim Kingdon1-1/+1
alphabetic character as the start of a name.
1994-02-08 * README: Remove note about gcc warnings on alpha, these should bePeter Schauer1-1/+2
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-23 * ch-exp.y (match_string_literal): Allow a zero-length string.Per Bothner1-3/+2
* ch-lang.c (chill_printstr): Don't print zero-length string funny.
1993-12-21 * ch-exp.y (match_dollar_tokens): Fix off-by-one bug.Per Bothner1-1/+1
* ch-lang.c (chill_is_varying_struct), ch-lang.h: New function. * ch-lang.c (chill_printstr): Use double quotes, not single quotes. * ch-typeprint.c (chill_type_print_base): Handle TYPE_CODE_BITSTRING. Improve printing of TYPE_CODE_STRING, TYPE_CODE_SET, and TYPE_CODE_STRUCT (including checking chill_is_varying_struct). Print TYPE_DUMMY_RANGE by printing its TYPE_TARGET_TYPE. Handle TYPE_CODE_ENUM. * ch-valprint.c (chill_val_print): Handle TYPE_CODE_BITSTRING. For TYPE_CODE_STRING, never print address. Handle VARYING strings. * gdbtypes.c (force_to_range_type): New. * gdbtypes.c (create_set_type): Make work, following Chill layout. * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND, TYPE_DUMMY_RANGE): New. * stabsread.c (read_type): Distinguish string and bitstring from char-array and set. * valarith.c (value_subscript), valops.c (value_coerce_array): Handle STRINGs as well as ARRAYs. * valarith.c (value_bit_index): Fix think. Use new macros.
1993-12-14 Implement support for Chill POWERSETs.Per Bothner1-1/+1
* ch-exp.y (operand_2): Implement 'Element IN PowerSet'. * ch-typeprint.c (chill_type_print_base): Handle POWERSETs. * ch-valprint.c (chill_val_print): Handle TYPE_CODE_SET. * eval.c (evaluate_subexp): Implement BINOP_IN. * expression.h (enum exp_opcode): Added BINOP_IN. * gdbtypes.c (create_set_type), gdbtypes.h: New function. * stabsread.c (read_type): If 'S', create a set type. * valarith.c (value_bit_index, value_in), value.h: New functions, for indexing in SETs.
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-1/+1
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-21 * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflictsJim Kingdon1-0/+3
which no longer occur. gcc -Wall lint: * findvar.c (symbol_read_needs_frame), corelow.c (ignore), inflow.c (gdb_has_a_terminal): Make sure to return a value. * regex.h: Declare re_set_syntax. * printcmd.c: Include valprint.h. * infcmd.c, exec.c, maint.c, core.c: Include language.h. * maint.c: Include expression.h. * infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h. * inftarg.c: Include command.h. * coredep.c: Include value.h. * c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h. * ch-typeprint.c: Include typeprint.h. * ch-valprint.c: Include c-lang.h. * nlmread.c: Include buildsym.h. * environ.c: Include gdbcore.h. Only include defs.h once. (set_in_environ): Cast const char * to char * when passing to set_gnutarget. Remove unused variables: * printcmd.c (printf_command): args_to_vprintf. * coffread.c (coff_symfile_init): strsection. Move variables to within the #ifdefs where they are used: * symtab.c (gdb_mangle_name): opname. * inftarg.c (child_attach): pid and exec_file. * inftarg.c (child_detach): siggnal. * objfiles.c (allocate_objfile): mapto, md, and fd. * objfiles.c (free_objfile): mmfd. * infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch. * infrun.c (wait_for_inferior): Remove unused same_pid label. * inferior.h: Declare set_sigint_trap and clear_sigint_trap. * parser-defs.h: Declare write_exp_elt_block. * stabsread.h: Declare elfstab_offset_sections and coffstab_build_psymtabs.
1993-09-02 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,Jim Kingdon1-1/+1
symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c partial-stab.h, symmisc.c, gdbtypes.c: Lint. Remove (or put inside #if) unused variables and labels. Fix unclosed comment. Deal with enumeration values unhandled in switch statements. Make sure non-void functions return values. Include appropriate headers. * dbxread.c (elfstab_build_psymtabs): Don't check for unsigned value < 0.
1993-08-24 * frame.h, symtab.h, findvar.c (read_var_value): Change baseregJim Kingdon1-0/+2
support to use LOC_BASEREG rather than SYMBOL_BASEREG_VALID. * dwarfread.c: Use LOC_BASEREG where appropriate. * Various: Support LOC_BASEREG and LOC_BASEREG_ARG.
1993-08-18 * blockframe.c (block_innermost_frame): Uncomment.Jim Kingdon1-0/+2
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-07-24undo previous changeBrendan Kehoe1-14/+0
1993-07-23 * ch-exp.y (yycheck, yydefred, yydgoto, yygindex, yylen, yylhs,Brendan Kehoe1-4/+18
yyrindex, yysccsid, yysindex, yyss, yyssp, yytable, yyvs, yyvss): Also define these to chill_{name}, for 386BSD's yacc. * m2-exp.y: Likewise.
1993-05-11* ch-exp.y (MAX, MIN): Rename to MAX_TOKEN, MIN_TOKEN.John Gilmore1-7/+7
* target.c (MIN): #undef before defining.
1993-05-10 * ch-exp.y (start): Apply work-around to avoid bison warning.Fred Fish1-1/+1
1993-04-28 * ch-exp.y (yylex): Don't STREQ with simplename if it is NULL.Peter Schauer1-21/+21
1993-04-21 * ch-exp.y: Removed unused structure_primitive_value and FIXME_23.Per Bothner1-3/+0
* Makefile.in: Add $(YFLAGS) when using $(YACC). * Makefile.in: Remove message to expect conflicts and unused rules in ch-exp.y, since there no longer are any such.
1993-04-14 * ch-exp.y: Fix thinko that broke parsing of FALSE.Per Bothner1-1/+1
1993-04-10 * ch-exp.y: Clean up lexing of identifiers andPer Bothner1-85/+51
reserved words. (E.g. don't recognize FALSEXXX as the keyword FALSE followed by the identifier XXX.) Also, convert identifiers to lower case.
1993-04-09 * valarith.c (value_subscript): Add COERCE_REF.Per Bothner1-4/+1
* ch-exp.y (operand_5): We can generalize the 2nd operand of a string repetition ot 'literal' without ambiguity.
1993-04-07 * ch-exp.y: Remove ambiguities. Fix or add support forPer Bothner1-32/+43
UNOP_IND, UNOP_CAST, UNOP_ADDR, STRUCOP_STRUCT, OP_TYPE. * ch-typeprint.c (chill_print_type): Move support for TYPE_CODE_ARRAY and TYPE_CODE_STRING from here ... * ch-typeprint.c (chill_type_print_base): ... here. * ch-typeprint.c (chill_type_print_base): Improve support for PTR, REF, and FUNC types. * ch-valprint.c: Prefer H'%x format to 0x%s. * ch-valprint.c (chill_val_print): Add support for printing TYPE_CODE_REF (return for LOC parameters and variables). Use c_val_print to print random types (including ENUM). * ch-valprint,c (chill_print_value_fields): Make output look more like Chill tuples. * stabsread.c (read_struct_type): Factor common code.
1993-04-02 * stabsread.c (patch_block_stabs): If stab & no symbol, makeJim Kingdon1-0/+1
a LOC_OPTIMIZED_OUT symbol. symtab.h (enum address_class): Add LOC_OPTIMIZED_OUT. findvar.c (read_var_value), printcmd.c (address_info), symmisc.c (print_{,partial_}symbol), c-exp.y (variable), m2-exp.y (yylex): Deal with it.
1993-03-19 * ieee-float.c: Moved to ../libiberty.Per Bothner1-0/+1
* ieee-float.h: Moved to ../include. * Makefile.in: Update accordingly. * i386-pinsn.c (print_insn), m68k-pinsn.c (print_insn): Convert to stubs that call disassemblers in ../opcodes/*-dis.c. * m68k-tdep.c: Removed definition of ext_format ext_format_68881; it is now in ../opcodes/m68881-ext.c. * mips-tdep.c (mips_skip_prologue): Try to skip more of the prologue (some callers _do_ care). * mips-pinsn.c (print_insn), z8k-tdep.c (print_insn): Convert to new interface of ../opcodes/*-dis.c. * ch-exp.y: Add #include <ctype.h>.
1993-02-03 * c-exp.y (lcurly, rcurly): New nonterminals.Fred Fish1-1/+4
* 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-01-28 * expression.h (BINOP_CONCAT): Document use for self concatenationFred Fish1-48/+65
an integral number of times. * language.c (binop_type_check): Extend BINOP_CONCAT for self concatenation case. * valarith.c (value_concat): Rewrite to support self concatenation an integral number of times. **** start-sanitize-chill **** * Makefile.in (ch-exp.tab.c): Change "expect" message. * ch-exp.y (FIXME's): Make all FIXME tokens distinct, to eliminate hundreds of spurious shift/reduce and reduce/reduce conflicts that mask the 5 real ones. * ch-exp.y (STRING, CONSTANT, SC): Remove unused tokens. * ch-exp.y (integer_literal_expression): Remove production, no longer used. **** end-sanitize-chill ****
1993-01-21 * eval.c (evaluate_subexp): Fix OP_ARRAY, remove code thatFred Fish1-2/+1
implied that "no side effects" was nonfunctional. * eval.c (evaluate_subexp): Add BINOP_CONCAT case to deal with character string and bitstring concatenation. * expprint.c (dump_expression): Add case for BINOP_CONCAT. * expression.h (exp_opcode): Add BINOP_CONCAT. * gdbtypes.h (type_code): Add TYPE_CODE_BITSTRING. * language.c (string_type): Add function to determine if a type is a string type. * language.c (binop_type_check): Add case for BINOP_CONCAT. * valarith.c (value_concat): New function to concatenate two values, such as character strings or bitstrings. * valops.c (value_string): Remove error stub and implement function body. * value.h (value_concat): Add prototype. **** start-sanitize-chill **** * ch-exp.y (operand_3): Add actions for SLASH_SLASH (//). * ch-exp.y (yylex): Recognize SLASH_SLASH. * ch-lang.c (chill_op_print_tab): Add SLASH_SLASH (//) as BINOP_CONCAT. **** end-sanitize-chill ****
1993-01-16 * c-exp.y (exp:STRING): Convert C strings into array-of-charFred Fish1-0/+7
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-14 * c-valprint.c (cp_print_class_member): Add extern decl.Fred Fish1-21/+113
* c-valprint.c (c_val_print): Extract code for printing methods and move it to cp_print_class_method in cp-valprint.c. * c-valprint.c (c_val_print): Extract code to print strings and move it to val_print_string in valprint.c. * cp-valprint.c (cp_print_class_method): New function using code extracted from c_val_print. * valprint.c (val_print_string): New function using code extracted from c_val_print. * value.h (val_print_string): Add prototype. **** start-sanitize-chill **** * ch-exp.y (CHARACTER_STRING_LITERAL): Set correct token type. * ch-exp.y (literal): Add action for CHARACTER_STRING_LITERAL. * ch-exp.y (tempbuf, tempbufsize, tempbufindex, GROWBY_MIN_SIZE, CHECKBUF, growbuf_by_size): New variables, macros, and support functions for implementing a dynamically expandable temp buffer. * ch-exp.y (match_string_literal): New lexer function. * ch-exp.y (match_bitstring_literal): Dynamic buffer code removed and replaced with new CHECKBUF macro. * ch-exp.y (yylex): Call match_string_literal when appropriate. * ch-valprint.c (ch_val_print): Add code for TYPE_CODE_PTR. **** end-sanitize-chill ****
1993-01-06 * defs.h (HOST_CHAR_BIT): New macro, defaults to either CHAR_BITFred Fish1-4/+278
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 ****