aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 5147aee..b2de990 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -60,7 +60,6 @@
#include "cp-abi.h"
#include "cp-support.h"
#include "observable.h"
-#include "solist.h"
#include "macrotab.h"
#include "macroscope.h"
@@ -2163,13 +2162,6 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type,
domain_name (domain).c_str (), language_str (language));
}
- /* Make sure we do something sensible with is_a_field_of_this, since
- the callers that set this parameter to some non-null value will
- certainly use it later. If we don't set it, the contents of
- is_a_field_of_this are undefined. */
- if (is_a_field_of_this != NULL)
- memset (is_a_field_of_this, 0, sizeof (*is_a_field_of_this));
-
langdef = language_def (language);
/* Search specified block and its superiors. Don't search
@@ -4499,7 +4491,7 @@ info_sources_filter::matches (const char *fullname) const
switch (m_match_type)
{
case match_on::DIRNAME:
- dirname = ldirname (fullname);
+ dirname = gdb_ldirname (fullname);
to_match = dirname.c_str ();
break;
case match_on::BASENAME:
@@ -4714,7 +4706,7 @@ info_sources_worker (struct ui_out *uiout,
if (uiout->is_mi_like_p ())
{
const char *debug_info_state;
- if (objfile_has_symbols (objfile))
+ if (objfile->has_symbols ())
{
if (debug_fully_readin)
debug_info_state = "fully-read";
@@ -4730,7 +4722,7 @@ info_sources_worker (struct ui_out *uiout,
if (!debug_fully_readin)
uiout->text ("(Full debug information has not yet been read "
"for this file.)\n");
- if (!objfile_has_symbols (objfile))
+ if (!objfile->has_symbols ())
uiout->text ("(Objfile has no debug information.)\n");
uiout->text ("\n");
}
@@ -6206,8 +6198,6 @@ default_collect_symbol_completion_matches_break_on
if (current_language->macro_expansion () == macro_expansion_c
&& code == TYPE_CODE_UNDEF)
{
- gdb::unique_xmalloc_ptr<struct macro_scope> scope;
-
/* This adds a macro's name to the current completion list. */
auto add_macro_name = [&] (const char *macro_name,
const macro_definition *,
@@ -6225,10 +6215,9 @@ default_collect_symbol_completion_matches_break_on
resulting expression will be evaluated at "file:line" -- but
at there does not seem to be a way to detect this at
completion time. */
- scope = default_macro_scope ();
- if (scope)
- macro_for_each_in_scope (scope->file, scope->line,
- add_macro_name);
+ macro_scope scope = default_macro_scope ();
+ if (scope.is_valid ())
+ macro_for_each_in_scope (scope.file, scope.line, add_macro_name);
/* User-defined macros are always visible. */
macro_for_each (macro_user_macros, add_macro_name);