Commit Graph

206 Commits

Author SHA1 Message Date
David Carlton f61e8913ab 2002-12-05 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_symbol_aux_block): New function.
	(lookup_symbol_aux_local): Move code into lookup_symbol_aux_block.
2002-12-05 21:07:49 +00:00
David Carlton 406bc4de57 2002-12-04 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_symbol_aux): Move minsym code into a separate
	function.
	(lookup_symbol_aux_minsyms): New function.
2002-12-04 22:54:59 +00:00
Elena Zannoni 3fe235a7a8 2002-11-06 Elena Zannoni <ezannoni@redhat.com>
* symtab.c (methods_info): Delete. It has been ifdeffed out for
	ages.
	(symtab_symbol_info): Remove eons old ifdeffed out code.
	(_initialize_symtab): Remove prehistoric disabled 'info methods'
	command.
2002-11-06 23:27:58 +00:00
David Carlton 8155455b32 2002-11-05 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_symbol_aux): Move chunks of code into separate
	functions.
	(lookup_symbol_aux_local): New function.
	(lookup_symbol_aux_symtabs): New function.
	(lookup_symbol_aux_psymtabs): New function.
2002-11-05 20:33:01 +00:00
David Carlton 29924310ab 2002-11-05 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_symbol_aux): In minsym sections, don't use the
	previous values of 'objfile' and 'block'.
2002-11-05 16:59:57 +00:00
David Carlton e70ea697bd 2002-10-28 David Carlton <carlton@math.stanford.edu>
* symtab.c (find_addr_symbol): Delete.  (It was already commented
	out.)
	* symtab.h: Delete prototype for find_addr_symbol.
2002-10-28 17:05:56 +00:00
Elena Zannoni fe39c6533d 2002-10-24 Elena Zannoni <ezannoni@redhat.com>
* 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-24 21:02:53 +00:00
David Carlton 87f2f08c7f 2002-10-23 David Carlton <carlton@math.stanford.edu>
* symtab.c: Delete cplusplus_hint.
	Delete prototype for find_template_name_end.
2002-10-23 23:36:16 +00:00
Elena Zannoni 9cc0d196fc 2002-10-23 Elena Zannoni <ezannoni@redhat.com>
* symtab.c (symbol_demangled_name): New function.
	* symtab.h (SYMBOL_DEMANGLED_NAME): Simplify macro, by
	turning most of it into a function.
	(symbol_demangled_name): Export.
2002-10-23 20:09:28 +00:00
Elena Zannoni 89aad1f99e 2002-10-23 Elena Zannoni <ezannoni@redhat.com>
* symtab.c (symbol_init_language_specific): New function.
	* symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): Simplify macro, by
	turning most of it into a function.
	(symbol_init_language_specific): Export.
