summaryrefslogtreecommitdiff
path: root/gdb/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* 2003-02-19 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add block.c. (block_h): New. (COMMON_OBS): Add block.o. (block.o): New. (x86-64-tdep.o): Add $(block_h). (values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o) (stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o) (objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o) (m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o) (f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o) (c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o) (alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto. * value.h: Add opaque declaration for struct block. * parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto. * ada-lang.h: Ditto. * x86-64-tdep.c: #include "block.h" * values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto. * symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto. * objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto. * mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto. * jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto. * findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto. * buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto. * alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto. * blockframe.c (blockvector_for_pc_sect): Move to "block.c". (blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto. * symtab.c (block_function): Ditto. (contained_in): Ditto. * frame.h: Move block_for_pc and block_for_pc_sect declarations to block.h. Add opaque declaration for struct block. * symtab.h: Move block_function and contained_in declarations to block.h. Add opaque declarations for struct block, struct blockvector. (struct block): Move to block.h. (struct blockvector): Ditto. (BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK) (BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM) (BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE) (ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS) (BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): Ditto. * block.c: New file. * block.h: New file. 2003-02-19 David Carlton <carlton@math.stanford.edu> * mi-cmd-stack.c: #include "block.h"
* 2003-01-18 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2003-01-191-2/+2
| | | | | | | | | | * cris-tdep.c: Fix function declaration indentation. * dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto. * mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto. * rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto. * symfile.h, symtab.h, target.c, target.h, value.h: Ditto. * xcoffread.c, config/pa/tm-hppa.h: Ditto. * config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
* * expression.h: Rename ObjC ops to OP_OBJC_MSGCALL,Adam Fedor2002-11-191-8/+8
| | | | | | OP_OBJC_SELECTOR, OP_OBJC_NSSTRING, and OP_OBJC_SELF. * parse.c (length_of_subexp, prefixify_subexp): Likewise. * objc-exp.y: Likewise.
* 2002-10-23 David Carlton <carlton@math.stanford.edu>David Carlton2002-10-231-1/+1
| | | | | | | * parse.c (parse_exp_1): Use BLOCK_START. * x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END, SYMBOL_BLOCK_VALUE. * objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
* parse.c: (length_of_subexp, prefixify_subexp): HandleAdam Fedor2002-10-141-0/+16
| | | | OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
* 2002-09-25 Andrew Cagney <cagney@redhat.com>Andrew Cagney2002-09-251-38/+1
| | | | | | | | | | | | | | | | | | | | | | * frame.c: Include "gdb_string.h" and "builtin-regs.h". (frame_map_regnum_to_name): New function. (frame_map_name_to_regnum): New function. * frame.h (frame_map_name_to_regnum): Declare. (frame_map_regnum_to_name): Declare. * builtin-regs.c (builtin_reg_map_regnum_to_name): New function. * builtin-regs.h (builtin_reg_map_regnum_to_name): Declare. * parse.c: Do not include "builtin-regs.h". (target_map_name_to_register): Delete function. (write_dollar_variable): Use frame_map_name_to_regnum. * parser-defs.h (target_map_name_to_register): Delete declaration. * expprint.c: Include "frame.h". (print_subexp): Use frame_map_regnum_to_name. * eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name. * infcmd.c (registers_info): Use frame_map_name_to_regnum. 2002-09-25 Andrew Cagney <cagney@redhat.com> * gdb.base/pc-fp.exp, gdb.base/pc-fp.c: New test.
* Revert previous change. Not obvious.Andrew Cagney2002-09-191-16/+0
|
* 2002-09-18 Michael Snyder <msnyder@redhat.com>Michael Snyder2002-09-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preliminary support for Objective-C: * defs.h (language_objc): New enum value. (puts_filtered_tabular): Declaration only, exported from utils.c. (skip_quoted): Delete, declared in completer.h. * c-exp.y: Include completer.h. * p-exp.y: Ditto. * jv-exp.y: Ditto. * expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING): New operator enum values. * language.h (CAST_IS_CONVERSION): Test for language_objc. * language.c (binop_result_type): Handle language_objc case. (integral_type, character_type, string_type, boolean_type, structured_type, binop_type_check): Ditto. * symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define. (struct objc_specific): Add to general_symbol_info. (SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization. (SYMBOL_DEMANGLED_NAME): Handle objc case. * parser-defs.h (struct objc_class_str): New struct type. (start_msglist, end_msglist, add_msglist): Declaration only, exported from objc-lang.c. * value.h (value_of_local, value_nsstring, call_function_by_hand_expecting_type): Exported from valops.c. * valops.c (find_function_addr): Export. (call_function_by_hand_expecting_type): New function. (value_of_local): New function. * symfile.c (init_filename_language_table): Add ".m" extension for Objective-C. * utils.c (puts_filtered_tabular): New function. (fprintf_symbol_filtered): Add objc demangling support (disabled). (set/show demangle): Extend help-string to refer to ObjC. * elfread.c (elf_symtab_read): Skip Objective-C special symbols. * stabsread.c (symbol_reference_defined): Objective-C symbols may contain colons: make allowances when scanning stabs strings for colons. (objc_find_colon): New function. * printcmd.c (address_info): If language == objc then print "self" instead of "this". * parse.c (length_of_subexp): Handle new operators OP_MSGCALL, OP_NSSTRING, and OP_SELF. (prefixify_subexp): Ditto. * source.c (print_source_lines): Mention objc in comment. * breakpoint.c (parse_breakpoint_sals): Recognize Objective-C method names.
* 2002-06-19 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller2002-06-211-0/+17
| | | | | | | | | * parse.c (parse_fprintf): New function used to avoid calls to fprintf in bison parser generated debug code. * parser-defs.h: Declaration of new parse_fprintf function. * ada-exp.y, c-exp.y, f-exp.y, jv-exp.y, m2-exp.y, p-exp.y: Set YYDEBUG to 1 by default. Set YYFPRINTF as parse_fprintf.
* Expand preprocessor macros in C expressions.Jim Blandy2002-05-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lang.h: #include "macroexp.h", for macro_lookup_ftype. (scan_macro_expansion, scanning_macro_expansion, finished_macro_expansion): New function declarations. (expression_macro_lookup_func, expression_macro_lookup_baton): New variable declarations. * parser-defs.h (expression_context_pc): New declaration. * parse.c (expression_context_pc): New variable. (parse_exp_1): Set expression_context_pc, as well as expression_context_block. * c-exp.y (yylex): If we're not already reading the result of a macro expansion, try to macro-expand the next token. When we're done scanning a macro expansion, switch back to the mainline text. Commas and `if's in a macro's expansion don't terminate the input. * c-lang.c: #include "macroscope.h" and "gdb_assert.h". (macro_original_text, macro_expanded_text, expression_macro_lookup_func, expression_macro_lookup_baton): New variables. (scan_macro_expansion, scanning_macro_expansion, finished_macro_expansion, scan_macro_cleanup, null_macro_lookup, c_preprocess_and_parse): New functions. (c_language_defn, cplus_language_defn, asm_language_defn): Call c_preprocess_and_parse, instead of c_parse. * Makefile.in (c_lang_h): Note that this #includes macroexp.h. (c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
* 2002-04-24 Michael Snyder <msnyder@redhat.com>Michael Snyder2002-04-241-0/+2
| | | | | | | | * parser-defs.h (prev_lexptr): New external variable. * parse.c (parse_exp_1): Set prev_lexptr to null before calling the language-specific parser. * c-exp.y (yylex): Set prev_lexptr to start of current token. (yyerror): Use prev_lexptr in error reporting.
* * frame.c (read_relative_register_raw_bytes_for_frame): Do notAndrew Cagney2002-04-091-74/+9
| | | | | | | | | | override FP_REGNUM with frame->fp. Update copyright. * parse.c (num_std_regs, std_regs): Delete. (target_map_name_to_register): Do not search std_regs. Update function description. * parser-defs.h (num_std_regs, std_regs, struct std_regs): Delete declarations. Update copyright. Fix PR gdb/251.
* * findvar.c: Include "builtin-regs.h".Andrew Cagney2002-04-091-0/+10
| | | | | | | | | | | | | | | (value_of_register): Call value_of_builtin_reg when applicable. * parse.c: Include "builtin-regs.h" and "gdb_assert.h". (target_map_name_to_register): Call builtin_reg_map_name_to_regnum. * Makefile.in (SFILES): Add builtin-regs.c and std-regs.c. (COMMON_OBS): Add builtin-regs.o and std-regs.o. (builtin_regs_h): Define. (builtin-regs.o): New target. (findvar.o): Add $(builtin_regs_h). * builtin-regs.c, builtin-regs.h: New files. * std-regs.c: New file. Partial fix for PR gdb/251.
* gdb/ChangeLog:Jim Blandy2002-04-051-1/+1
| | | | | | | | | | | | | | | * stack.c (get_selected_block): Add new argument `addr_in_block', used to return the exact code address we used to select the block, not just the block. * blockframe.c (get_frame_block, get_current_block): Same. * frame.h (get_frame_block, get_current_block, get_selected_block): Update declarations. * linespec.c, stack.c, blockframe.c, breakpoint.c, findvar.c, linespec.c, varobj.c, printcmd.c, symtab.c: Callers changed. gdb/mi/ChangeLog: * mi-cmd-stack.c (list_args_or_locals): Pass new arg to get_frame_block. (See entry in gdb/ChangeLog.)
* * parse.c (target_map_name_to_register): Simplify, search regs andAndrew Cagney2002-01-311-10/+2
| | | | pseudo-regs using a single loop.
* Delete REGISTER_NAME_ALIAS_HOOK.Andrew Cagney2002-01-301-9/+0
|
* 2001-11-14 Michael Snyder <msnyder@redhat.com>Michael Snyder2001-11-151-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | Add address space identifiers to expression language for types. * c-exp.y (space_identifier, cv_with_space_id, const_or_volatile_or_space_identifier_noopt, const_or_volatile_or_space_identifier): New terminals. (ptype): Accept const_or_volatile_or_space_identifier. (typebase): Accept const_or_volatile_or_space_identifier. * c-typeprint.c (c_type_print_cv_qualifier): Rename to c_type_print_modifier. Handle address space modified types. * gdbtypes.h (TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE): New type flags. (struct type): Add new field as_type for addr-space qualified types. (TYPE_AS_TYPE): New macro, retrieves the chain of types that are identical to this one except for address-space qualification. * gdbtypes.c (alloc_type): Initialize new field 'as_type'. (address_space_name_to_int): New function. (address_space_int_to_name): New function. (make_type_with_address_space): New function. (make_cv_type): Handle as_type field of new struct type object. * parse.c (check_type_stack_depth): New function. (push_type_address_space): New function. (follow_types): Handle types with address-space qualifier. * parser-defs.h (enum type_pieces): Add enum tp_space_identifier.
* 2001-09-20 Michael Snyder <msnyder@redhat.com>Michael Snyder2001-09-271-0/+30
| | | | | | | | | | | | Changes by Daniel Berlin <dan@cgsoftware.com>, to support better parsing of const and volatile type expressions. * c-exp.y (const_and_volatile, const_or_volatile_noopt, const_or_volatile): New non-terminals. (ptype): Use new rule for const_or_volatile. (typebase): Use new rule for const_or_volatile_noopt. * parser-defs.h (enum type_pieces): New values tp_const, tp_volatile. * parse.c (follow_types): Handle tp_const and tp_volatile on the type stack: call make_cv_type to create new const/volatile type.
* * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney2001-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT) (HOST_LONG_DOUBLE_FORMAT, DOUBLEST) (floatformat_to_doublest, floatformat_from_doublest) (floatformat_is_negative, floatformat_is_nan) (floatformat_mantissa, store_floating) (extract_floating): Move declaration from here. * doublest.h: To here. New file. * utils.c (get_field, floatformat_to_doublest, put_field) (ldfrexp, floatformat_from_doublest, floatformat_is_negative) (floatformat_is_nan, floatformat_mantissa) (FLOATFORMAT_CHAR_BIT): Move from here. * doublest.c: To here. New file. * findvar.c (store_floating, extract_floating): Move from here. * doublest.c: To here. * Makefile.in (SFILES): Add doublest.c. (COMMON_OBS): Add doublest.o. (doublest.o): Specify dependencies. (doublest_h): Define. * config/m88k/tm-m88k.h: Include "doublest.h". * config/i960/tm-i960.h: Ditto. * config/i386/tm-symmetry.h: Ditto. * rs6000-tdep.c, valarith.c: Ditto. * valprint.c, stabsread.c, sh-tdep.c: Ditto. * ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto. * values.c, arm-tdep.c, arm-linux-tdep.c: Ditto. * alpha-tdep.c, ax.h, expression.h: Ditto. * sh-tdep.c, parse.c, top.c, value.h: Ditto. * Makefile.in (arm-tdep.o): Add $(doublest_h). (i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto. (rs6000-tdep.o, stabsread.o, valarith.o): Ditto. (values.o, valprint.o, arm-linux-tdep.o): Ditto. (alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto. (parser_defs_h): Ditto. (expression_h): Add $(doublest_h) and $(symtab_h).
* * arch-utils.c (#include "gdbthread.h"): Removed.J.T. Conklin2001-03-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#include "symfile.h"): Removed. (XMALLOC): Removed unused macro. * breakpoint.c (tbreak_command): Removed local declaration. (awatch_command, do_enable_breakpoint, set_breakpoint_count): Remove duplicate declarations. (bpstat_should_step, bpstat_have_active_hw_watchpoints) (remove_solib_event_breakpoints): Fix indentation botch. * c-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * ch-exp.c (ch_terminal_match_float_literal, parse_expr) (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): Removed duplicate declarations. * ch-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * corefile.c (#include "frame.h"): Removed (#include "symfile.h"): Removed. (#include "language.h"): Removed. * dbxread.c (#include "command.h"): Removed. * environ.c (#include "gdbcore.h"): Removed. * event-loop.c (#include "top.h"): Removed. * f-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. (#include "typeprint.h"): Removed. (#include "frame.h"): Removed. * gdbtypes.h (print_type_scalar): Removed declaration. * infcmd.c (#include "completer.h"): Removed. * language.c (#include "frame.h"): Removed. * m2-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. * m2-valprint.c (#include "valprint.h"): Removed. * p-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * p-valprint.c (#include "typeprint.h"): Removed. * parse.c (#include "linespec.h"): Removed. * regcache.c (#include "frame.h"): Removed. * remote.c (#include "frame.h"): Removed. (getpkt_sane): Make static. * source.c (#include "completer.h"): Removed. * stack.c (#include "symfile.h"): Removed. (#include "objfiles.h"): Removed. * symfile.c (#include "completer.h"): Removed. * tracepoint.c (#include "completer.h"): Removed. * values.c (#include "frame.h"): Removed. * varobj.c (#include "valprint.h"): Removed. * wrapper.c (#include "frame.h"): Removed. * memattr.c (create_mem_region): Removed unused variable. * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. -------------------------------------------------------------------
* Update/correct copyright notices.Kevin Buettner2001-03-061-1/+2
|
* 2001-02-19 Michael Snyder <msnyder@mvstp600e.cygnus.com>Michael Snyder2001-02-201-3/+5
| | | | | * parse.c (write_exp_msymbol): Make the type CORE_ADDR, to accomodate 64-bit addresses.
* Replace free() with xfree().Kevin Buettner2000-12-151-2/+2
|
* 2000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser2000-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * linespec.h: New file. Declarations for linespec.c. * linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c, symtab.c, tracepoint.c: Include the above. * completer.c: New file. Line completion stuff for GDB. (get_gdb_completer_word_break_characters, get_gdb_completer_quote_characters): New functions. Accessors for useful completer internal data. (filename_completer, line_completion_function, skip_quoted): Moved here from top.c. * completer.h: New file. Declarations for the above. * linespec.c (decode_line_1): Use get_gdb_completer_word_break_characters and get_gdb_completer_quote_characters. * top.c: Include completer.h. (filename_completer, line_completion_function, skip_quoted): Moved to completer.c. * corefile.c, exec.c, source.c, symfile.c, linespec.c: Include completer.h. * Makefile.in (SFILES): Add completer.c. (COMMON_OBS): Add completer.o. (completer.o): New target. (linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o, symtab.o, tracepoint.o): Add linespec.h to dependencies list. (corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h to dependencies list.
* parse.c (build_parse): don't write off the end of the std_regs array.David Taylor2000-08-071-12/+24
|
* Protoization.gdb-post-protoization-2000-07-29Kevin Buettner2000-07-301-67/+33
|
* 2000-07-13 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder2000-07-131-0/+3
| | | | * parse.c: Include inferior.h.
* * parse.c (target_map_name_to_register): Include pseudo-regs.Michael Snyder2000-07-121-1/+9
|
* PARAMS removal.gdb-post-params-removal-2000-05-28Kevin Buettner2000-05-281-5/+4
|
* Purge (almost) make_cleanup_func.Andrew Cagney2000-05-221-4/+3
|
* * ax-gdb.c (agent_command): Remove now useless cast ofPhilippe De Muyter2000-04-261-1/+1
| | | | | | | | | | | | | | | | `free_current_contents' when passed to `make_cleanup'. * coffread.c (coff_symfile_read): Ditto. * dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto. (dwarf_decode_lines): Ditto. * eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto. (parse_and_eval, parse_to_comma_and_eval): Ditto. * parse.c (parse_exp_1): Ditto. * printcmd.c (print_command_1, output_command, set_command): Ditto. (x_command, print_frame_args, printf_command): Ditto. * top.c (execute_control_command): Ditto. * tracepoint.c (validate_actionline): Ditto. * typeprint.c (whatis_exp, ptype_command): Ditto. (maintenance_print_type): Ditto.
* The set debug changesDaniel Berlin2000-03-281-3/+3
|
* import gdb-1999-10-11 snapshotJason Molenda1999-10-121-23/+44
|
* import gdb-1999-09-08 snapshotStan Shebs1999-09-091-2/+0
|
* import gdb-1999-07-19 snapshotJason Molenda1999-07-191-1/+1
|
* import gdb-1999-07-07 post reformatJason Molenda1999-07-071-193/+202
|
* import gdb-1999-07-07 pre reformatJason Molenda1999-07-071-2/+2
|
* import gdb-1999-06-14 snapshotJason Molenda1999-06-141-0/+11
|
* import gdb-1999-06-07 snapshotJason Molenda1999-06-071-34/+51
|
* import gdb-1999-06-01 snapshotJason Molenda1999-06-011-7/+14
|
* import gdb-1999-05-25 snapshotJason Molenda1999-05-251-0/+2
|
* import gdb-19990422 snapshotStan Shebs1999-04-261-8/+1
|
* Initial revisionStan Shebs1999-04-161-0/+1351