X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsymtab.h;h=a2ca8fcea75e29bca6f84ee798e55735819ee9cb;hb=6c5b2ebeacc2538cf342cfd13c4c98ff018e6c9a;hp=5261a6940c955f2d3ceaef0f7c131c519e13eea2;hpb=78b13106edcd14d87b4cc0b7f8dce8db8c2be489;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/symtab.h b/gdb/symtab.h index 5261a6940c..a2ca8fcea7 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -25,6 +25,7 @@ #include "gdbtypes.h" #include "common/enum-flags.h" #include "common/function-view.h" +#include "completer.h" /* Opaque declarations. */ struct ui_file; @@ -1440,11 +1441,6 @@ struct symtab_and_line extern void init_sal (struct symtab_and_line *sal); -struct symtabs_and_lines -{ - struct symtab_and_line *sals; - int nelts; -}; /* Given a pc value, return line number it is in. Second arg nonzero means @@ -1498,22 +1494,43 @@ extern void forget_cached_source_info (void); extern void select_source_symtab (struct symtab *); -extern VEC (char_ptr) *default_make_symbol_completion_list_break_on - (const char *text, const char *word, const char *break_on, +/* The reason we're calling into a completion match list collector + function. */ +enum class complete_symbol_mode + { + /* Completing an expression. */ + EXPRESSION, + + /* Completing a linespec. */ + LINESPEC, + }; + +extern void default_collect_symbol_completion_matches_break_on + (completion_tracker &tracker, + complete_symbol_mode mode, + const char *text, const char *word, const char *break_on, enum type_code code); -extern VEC (char_ptr) *default_make_symbol_completion_list (const char *, - const char *, - enum type_code); -extern VEC (char_ptr) *make_symbol_completion_list (const char *, const char *); -extern VEC (char_ptr) *make_symbol_completion_type (const char *, const char *, +extern void default_collect_symbol_completion_matches + (completion_tracker &tracker, + complete_symbol_mode, + const char *, + const char *, + enum type_code); +extern void collect_symbol_completion_matches (completion_tracker &tracker, + complete_symbol_mode, + const char *, const char *); +extern void collect_symbol_completion_matches_type (completion_tracker &tracker, + const char *, const char *, enum type_code); -extern VEC (char_ptr) *make_file_symbol_completion_list (const char *, - const char *, - const char *); +extern void collect_file_symbol_completion_matches (completion_tracker &tracker, + complete_symbol_mode, + const char *, + const char *, + const char *); -extern VEC (char_ptr) *make_source_files_completion_list (const char *, - const char *); +extern completion_list + make_source_files_completion_list (const char *, const char *); /* symtab.c */ @@ -1534,6 +1551,13 @@ extern CORE_ADDR skip_prologue_using_sal (struct gdbarch *gdbarch, extern struct symbol *fixup_symbol_section (struct symbol *, struct objfile *); +/* If MSYMBOL is an text symbol, look for a function debug symbol with + the same address. Returns NULL if not found. This is necessary in + case a function is an alias to some other function, because debug + information is only emitted for the alias target function's + definition, not for the alias. */ +extern symbol *find_function_alias_target (bound_minimal_symbol msymbol); + /* Symbol searching */ /* Note: struct symbol_search, search_symbols, et.al. are declared here, instead of making them local to symtab.c, for gdbtk's sake. */