aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
AgeCommit message (Collapse)AuthorFilesLines
2002-05-12* language.c (local_hex_string_custom): Simplify. Do not dependAndrew Cagney1-5/+5
on PRINTF_HAS_LONG_LONG or CC_HAS_LONG_LONG. * memattr.c (mem_info_command): Replace calls to longest_local_hex_string and longest_local_hex_string_custom. * buildsym.c (make_blockvector): Ditto. * solib.c (info_sharedlibrary_command): Ditto. * tracepoint.c (tracepoints_info): Ditto. * symtab.c (print_msymbol_info): Ditto. * language.c (local_hex_string): Delete. (local_hex_string_custom): Delete. (longest_local_hex_string): Rename to local_hex_string. (longest_local_hex_string_custom): Rename to local_hex_string_custom. * language.h (local_hex_string): Change parameter type to LONGEST. (local_hex_string_custom): Ditto. (longest_local_hex_string): Delete declaration. (longest_local_hex_string_custom): Ditto. * solib.c: Update copyright. * memattr.c: Update copyright.
2002-04-06* symtab.c (lookup_symtab): Remove ``const'' from ``rp''Andrew Cagney1-1/+1
declaration. Fix -Werror.
2002-04-05gdb/ChangeLog:Jim Blandy1-2/+2
* 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-04-05(lookup_symtab): Use the new xfullpath function, in order to be able toJoel Brobecker1-13/+46
match a filename with either the real filename, or the name of any symbolic link to this file. (lookup_partial_symtab): Ditto.
2002-03-27* symtab.h (SYMBOL_INIT_MANGLED_NAME): Turn this macro's body intoJim Blandy1-0/+77
a function; leave this macro here to invoke that function. (symbol_init_mangled_name): Declaration for that function. * symtab.c (symbol_init_mangled_name): New function.
2002-03-222002-03-22 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-37/+53
* 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-27 * symtab.c (gdb_mangle_name): Handle fully mangled v3 abi physnames.Peter Schauer1-1/+4
2002-02-24s/free/xfree/Andrew Cagney1-1/+1
2002-02-22Approved by Jim Blandy (jimb@redhat.com).Fred Fish1-0/+7
2002-02-21 Fred Fish <fnf@redhat.com> * dbxread.c (process_one_symbol): When finding an N_FUN symbol that marks the end of the range of a function, enter a line number entry that has a line number of zero and a PC offset that matches the end of the function. This starts a range of PC's for which no line number information is known. * symtab.c (find_pc_sect_line): If our best fit is in a range of PC's for which no line number info is found (line number is zero) then we didn't find any valid line information. * symtab.h: Document use of zero line number entry.
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