2002-10-23 18:16:44 +00:00
Fernando Nasser 0378c33231 * source.c: Make global variables current_source_symtab and
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-09-20 14:58:59 +00:00
Jim Blandy c7612d5319 * symtab.c (lookup_symbol_aux): In the cases where we find a
minimal symbol of an appropriate name and use its address to
select a symtab to read and search, use `name' (as passed to us)
as the demangled name when searching the symtab's global and
static blocks, not the minsym's name.
2002-08-30 03:24:00 +00:00
Andrew Cagney db034ac512 2002-08-01 Andrew Cagney <cagney@redhat.com>
* NEWS: Menion that CHILL has been made obsolete.

* gdbtypes.c (chill_varying_type): Make chill references obsolete.
* gdbserver/Makefile.in: Ditto.
* stabsread.c (read_range_type): Ditto.
* gdbtypes.h: Ditto.
* language.c (binop_type_check): Ditto.
(binop_result_type): Ditto.
(integral_type): Ditto.
(character_type): Ditto.
(string_type): Ditto.
(boolean_type): Ditto.
(structured_type): Ditto.
(lang_bool_type): Ditto.
(binop_type_check): Ditto.
* language.h (_LANG_chill): Ditto.
* dwarfread.c (set_cu_language): Ditto.
* dwarfread.c (CHILL_PRODUCER): Ditto.
* dwarfread.c (handle_producer): Ditto.
* expression.h (enum exp_opcode): Ditto.
* eval.c: Ditto for comments.
* typeprint.c (typedef_print) [_LANG_chill]: Ditto.
* expprint.c (print_subexp): Ditto.
(print_subexp): Ditto.
* valops.c (value_cast): Ditto.
(search_struct_field): Ditto.
* value.h (COERCE_VARYING_ARRAY): Ditto.
* symfile.c (init_filename_language_table): Ditto.
(add_psymbol_with_dem_name_to_list): Ditto.
* valarith.c (value_binop): Ditto.
(value_neg): Ditto.
* valops.c (value_slice): Ditto.
* symtab.h (union language_specific): Ditto.
(SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
(SYMBOL_DEMANGLED_NAME): Ditto.
(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
* defs.h (enum language): Ditto.
* symtab.c (got_symtab): Ditto.
* utils.c (fprintf_symbol_filtered): Ditto.

* ch-typeprint.c: Make file obsolete.
* ch-valprint.c: Make file obsolete.
* ch-lang.h: Make file obsolete.
* ch-exp.c: Make file obsolete.
* ch-lang.c: Make file obsolete.

* Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
CHILL_LIB.
(TARGET_FLAGS_TO_PASS): Ditto.
(CHILLFLAGS): Obsolete.
(CHILL): Obsolete.
(CHILL_FOR_TARGET): Obsolete.
(CHILL_LIB): Obsolete.
(SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
ch-valprint.c.
(HFILES_NO_SRCDIR): Remove ch-lang.h.
(COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
ch-lang.o.
(ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
targets.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references
to CHILL.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* Makefile.in (TARGET_FLAGS_TO_PASS): Remove CHILLFLAGS, CHILL,
CHILL_FOR_TARGET and CHILL_LIB.
* configure.in (configdirs): Remove gdb.chill.
* configure: Regenerate.
* lib/gdb.exp: Obsolete references to chill.
* gdb.fortran/types.exp: Ditto.
* gdb.fortran/exprs.exp: Ditto.
2002-08-01 17:18:35 +00:00
Daniel Jacobowitz 729051e6cb * symtab.c (lookup_symbol): Demangle before lowercasing. 2002-07-30 15:42:07 +00:00
Andrew Cagney 04ea0df192 2002-07-29 Andrew Cagney <ac131313@redhat.com>
* gdb_obstack.h: New file.
* symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
(obstack_chunk_alloc, obstack_chunk_free): Delete macros.
* objfiles.h: Include "gdb_obstack.h".
* Makefile.in (gdb_obstack_h): Define.
(symtab_h): Add $(gdb_obstack_h).
(objfiles_h): Add $(gdb_obstack_h).

* objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
* macrotab.c, cp-valprint.c, dbxread.c: Ditto.
* ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
* macroexp.c, p-typeprint.c, stabsread.c: Ditto.
* symtab.c, f-typeprint.c, mdebugread.c: Ditto.
* p-valprint.c, symmisc.c, typeprint.c: Ditto.
* symfile.c, coffread.c, c-typeprint.c: Ditto.
* buildsym.c, bcache.c, ada-typeprint.c: Ditto.

* Makefile.in (bcache.o): Update dependencies.
(buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
(ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
(dbxread.o, dstread.o, f-typeprint.o): Ditto.
(objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
(stabsread.o, symfile.o, symmisc.o): Ditto.
(symtab.o, typeprint.o, macroexp.o): Ditto.
(macrotab.o, mdebugread.o): Ditto.
(f_lang_h, coff_sym_h, coff_symconst_h): Define.
(coff_ecoff_h, aout_aout64_h): Define.
(aout_stabs_gnu_h, libaout_h): Define.
2002-07-29 22:55:26 +00:00
Daniel Jacobowitz 261397f84f 2002-07-11 Daniel Jacobowitz <drow@mvista.com>
Based on patch from Daniel Berlin <dberlin@dberlin.org>.
	* buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
	(finish_block) For non-function blocks, hash the symbol table.  For
	function blocks, mark the symbol table as unhashed.
	* minsyms.c (msymbol_hash): Return hash value without taking modulus.
	(msymbol_hash_iw): Likewise.
	(add_minsym_to_hash_table): Take modulus of msymbol_hash's return
	value.
	(add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
	(lookup_minimal_symbol): Likewise for both.
	* symtab.h (struct block): Add `hashtable' flag.  Comment the
	hashtable.
	(BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
	(ALL_BLOCK_SYMBOLS): Update.
	(BLOCK_SHOULD_SORT): Do not sort hashed blocks.
	(struct symbol): Add `hash_next' pointer.
	* symtab.c (lookup_block_symbol): Search using the hash table when
	possible.
	(find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
	(search_symbols, find_addr_symbol): Likewise.

	* dstread.c (process_dst_block): Clear hashtable bit for new block.
	(read_dst_symtab): Likewise.
	* jv-lang.c (get_java_class_symtab): Likewise.
	* mdebugread.c: Include "gdb_assert.h".
	(shrink_block): Assert that the block being modified is not hashed.
	* coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
	* symmisc.c (free_symtab_block): Walk the hash table when freeing
	symbols.
	(dump_symtab): Recognize hashed blocks.
	* printcmd.c (print_frame_args):  Assert that function blocks do not
	have hashed symbol tables.
	* ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
	(fill_in_ada_prototype, debug_print_block): Likewise.
	(ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS.  Handle hash tables.
2002-07-11 20:46:19 +00:00
Daniel Jacobowitz 228c6d410e 2002-07-04 Daniel Jacobowitz <drow@mvista.com>
* symtab.c (remove_params): New function.
        (make_symbol_overload_list): Use it instead of cplus_demangle.
        (overload_list_add_symbol): Likewise.  Reorder.  Fix memory leak.
2002-07-04 15:22:42 +00:00
Andrew Cagney 14a5e76714 * language.c (local_hex_string_custom): Simplify. Do not depend
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-05-12 04:20:06 +00:00
Andrew Cagney 25f1b00810 * symtab.c (lookup_symtab): Remove ``const'' from ``rp''
declaration.  Fix -Werror.
2002-04-06 18:28:20 +00:00
Jim Blandy ae767bfb78 gdb/ChangeLog:
* 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 22:04:43 +00:00
Joel Brobecker f079a2e599 (lookup_symtab): Use the new xfullpath function, in order to be able to
match a filename with either the real filename, or the name of any
symbolic link to this file.
(lookup_partial_symtab): Ditto.
2002-04-05 16:42:04 +00:00
Jim Blandy 12af6855fb * symtab.h (SYMBOL_INIT_MANGLED_NAME): Turn this macro's body into
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-27 23:10:24 +00:00
Daniel Jacobowitz 3121eff097 2002-03-22 Daniel Jacobowitz <drow@mvista.com>
* 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-03-22 18:57:08 +00:00
Peter Schauer 4363022793 * symtab.c (gdb_mangle_name): Handle fully mangled v3 abi physnames. 2002-02-27 18:22:24 +00:00
Andrew Cagney 8ed32cc01a s/free/xfree/ 2002-02-24 01:44:00 +00:00
Fred Fish e8717518fc Approved by Jim Blandy (jimb@redhat.com).
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-22 00:17:13 +00:00
Daniel Jacobowitz 434d2d4f74 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* 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-02-11 03:21:53 +00:00
Daniel Jacobowitz 8a48e96728 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
* 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-31 05:03:31 +00:00
Andrew Cagney 8926118ce2 Remove else clause to #if UI_OUT. 2002-01-17 22:15:18 +00:00
Tom Tromey 58d370e0e6 * configure, config.in: Rebuilt.
* 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-21 22:32:37 +00:00
Michael Snyder 045f55a687 2001-12-03 Michael Snyder <msnyder@redhat.com>
* symtab.c (search_symbols): Make sure alloca size is big enough.
2001-12-03 19:30:39 +00:00
Jim Blandy b77b1eb785 * symtab.c (find_pc_sect_line): Revert change of 2001-11-13; add
comment explaining that hand-written assembly code can have line
number info but no debug info for an enclosing function.
2001-11-27 00:03:22 +00:00
Jim Blandy 648f4f7985 Patch from Peter Schauer:
* 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-13 16:42:50 +00:00
Michael Snyder 53e8ad3d81 2001-11-01 Michael Snyder <msnyder@redhat.com>
* 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-11-05 23:27:31 +00:00
Jason Molenda 1ba7c32c23 * symtab.c (lookup_block_symbol): Break out of linear search
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-17 07:12:57 +00:00
Elena Zannoni 8cc1c88238 2001-10-15 Elena Zannoni <ezannoni@redhat.com>
* symtab.c (lookup_block_symbol): Update comment.
2001-10-16 03:23:35 +00:00
Daniel Jacobowitz e88c90f2c5 2001-10-12 Daniel Jacobowitz <drow@mvista.com>
* 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 23:51:30 +00:00
Tom Tromey 1b15f1fad9 * symtab.c (lookup_symtab): Removed.
(lookup_symtab_1): Renamed to lookup_symtab.
2001-10-12 03:38:12 +00:00
Andrew Cagney 51cc5b0737 * symtab.c (main_name): New function.
(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-07-07 17:19:50 +00:00
Andrew Cagney 31889e007b s/basename/lbasename/ clean up consequences of assuming lbasename()
returns const char *.
2001-06-13 18:30:07 +00:00
Andrew Cagney 1f8cc6dbc0 s/char */const char */ 2001-06-12 15:03:04 +00:00
Eli Zaretskii c94fdfd0a8 * completer.c (gdb_completer_loc_break_characters): New variable.
(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-06-11 16:05:25 +00:00
Mark Kettenis caadab2cfa * symtab.c (lookup_symtab_1): Use lbasename (NAME) instead of
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-14 18:49:54 +00:00
Michael Snyder 3ac4495ac8 2001-02-28 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* symtab.c (print_msymbol_info): Print addresses by portable method
	longest_local_hex_string_custom.  Allow for 64-bit addresses.
2001-05-11 17:48:31 +00:00
Eli Zaretskii a7fdf62f9b * symtab.c (lookup_symtab_1, lookup_partial_symtab): Use basename
instead of non-portable search for `/'.  Use FILENAME_CMP instead
	of STREQ, to account for case-insensitive filesystems.
	(top-level): #include "filenames.h".
2001-05-06 06:07:20 +00:00
Jim Blandy 015a42b4cf (Changes from Daniel Berlin, with revisions by Jim Blandy.)
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-27 00:19:09 +00:00
Daniel Berlin 4e4f46a17d 2001-03-20 Daniel Berlin <dberlin@redhat.com>
* symtab.c (completion_list_add_name): Remove duplicate string checks,
	readline already does this, and it's much faster at it, too.
2001-04-01 19:50:50 +00:00
Kevin Buettner 25d53da1c8 * symtab.c (find_pc_sect_line): Revise method used for finding
the ending pc.
2001-03-27 01:17:47 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
David Taylor 993f3aa5bc fix off by one error in test for error. 2001-02-27 21:57:09 +00:00