aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
AgeCommit message (Collapse)AuthorFilesLines
2000-06-05C++ improvementsDaniel Berlin1-22/+0
2000-05-28PARAMS removal.Kevin Buettner1-8/+4
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1740
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1740/+0
1999-01-06HP merge changes by eepstein and ezannoni; added external flagDavid Taylor1-33/+106
hp_som_som_object_present; added true and false tokens; changed some of the template processing code for handling HP aCC templates.
1998-11-25CARP: --enable-build-warnings=-Werror: Fix problems stopping GDB beingAndrew Cagney1-11/+6
canadian-crossed to host i386-cygwin.
1998-11-03Fix mn10200 build failure on redhat 5.0 linux.Jim Wilson1-4/+8
* c-exp.y (parse_number): Check TARGET_LONG_LONG_BIT when setting high_bit to avoid undefined negative shift.
1998-06-10 * c-exp.y: Fix problems with parsing "'foo.bar'::func". Some languagesStu Grossman1-13/+23
allow symbols with dots. * gdbtypes.c (check_stub_method): Cosmetic. Use more descriptive names for parameters. start-sanitize-java * jv-exp.y: Parser now accepts primitive types. * (parse_number): Use correct ifdef for scanf long double support. * jv-lang.c (java_array_type): Initial cut at array support. end-sanitize-java * language.c language.h (set_language): Now returns previous language. * symtab.c (find_methods): Make static. Cosmetic changes, including indentation, and adding descriptive comments. Move local variable defs into the block they are used in. * Don't call check_stub_method any more. Use gdb_mangle_name to generate the full method name. find_method doesn't need all the other goobldegook that check_stub_method does. * (gdb_mangle_name): Use more descriptive names for parameters. Fix comment. start-sanitize-java * (lookup_partial_symbol lookup_block_symbol): Check for java to ensure we can find mangled names. end-sanitize-java * (decode_line_1): Move local variable defs into the block they are used in. (Improves code readability.)
1997-11-24Improve GDB support for FreeBSD host/target.Andrew Cagney1-1/+1
To configure.in: make PRINTF_HAS_LONG_LONG check more pedantic; check that SCANF_HAS_LONG_DOUBLE instead of assuming PRINTF_HAS_LONG_DOUBLE implies it; document.
1997-10-06Remove sanitized-out Magic Cap support, will never be releasedStan Shebs1-9/+0
1997-06-13 * defs.h (perror_with_name): Is a NORETURN function.Fred Fish1-2/+2
* utils.c (perror_with_name): Is a NORETURN function. (error): Is NORETURN independently of ANSI_PROTOTYPES. * symtab.c (fixup_symbol_section): Remove prototype. * symtab.h: (fixup_symbol_section): Add prototype. * m32r-rom.c (report_transfer_performance): Add prototype. * sparclet-rom.c: Ditto. * dsrec.c: Ditto. * c-exp.y (parse_number): Cast args to float* or double* as appropriate for conversion format. * java-exp.y (parse_number): Ditto. * Makefile.in (c-exp.tab.c): Remove #line lines that refer to nonexistant y.tab.c file. (java-exp.tab.c): Ditto. (f-exp.tab.c): Ditto. (m2-exp.tab.c): Ditto. start-sanitize-gdbtk * gdbtk.c (gdbtk_init): Make truth value test explicit. Remove unused static variable "Gdbtk_Library". end-sanitize-gdbtk
1997-04-29Mon Apr 28 17:27:40 1997 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-7/+11
* c-exp.y, java-exp.y: make parse_number reject "123DEADBEEF". (fix by Bob Manson).
1997-03-22 * c-exp.y (yylex): Handle nested template parameter lists.Peter Schauer1-10/+25
* symtab.c (decode_line_2): Fix test for valid choice number.
1996-12-14 * c-exp.y (qualified_name): Replace explicit check for validPeter Schauer1-5/+4
destructor name with call to destructor_name_p. * c-lang.h, c-typeprint.c (cp_type_print_method_args): Removed, no longer needed. * c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base): Replace remaining fprintf_unfiltered calls with their filtered variant. (c_type_print_base): Do not print return type for destructors from template classes. Replace cp_type_print_method_args with cplus_demangle call to get consistent type output for stubbed and unstubbed methods. * cp-valprint.c (cp_print_class_method): Replace cp_type_print_method_args with cplus_demangle call to get consistent type output for stubbed and unstubbed methods. * gdbtypes.c, gdbtypes.h (get_destructor_fn_field): New function to find the destructor field indices for a type. * gdbtypes.h (struct type): Clarify comments for vptr_basetype and arg_types fields. (struct fn_field): Remove args field, no longer used. * symtab.c (decode_line_1), valops.c (value_struct_elt, check_field_in): Use get_destructor_fn_field to find the destructor field indices instead of assuming that the compiler passes the member function fields in a specific order. * symtab.c (find_methods): Pass NULL instead of SYMBOL_BLOCK_VALUE to lookup_symbol. (list_symbol): Replace cp_type_print_method_args with cplus_demangle call in zapped out code and explain why this code is zapped out.
1996-11-12Patches to add Irix6 host support.Jim Wilson1-8/+8
1996-04-05 * configure.in: Check for setpgid function.Fred Fish1-1/+2
* config.in: Regenerate with autoheader. * configure: Regenerate with autoconf. * inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL if it is actually defined. (gdb_setpgid): Use HAVE_SETPGID. * ch-exp.c: Change include of <string.h> to "gdb_string.h". * c-exp.y: Ditto. * f-exp.y: Ditto. * m2-exp.y: Ditto. * c-exp.y: Include <ctype.h>. * serial.c: Ditto. * config/m68k/nm-news.h: Add typedef for pid_t which is apparently missing from <sys/types.h>. Enclose entire file in NM_NEWS_H ifndef and define when included. * config/mips/nm-news-mips.h: Ditto. * config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Change name of temporary variable.
1996-03-31 * configure.in: Check whether printf family supports printingFred Fish1-1/+12
long doubles or not and define PRINTF_HAS_LONG_DOUBLE if so. * acconfig.h: Provide default undef for PRINTF_HAS_LONG_DOUBLE. * configure: Regenerate. * valprint.c (print_floating): Use PRINTF_HAS_LONG_DOUBLE. * c-exp.y (parse_number): Use PRINTF_HAS_LONG_DOUBLE. * configure.in: Fix have_gregset and have_fpregset autoconf variable names so that they match the pattern required to cache them.
1996-02-17 * Add native support for long double data type.Stu Grossman1-15/+46
* 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-30 * alpha-tdep.c, c-exp.y, h8500-tdep.c, f-exp.y, f-valprint.c,Per Bothner1-0/+1
findvar.c, hppa-tdep.c, infcmd.c, language.c, printcmd.c, rs6000-tdep.c, symmisc.c, symtab.c: Add check_typedef/CHECK_TYPEDEF as needed.
1995-10-27 * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGETStu Grossman1-0/+9
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-72/+3
* 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-02Update FSF address.Fred Fish1-1/+1
1995-03-15* c-exp.y (yylex): Make an empty character constant an error.Jim Kingdon1-0/+2
1995-03-03 * valops.c (value_struct_elt_for_reference): Work around macroJeff Law1-2/+1
bugs in HP's compilers. * c-exp.y (block): Likewise.
1995-03-01Add Linux yacc suport.Michael Meissner1-0/+9
1995-02-09 * config/sparc/tm-sun4sol2.h, dbxread.c: RenameJim Kingdon1-4/+3
N_SO_ADDRESS_MAYBE_MISSING to SOFUN_ADDRESS_MAYBE_MISSING. * symtab.h (minimal_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Add filename field. * elfread.c (record_minimal_symbol_and_info), minsyms.c, symtab.h (prim_record_minimal_symbol_and_info): Return newly created symbol. * elfread.c (elf_symtab_read) [SOFUN_ADDRESS_MAYBE_MISSING]: Set filename field of minimal symbol. * symmisc.c (dump_msymbols) [SOFUN_ADDRESS_MAYBE_MISSING]: Print filename field. * minsyms.c, symtab.h (lookup_minimal_symbol): New arg sfile. * symm-tdep.c, somsolib.c, hppa-tdep.c, c-exp.y, f-exp.y, m2-exp.y, nindy-tdep.c, m3-nat.c, irix5-nat.c, hpread.c, os9kread.c, breakpoint.c, alpha-tdep.c, valops.c, symtab.c, printcmd.c, dbxread.c: Change callers to pass NULL for sfile. * dbxread.c (process_one_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Find address of function from minimal symbols. * partial-stab.h, case 'f', 'F': Call find_stab_function_addr instead of getting pst->textlow from the stab. * minsyms.c (find_stab_function_addr): New function.
1994-11-16 * c-exp.y (yylex): Fix a bug in template scanning.Kung Hsu1-1/+6
1994-11-02 * c-exp.y (yylex): scan template names, and scan nested classKung Hsu1-8/+17
names.
1994-05-13 gcc -Wall lint:Jim Kingdon1-1/+2
* breakpoint.c (watchpoint_check): Remove unused variable b. * stack.c (print_frame_info): Move sp and buf inside #if. * eval.c (evaluate_subexp): Remove unused variables pp, mangle_ptr, ptr, and mangle_tstr. * valarith.c (value_x_binop): Remove unused variables mangle_tstr and mangle_ptr. * symtab.c (lookup_symtab): Put variable copy inside #if. (decode_line_1): Put variable q1 inside #if 0. * target.h: Declare target_link. * infrun.c (wait_for_inferior): Remove unused variables signame. * remote.c (remote_resume): Remove unused variable name. * c-exp.y (parse_number): Parenthesize operand of shift. * dbxread.c (record_minimal_symbol): Parenthesize operand of && (this is a semantic change, the warning seems to have detected a bug). * dbxread.c (end_psymtab): Move variable p1 inside #if. * coffread.c: Move variable temptype inside #if. * ch-typeprint.c (chill_type_print_base): Remove unused variable name. * ch-valprint.c: #include typeprint.h and ch-lang.h. (chill_val_print): Remove unused variable in_range. (chill_val_print): Remove statement "length > TYPE_LENGTH (type);". (chill_val_print): Add default case for switch. * stabsread.h: Declare stabsect_build_psymtabs. * os9kread.c (read_minimal_symbols): Make this return void. (os9k_symfile_read): Remove unused variables stb_exist and val. (os9k_symfile_init): Remove unused variable val. (fill_sym): Remove unused variable id. (read_os9k_psymtab): Put variable back_to inside #if 0. Remove unused variable nsl. Remove unused variable symfile_bfd. #if 0 unused variables lbrac_unmatched_complaint and lbrac_mismatch_complaint. Remove declaration for non-existent function os9k_next_symbol_text. * annotate.c, annotate.h: New files, containing a function for each annotation which outputs it. * Move breakpoints_changed from breakpoint.c to annotate.c. * breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c, printcmd.c, source.c, stack.c, utils.c, valprint.c: Use annotate.c functions to output annotations. * Makefile.in (OBS): Add annotate.o.
1994-05-12Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-1/+1
* 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-15Modified Files:Kung Hsu1-1/+1
ChangeLog c-exp.y * c-exp.y(yylex): fix potential memory overflow.
1994-02-08 * README: Remove note about gcc warnings on alpha, these should bePeter Schauer1-1/+3
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-29* c-exp.y (yylex): Reenable nested type code.Jim Kingdon1-1/+5
1994-01-17 * c-exp.y (parse_number): Assign to temporary between the rightJim Kingdon1-2/+4
shifts, to work around a bug in the SCO compiler.
1994-01-15 * c-exp.y (parse_number): Make it so that integer constants areJim Kingdon1-1/+7
builtin_type_long_long if builtin_type_long isn't big enough or if an "LL" suffix is used. Properly handle "UL" or "LU" suffixes.
1994-01-15 * c-exp.y (parse_number): Check for overflow regardless of rangeJim Kingdon1-45/+85
checking. Fix overflow check to use unsigned LONGEST, not unsigned int. * c-exp.y (parse_number): Make it so that integer constants are builtin_type_long_long if builtin_type_long isn't big enough or if an "LL" suffix is used. Properly handle "UL" or "LU" suffixes.
1993-12-29 * c-exp.y: Revert Kung's change. "..." is not a type, and theJim Kingdon1-1/+0
change caused "p (...)0" to dump core. * gdbtypes.c (check_stub_method): Don't pass "..." to parse_and_eval_type. This should fix the bug which Kung was trying to fix.
1993-12-28CVS:Kung Hsu1-0/+1
Modified Files: ChangeLog c-exp.y * c-exp.y : fix grammar to parse ellipsis (...) (fix pr4218)
1993-12-27* c-exp.y (yylex): Don't try to deal with nested types.Jim Kingdon1-0/+9
1993-11-13* c-exp.y (yylex): Call lookup_symtab not lookup_partial_symtab.Jim Kingdon1-1/+4
1993-10-24Sun Oct 24 20:16:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)Jim Kingdon1-27/+7
* 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-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-10-18 * c-exp.y: Remove never-used (because of shift/reduce conflicts)Jim Kingdon1-21/+12
rules for pointers to members. * Makefile.in: Remove notice about expected shift/reduce conflicts.
1993-10-18 * parse.c, parser-defs.h (follow_types): New function.Jim Kingdon1-41/+24
* 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-10-08 * findvar.c, value.h (symbol_read_needs_frame): New function.Jim Kingdon1-29/+2
* c-exp.y, m2-exp.y: Call it instead of having our own switch on the symbol's class. * valops.c (value_of_variable): Use symbol_read_needs_frame to decide whether we care about finding a frame.
1993-09-30 * c-exp.y, m2-exp.y: Change type of address for msymbol toPeter Schauer1-2/+2
builtin_type_long. * infptrace.c (fetch_register, store_inferior_register, child_xfer_memory): Use PTRACE_XFER_TYPE for the type of ptrace transfers. Provide an `int' default for PTRACE_XFER_TYPE.
1993-09-08gcc lintK. Richard Pixley1-1/+1
1993-09-02 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,Jim Kingdon1-0/+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/+7
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.