aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
AgeCommit message (Collapse)AuthorFilesLines
2003-03-032003-03-03 David Carlton <carlton@math.stanford.edu>David Carlton1-18/+39
* linespec.c (find_method): Extract code into collect_methods. (collect_methods): New.
2003-02-282003-02-28 David Carlton <carlton@math.stanford.edu>David Carlton1-71/+89
* linespec.c (decode_compound): Extract code into find_method. (find_method): New.
2003-02-252003-02-25 David Carlton <carlton@math.stanford.edu>David Carlton1-2/+2
* symtab.h (SYMBOL_NATURAL_NAME): New macro. (SYMBOL_LINKAGE_NAME): Ditto. (SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and SYMBOL_LINKAGE_NAME. (struct general_symbol_info): Expand comment. (DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME. (SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME. (SYMBOL_MATCHES_REGEXP): Ditto. * symtab.c (symbol_natural_name): New function. * objfiles.h: Replace all uses of SYMBOL_NAME by DEPRECATED_SYMBOL_NAME. * xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto. * symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto. * somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto. * printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto. * minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto. * i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto. * gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto. * dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto. * cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto. * blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto. * ada-exp.y: Ditto. * ada-exp.y: Update copyright. * sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto. * cp-valprint.c: Ditto. 2003-02-25 David Carlton <carlton@math.stanford.edu> * generic/gdbtk.h: Replace all instances of SYMBOL_NAME by DEPRECATED_SYMBOL_NAME. * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto. * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright. 2003-02-25 David Carlton <carlton@math.stanford.edu> * mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with DEPRECATED_SYMBOL_NAME. Update copyright.
2003-02-202003-02-20 David Carlton <carlton@math.stanford.edu>David Carlton1-3/+3
* symtab.h (SYMBOL_PRINT_NAME): Rename from SYMBOL_SOURCE_NAME; expand comment. * ada-lang.c (user_select_syms, ada_finish_decode_line_1): Replace SYMBOL_PRINT_NAME with SYMBOL_SOURCE_NAME. * ada-typeprint.c (ada_typedef_print): Ditto. * ax-gdb.c (gen_var_ref): Ditto. * breakpoint.c (print_one_breakpoint): Ditto. * buildsym.c (finish_block): Ditto. * c-valprint.c (c_val_print): Ditto. * expprint.c (print_subexp): Ditto. * findvar.c (locate_var_value): Ditto. * infcmd.c (jump_command): Ditto. * linespec.c (decode_line_2, decode_compound): Ditto. * maint.c (maintenance_translate_address): Ditto. * objc-lang.c (compare_selectors, compare_classes): Ditto. * printcmd.c (build_address_symbolic, sym_info, print_frame_args): Ditto. * p-valprint.c (pascal_val_print): Ditto. * stabsread.c (define_symbol): Ditto. * stack.c (print_frame, frame_info, print_block_frame_locals) (print_frame_arg_vars, return_command): Ditto. * symfile.c (compare_symbols, compare_psymbols): Ditto. * symmisc.c (print_symbol): Ditto. * symtab.c (lookup_partial_symbol, lookup_block_symbol) (compare_search_syms, print_symbol_info, print_msymbol_info) (rbreak_command): Ditto. * tracepoint.c (tracepoints_info): Ditto. * typeprint.c (typedef_print): Ditto. * valops.c (value_of_variable, hand_function_call): Ditto. * cli/cli-cmds.c (edit_command, list_command): Ditto. * ada-typeprint.c: Update Copyright. * infcmd.c, objc-lang.c, p-valprint.c, symmisc.c: Ditto. * tracepoint.c, cli/cli-cmds.c: Ditto.
2003-02-202003-02-19 David Carlton <carlton@math.stanford.edu>David Carlton1-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-02-072003-02-06 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-1/+2
* linux-proc.c: Include "gdb_stat.h" instead of <sys/stat.h>. * cp-valprint.c (cp_print_value_fields): Eliminate STREQN. * jv-typeprint.c (java_type_print_base): Ditto. * typeprint.c (typedef_print): Eliminate STREQ. * cli/cli-script.c (define_command, define_command): Ditto. * main.c (captured_main): Ditto. * values.c (lookup_internalvar): Ditto. * utils.c (safe_strerror, parse_escape): Eliminate assignment within `if' conditional. * linespec.c (decode_line_2): Ditto. * cli/cli-dump.c (bfd_openr_with_cleanup): Ditto. (bfd_openw_with_cleanup): Ditto. Index: mi/ChangeLog 2003-02-06 Andrew Cagney <ac131313@redhat.com> * mi-cmd-env.c: Include "gdb_stat.h" instead of <sys/stat.h>.
2003-02-042003-02-04 David Carlton <carlton@math.stanford.edu>David Carlton1-17/+35
* linespec.c (decode_compound): Extract code into lookup_prefix_sym. (lookup_prefix_sym): New function.
2003-01-142003-01-14 David Carlton <carlton@math.stanford.edu>David Carlton1-76/+77
* linespec.c (decode_line_1): Normalize comments. (set_flags): Ditto. (locate_first_half): Ditto. (decode_compound): Ditto. (symtab_from_filename): Ditto. (decode_all_digits): Ditto. (decode_dollar): Ditto. (find_methods): Ditto. (find_toplevel_char): Ditto.
2003-01-122003-01-12 David Carlton <carlton@bactrian.org>David Carlton1-4/+4
* linespec.c (symtab_from_filename): Rename variable 's' to 'file_symtab'.
2003-01-112003-01-10 David Carlton <carlton@math.stanford.edu>David Carlton1-29/+33
* linespec.c (decode_line_1): Rename variable 's' to 'file_symtab'. (decode_all_digits): Rename argument 's' to 'file_symtab'. (decode_dollar): Ditto. (decode_variable): Ditto. (symbol_found): Ditto.
2003-01-092003-01-09 David Carlton <carlton@math.stanford.edu>David Carlton1-1/+1
* linespec.c: Update copyright.
2003-01-082003-01-08 David Carlton <carlton@math.stanford.edu>David Carlton1-23/+42
* linespec.c (decode_line_1): Move code into decode_variable. (decode_variable): New function.
2003-01-072003-01-07 David Carlton <carlton@math.stanford.edu>David Carlton1-63/+82
* linespec.c (decode_line_1): Move code into decode_dollar. (decode_dollar): New function.
2002-12-192002-12-19 David Carlton <carlton@math.stanford.edu>David Carlton1-71/+97
* linespec.c (decode_line_1): Move code into decode_all_digits. (decode_all_digits): New function.
2002-12-092002-12-09 David Carlton <carlton@math.stanford.edu>David Carlton1-33/+57
* linespec.c (symtab_from_filename): New function. (decode_line_1): Move code into symtab_from_filename.
2002-12-052002-12-05 David Carlton <carlton@math.stanford.edu>David Carlton1-246/+284
* linespec.c (decode_compound): New function. (decode_line_1): Move code into decode_compound.
2002-11-152002-11-12 David Carlton <carlton@math.stanford.edu>David Carlton1-78/+105
* linespec.c (locate_first_half): New function. (decode_line_1): Move code into locate_first_half.
2002-11-112002-11-11 David Carlton <carlton@math.stanford.edu>David Carlton1-40/+53
* linespec.c (set_flags): New function. (decode_line_1): Move code into set_flags.
2002-11-112002-11-11 David Carlton <carlton@math.stanford.edu>David Carlton1-33/+61
* linespec.c (decode_line_1): Move chunks of code to separate functions. (initialize_defaults): New function. (decode_indirect): New function.
2002-11-082002-11-08 David Carlton <carlton@math.stanford.edu>David Carlton1-86/+105
* linespec.c (symbol_found): New function. (minsym_found): New function. (decode_line_1): Separate out some code into separate functions.
2002-10-242002-10-24 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-3/+3
* symtab.h (INIT_SAL): Delete macro. (init_sal): Export. * symtab.c (init_sal): New function. * ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro to init_sal function call. (find_sal_from_funcs_and_line): Ditto. (all_sals_for_line): Ditto. * breakpoint.c (create_internal_breakpoint): Ditto. (create_fork_vfork_event_catchpoint): Ditto. (create_exec_event_catchpoint): Ditto. (parse_breakpoint_sals): Ditto. (watch_command_1): Ditto. (handle_gnu_4_16_catch_command): Ditto. (clear_command): Ditto. * hppa-tdep.c (child_enable_exception_callback): Ditto. * infcmd.c (run_stack_dummy): Ditto. * infrun.c (process_event_stop_test): Ditto. (check_sigtramp2): Ditto. (step_over_function): Ditto. * linespec.c (decode_line_2): Ditto. (decode_line_1): Ditto. * source.c (line_info): Ditto. * symtab.c (find_pc_sect_line): Ditto.
2002-10-242002-10-23 David Carlton <carlton@math.stanford.edu>David Carlton1-5/+1
* linespec.c: #include "parser-defs.h". Delete prototype for find_template_name_end. * Makefile.in (linespec.o): Depend on $(parser_defs_h).
2002-09-22 * source.c (get_current_or_default_source_symtab_and_line): RemoveFernando Nasser1-3/+6
function. (set_default_source_symtab_and_line): New function. Attempts to determine a source file to list lines from if one is not currently defined. (get_current_source_symtab_and_line): Initialize sal.pc and sal.end fields. (set_current_source_symtab_and_line): Mark argument as const. * source.h: Update declarations and comments. * linespec.c (decode_line_1): Replace call to removed routine above. * stack.c (print_frame_info_base): Ditto. * cli/cli-cmds.c (edit_command): Ditto. (list_command): Ditto.
2002-09-20 * source.c: Make global variables current_source_symtab andFernando Nasser1-6/+16
current_source_line static. (list_command): Moved to cli/cli-cmds.c. (ambiguous_line_spec): Moved to cli/cli-cmds.c. (get_first_line_listed): New accessor function. (get_lines_to_list): New accessor function. (get_current_source_symtab_and_line): New function. Retrieves the position in the source code that we consider current. (get_current_or_default_source_symtab_and_line): New function. Like the above but attempts to determine a default position if one is not currently defined. (set_current_source_symtab_and_line): New function. Sets the source code position considered current and returns the previously set one. (clear_current_source_symtab_and_line): Reset stored information about a current source line. (_initialize_source): Remove registration for the "list" command and its alias. * source.h: Add declarations for the new functions above. * symtab.h: Remove declarations for the global variables mentioned above. * breakpoint.c (parse_breakpoint_sals): Use accessor functions to obtain current source line. * linespec.c (decode_line_1): Ditto. * macroscope.c (default_macro_scope): Ditto. * scm-lang.c (scm_unpac): Ditto. * stack.c (print_frame_info_base): Ditto. * symfile.c (clear_symtab_users): Ditto. * symtab.c (decode_line_spec): Ditto. * cli/cli-cmds.c (list_command): Moved here from source.c. (ambiguous_line_spec): Moved here from source.c. (_init_cli_cmds): Add definition for "list" and its alias. * Makefile.in: Update dependencies.
2002-05-112002-05-11 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+4
From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>: * linespec.c (find_methods): Handle GCC 3.x template constructors.
2002-05-102002-05-10 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-13/+5
* linespec.c (decode_line_1): Check for a double quote after a filename correctly.
2002-05-102002-05-09 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-3/+5
From Daniel Berlin <dan@cgsoftware.com> * linespec.c (find_toplevel_char): '<' and '>' also increase and decrease the depth we are at, in the case of templates.
2002-04-05gdb/ChangeLog:Jim Blandy1-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.)
2002-03-222002-03-22 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+1
* symtab.h (lookup_block_symbol): Add mangled_name argument to prototype. * symmisc.c (maintenance_check_symtabs): Call lookup_block_symbol with new mangled_name argument. * linespec.c (decode_line_1): Likewise. * valops (value_of_this): Likewise. * symtab.c (lookup_transparent_type): Likewise. (lookup_symbol_aux): Likewise. Accept new mangled_name argument. (lookup_symbol): If we are given a mangled name, pass it down to lookup_symbol_aux. (lookup_block_symbol): If we are given a mangled name to check against, only return symbols which match it.
2002-02-14Revert accidental commit.Daniel Jacobowitz1-1/+1
2002-02-142002-02-14 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+34
Fix part of PR gdb/267. * linespec.c (find_methods): Handle constructors specially for now.
2002-02-02* utils.c (error_begin): Make static.Andrew Cagney1-25/+31
* defs.h (error_begin): Delete declaration. * linespec.c (cplusplus_error): Replace cplusplus_hint. (decode_line_1): Use cplusplus_error instead of error_begin, cplusplus_hint and return_to_top_level. * coffread.c (coff_symfile_read): Use error instead of error_begin and return_to_top_level. * infrun.c (default_skip_permanent_breakpoint): Ditto.
2001-12-10Approved by Jim Blandy:Fred Fish1-1/+1
2001-12-10 Fred Fish <fnf@redhat.com> * arm-linux-tdep.c (skip_hurd_resolver): Use NULL rather than zero in args to lookup_minimal_symbol. * linespec.c (decode_line_1): Ditto. * i386-linux-tdep.c (skip_hurd_resolver): Ditto. * minsyms.c (find_stab_function_addr): Ditto. * symfile.c (simple_read_overlay_table): Ditto. (simple_read_overlay_region_table): Ditto.
2001-11-10s/value_ptr/struct value */Andrew Cagney1-1/+1
2001-04-27(Changes from Daniel Berlin, with revisions by Jim Blandy.)Jim Blandy1-2/+3
Abstract out operations specific to particular C++ ABI's, and invoke them through a function table. This removes the C++ ABI dependencies scattered throughout the code, and allows us to cleanly add support for new C++ ABI's. * cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files. * c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c, jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c: #include "cp-abi.h". These files all use functions now declared there. * symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P): Deleted. These services are now provided by functions declared in cp-abi.h. * value.h (value_rtti_type, value_virtual_fn_field): Same. * values.c (value_virtual_fn_field): Same, for this definition. * valops.c (value_rtti_type): Same. * c-typeprint.c (c_type_print_base): Use the functions from "cp-abi.h", instead of the old macros, or hard-coded ABI-specific tests. * dbxread.c (record_minimal_symbol): Same. * gdbtypes.c (get_destructor_fn_field, virtual_base_index, virtual_base_index_skip_primaries): Same. * jv-typeprint.c (java_type_print_base): Same. * linespec.c (find_methods, decode_line_1): Same. * symtab.c (gdb_mangle_name): Same. * Makefile.in (SFILES): Add the new .c files mentioned above. (cp_abi_h): New variable. (COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o. (cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets. (c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o, jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add dependency on $(cp_abi_h).
2001-03-23* config/pa/xm-hppah.h (HPPA_COMPILER_BUG): Delete. GDB onlyAndrew Cagney1-29/+0
compiles using an ISO-C compiler. (MALLOC_INCOMPATIBLE): Ditto. * linespec.c (decode_line_1): Delete hack to work around HPPA_COMPILER_BUG.
2001-03-21* gdb/linespec.c (find_methods): Whitespace differences aren'tJim Blandy1-1/+1
significant in *un*mangled method names. Use strcmp_iw to compare them, not STREQ. (Fix from Daniel Berlin.) * gdb/testsuite/gdb.c++/userdef.exp: Check that GDB tolerates whitespace in unmangled operator names.
2001-03-20* linespec.c (find_methods): Just call CHECK_TYPEDEF on t, ratherJim Blandy1-9/+5
than asking for sym_class's type; that's circuitous. Remove sym_class, since the last use of it is gone.
2001-03-152001-03-15 Martin Hunt <hunt@redhat.com>Martin Hunt1-6/+4
* linespec.c (decode_line_1): Remove trailing quote when parsing double quotes.
2001-03-14 * linespec.c (decode_line_1): Skip argptr over a leadingKeith Seitz1-2/+2
double quote. Prevents alloc of 0 bytes and memcpy of -1 bytes.
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2000-12-15Replace free() with xfree().Kevin Buettner1-4/+4
2000-12-012000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-7/+10
* 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.
2000-11-19* symtab.c (no_symtab_msg): Remove definition.Jim Blandy1-4/+2
(sources_info): Replace use of no_symtab_msg with the string itself. * linespec.c (no_symtab_msg): Remove declaration. (decode_line_1): Replace uses of no_symtab_msg with the string itself.
2000-11-102000-11-10 Fernando Nasser <fnasser@totem.toronto.redhat.com>Fernando Nasser1-0/+1266
* symtab.c (decode_line_1, total_number_of_methods, find_methods, build_command_line_spec, find_toplevel_char, decode_line_2): Move to linespec.c. * linespec.c: New file. Routines that handle linespecs, formerly in symtab.c. * symtab.h: Export find_line_symtab and find_function_start_sal, * Makefile.in: Add linespec.c.