aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
AgeCommit message (Collapse)AuthorFilesLines
2002-02-112002-02-10 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-7/+68
* symtab.c (compare_search_syms): New function. (sort_search_symbols): New function. (search_symbols): Sort symbols after searching rather than before. 2002-02-10 Daniel Jacobowitz <drow@mvista.com> * generic/gdbtk-cmds.c (gdb_listfuncs): Don't call BLOCK_SHOULD_SORT. * library/browserwin.itb (BrowserWin::_fill_funcs_combo): Sort the output of gdb_listfuncs.
2002-01-312002-01-30 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-2/+28
* symtab.c (find_pc_sect_psymtab): Do not search psymtabs for data symbols, since we search based on textlow and texthigh. (find_pc_sect_symtab): Likewise.
2002-01-17Remove else clause to #if UI_OUT.Andrew Cagney1-5/+6
2001-12-21 * configure, config.in: Rebuilt.Tom Tromey1-1/+47
* configure.in: Check for realpath. * defs.h (gdb_realpath): Declare. * symtab.h (partial_symtab): Added fullname field. * source.c (openp): Use gdb_realpath. (forget_cached_source_info): Clear full name of each partial symtab. * utils.c (gdb_realpath): New function. * symtab.c (lookup_symtab): Removed. (lookup_symtab_1): Renamed to lookup_symtab. (lookup_symtab): Look for real path. (lookup_partial_symtab): Likewise.
2001-12-032001-12-03 Michael Snyder <msnyder@redhat.com>Michael Snyder1-1/+1
* symtab.c (search_symbols): Make sure alloca size is big enough.
2001-11-27* symtab.c (find_pc_sect_line): Revert change of 2001-11-13; addJim Blandy1-7/+6
comment explaining that hand-written assembly code can have line number info but no debug info for an enclosing function.
2001-11-13Patch from Peter Schauer:Jim Blandy1-0/+8
* symtab.c (find_pc_sect_line): If we can't find the function containing PC, we certainly won't have line number information for that location, so return zero immediately.
2001-11-052001-11-01 Michael Snyder <msnyder@redhat.com>Michael Snyder1-46/+95
* symtab.c (operator_chars): Allow '*' and '[' to be quoted in operator names, to avoid regexp expansion. (search_symbols): Alloca buffer is too small, may get clobbered.
2001-10-17 * symtab.c (lookup_block_symbol): Break out of linear searchJason Molenda1-0/+4
if we're past the range of possible matches. Original patch submission, with links to history/background behind it, here: http://sources.redhat.com/ml/gdb-patches/2001-09/msg00120.html
2001-10-162001-10-15 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-1/+1
* symtab.c (lookup_block_symbol): Update comment.
2001-10-122001-10-12 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-16/+8
* symtab.h (struct block): (ALL_BLOCK_SYMBOLS): New macro. * symtab.c (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS. (make_symbol_completion_list): Likewise. (make_symbol_overload_list): Likewise. * buildsym.c (finish_block): Likewise. * breakpoint.c (get_catch_sals): Likewise. * mdebugread.c (mylookup_symbol): Likewise. * objfiles.c (objfile_relocate): Likewise. * printcmd.c (print_frame_args): Likewise. * stack.c (print_block_frame_locals): Likewise. (print_block_frame_labels): Likewise. (print_frame_arg_vars): Likewise. * symmisc.c (dump_symtab): Likewise. * tracepoint.c (add_local_symbols): Likewise. (scope_info): Likewise. 2001-10-12 Daniel Jacobowitz <drow@mvista.com> * mi-cmd-stack.c (list_args_or_locals): Use ALL_BLOCK_SYMBOLS. 2001-10-12 Daniel Jacobowitz <drow@mvista.com> * generic/gdbtk-cmds.c (gdb_listfuncs): Use ALL_BLOCK_SYMBOLS. * generic/gdbtk-stack.c (gdb_block_vars): Likewise. (gdb_get_blocks): Likewise. (gdb_get_vars_command): Likewise. 5~
2001-10-12 * symtab.c (lookup_symtab): Removed.Tom Tromey1-40/+2
(lookup_symtab_1): Renamed to lookup_symtab.
2001-07-07* symtab.c (main_name): New function.Andrew Cagney1-1/+28
(set_main_name): New function. * symtab.h: Declare. * TODO: Update From 2000-03-05 Anthony Green <green@redhat.com>: * dbxread.c (process_one_symbol): Handle the N_MAIN stab by setting main_name. * blockframe.c (inside_main_func): Use main_name instead of "main". * symtab.c (find_main_psymtab): Ditto. * source.c (select_source_symtab): Ditto. * nlmread.c (nlm_symfile_read): Ditto. * rs6000-tdep.c (skip_prologue): Ditto.
2001-06-13s/basename/lbasename/ clean up consequences of assuming lbasename()Andrew Cagney1-7/+7
returns const char *.
2001-06-12s/char */const char */Andrew Cagney1-4/+4
2001-06-11 * completer.c (gdb_completer_loc_break_characters): New variable.Eli Zaretskii1-30/+327
(line_completion_function): If we are completing on locations, back up the start of word pointer past all characters which can appear in a location spec. (location_completer): New function. * completer.h: Add prototype for location_completer. * symtab.c (make_source_files_completion_list) (add_filename_to_list, not_interesting_fname): New functions. (filename_seen): New function, body extracted from output_source_filename. (output_source_filename): Call filename_seen to check if the file was already printed. (make_symbol_completion_list): If TEXT includes a double-quoted string, return an empty list, not NULL. (make_file_symbol_completion_list): New function, similar to make_symbol_completion_list but with an additional argument SRCFILE. * symtab.h (make_file_symbol_completion_list) (make_source_files_completion_list): Add prototypes. * breakpoint.c (_initialize_breakpoint): Make location_completer be the completion function for all commands which set breakpoints and watchpoints. (top-level): #include "completer.h". * tracepoint.c (_initialize_tracepoint): Make location_completer be the completion function for the "trace" command. (top-level): #include "completer.h". * printcmd.c (_initialize_printcmd): Make location_completer be the completion function for the "print", "inspect", "call", and "disassemble" commands. (top-level): #include "completer.h". * infcmd.c (_initialize_infcmd): Make location_completer be the completion function for the "go", "jump", and "until" commands. (top-level): #include "completer.h".
2001-05-14* symtab.c (lookup_symtab_1): Use lbasename (NAME) instead ofMark Kettenis1-2/+2
basename (NAME). The FreeBSD basename returns a pointer to a static buffer, even if it's simply returning a string identical to its argument. (lookup_partial_symtab): Likewise.
2001-05-112001-02-28 Michael Snyder <msnyder@mvstp600e.cygnus.com>Michael Snyder1-3/+11
* symtab.c (print_msymbol_info): Print addresses by portable method longest_local_hex_string_custom. Allow for 64-bit addresses.
2001-05-06 * symtab.c (lookup_symtab_1, lookup_partial_symtab): Use basenameEli Zaretskii1-22/+8
instead of non-portable search for `/'. Use FILENAME_CMP instead of STREQ, to account for case-insensitive filesystems. (top-level): #include "filenames.h".
2001-04-27(Changes from Daniel Berlin, with revisions by Jim Blandy.)Jim Blandy1-6/+4
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-04-012001-03-20 Daniel Berlin <dberlin@redhat.com>Daniel Berlin1-24/+0
* symtab.c (completion_list_add_name): Remove duplicate string checks, readline already does this, and it's much faster at it, too.
2001-03-27 * symtab.c (find_pc_sect_line): Revise method used for findingKevin Buettner1-4/+11
the ending pc.
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2001-02-27fix off by one error in test for error.David Taylor1-1/+1
2001-02-25Replace calls to abort() with calls to internal_error().Kevin Buettner1-2/+2
2001-02-202001-02-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-2/+2
From Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.de> * symtab.c (lookup_symbol_aux): Call lookup_symbol_aux, not lookup_symbol, when trying to find a symbol with a mangled name, to avoid infinite recursion.
2001-01-302001-01-29 Michael Chastain <chastain@redhat.com>Michael Chastain1-2/+5
* symtab.c (block_lookup_symbol): Use 'namespace' parameter in symbol comparisons in binary search.
2001-01-19Replace STRCMP with strcmp()Andrew Cagney1-2/+2
2001-01-18* symtab.c (lookup_symbol_aux): Call lookup_symbol_aux to lookupJim Blandy1-2/+2
a mangled symbol rather than recursing into lookup_symbol, since this will just re-unmangle the name & call lookup_symbol_aux - leading to an infinite recursion.
2000-12-15Replace free() with xfree().Kevin Buettner1-7/+7
2000-12-012000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-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.
2000-11-19* symtab.c (no_symtab_msg): Remove definition.Jim Blandy1-3/+1
(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-1231/+20
* 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.
2000-11-02Protoization.Kevin Buettner1-1/+0
2000-10-30* gdbarch.sh, hp-psymtab-read.c, hpread.c, m3-nat.c, mcore-tdep.c,J.T. Conklin1-1/+1
mips-tdep.c, monitor.c, regcache.c, remote-es.c, ser-unix.c, somread.c, tracepoint.c: Fix spelling errors in comments. * gdbarch.c: Regenerate. * gnu-nat.c (S_exception_raise_request): Fix typos and spelling errors in strings. * m3-nat.c (intercept_exec_calls, mach_thread_parse_id): Likewise. * mcore-tdep.c (mcore_analyze_prologue): Likewise. * mips-tdep.c (mips16_next_pc, _initialize_mips_tdep): Likewise. * remote-e7000.c (e7000_start_remote): Likewise. * remote-rdp.c (handle_swi): Likewise. * remote-vx.c (vx_load_command): Likewise. * sh-tdep.c (sh_do_pseudo_register): Likewise. * sol-thread.c (td_err_string): Likewise. * symtab.c (decode_line_2): Likewise. -------------------------------------------------------------------
2000-10-28Protoization.Kevin Buettner1-15/+5
2000-10-27Corrected spelling errors in comments.David Anderson1-1/+1
gdbarch.{c,sh} removed a word from a comment.
2000-10-122000-10-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-18/+4
From Daniel Berlin <dberlin@redhat.com> : * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Initialize the symbol language to auto instead of unknown, so it will try to demangle the symbol. * symtab.h (OPNAME_PREFIX_P): Change operator prefix to correct value. * symtab.c (gdb_mangle_name): Properly handle C++ operators.
2000-10-122000-10-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-33/+57
From Daniel Berlin <dberlin@redhat.com> : * symtab.c (lookup_symbol_aux): New function. Renamed from lookup_symbol. Move code to do demangling/case sensitivity to lookup_symbol(). (lookup_symbol): Now wrapper for lookup_symbol_aux, so we can perform case sensitivity/demangling without leaking memory. Move code to do demangling/case sensitivity from old_lookup_symbol to here. (lookup_partial_symbol): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. (lookup_block_symbol): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. Don't do linear search in case of C++. * symfile.c (compare_symbols): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. (compare_psymbols): Same here.
2000-09-042000-09-04 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-1/+1
* c-typeprint.c (c_typedef_print): remove (replaced by typedef_print in typeprint.c). * typeprint.c (typedef_print): new function. (old c_typedef_print function with pascal language support added). * value.h (c_printdef_print): removed. (typedef_print): declare. * symtab.c (print_symbol_info): call to c_typedef_print replaced by call to typedef_print.
2000-09-01Fix core dump when executing ``b .'' command.Kevin Buettner1-1/+2
2000-08-25Fri Aug 25 12:11:21 2000 David Taylor <taylor@texas.cygnus.com>David Taylor1-5/+5
* symtab.c (search_symbols): Fix off by one error in index for initializing variables ourtype, ourtype2, ourtype3, and ourtype4. (symtab_symbol_info): fix similar off by one error. Fri Aug 25 12:03:15 2000 David Taylor <taylor@texas.cygnus.com> * gdbarch.sh (TARGET_ADDR_BIT): New macro for the number of bits in gdb's representation of a target address. * gdbarch.c, gdbarch.h: Regenerated. * gdbtypes.c (build_gdbtypes): Use TARGET_ADDR_BIT instead of TARGET_PTR_BIT when initializing builtin_type_CORE_ADDR. * printcmd.c (print_address_numeric): Use TARGET_ADDR_BIT instead of TARGET_PTR_BIT, because we're printing an address, not a pointer.
2000-08-112000-08-10 Jimmy Guo <guo@cup.hp.com>Jimmy Guo1-0/+13
* c-lang.c: Set case sensitivity on for c_language_defn, cplus_language_defn, and asm_language_defn. * ch-lang.c: Set case sensitivity on for chill_language_defn. * f-lang.c: Set case sensivitity off for f_language_defn. * jv-lang.c: Set case sensitivity on for java_language_defn. * language.h: Add enum case_mode, case_sensitivity. * language.c: Define case_mode, case_sensitivity. Set case sensitivity on for unknown_language_defn, auto_language_defn, and local_language_defn. (show_case_command,set_case_command,set_case_str): New static func. (set_type_range_case): New static func, replaces set_type_range (). (set_language_command,set_type_command,set_range_command,set_language): Call set_type_range_case (). (language_info): Print case sensitivity setting. (_initialize_language): Add set/show commands for 'case-sensitive'. Set default case mode 'auto'. Set default language 'auto'. * m2-lang.c: Set case sensitivity on for m2_language_defn. * p-lang.c: Set case sensitivity on for pascal_language_defn. * scm-lang.c: Set case sensitivity off for scm_language_defn. * symtab.c (lookup_symbol): Downcase symbol name if case sensivitity is off.
2000-08-04Fixup SYMBOL_SECTION for objfiles_relocate().Kevin Buettner1-6/+5
2000-07-30Protoization.Kevin Buettner1-172/+66
2000-07-11* symtab.c: Use paddr_nz() to print addresses.Andrew Cagney1-3/+2
2000-06-14PARAMS elimination.Kevin Buettner1-3/+3
2000-06-05C++ improvementsDaniel Berlin1-10/+14
2000-05-29Purge symtab of make_cleanup_func.Andrew Cagney1-6/+17
Pass correct arg to make_cleanup_free_search_symbols.
2000-05-28PARAMS removal.Kevin Buettner1-37/+32