aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-07-16 23:52:01 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-08-12 10:31:09 -0400
commit8d2f4b7c3168f79fdef3e50163c91cca43da1381 (patch)
tree0a87cada0ceab50dc2fd4025f6a1e607d31f51ea
parentc8979ae4fbcc2b84b4192d0596597c3352fa430b (diff)
downloadgdb-8d2f4b7c3168f79fdef3e50163c91cca43da1381.zip
gdb-8d2f4b7c3168f79fdef3e50163c91cca43da1381.tar.gz
gdb-8d2f4b7c3168f79fdef3e50163c91cca43da1381.tar.bz2
gdb: remove lookup_bound_minimal_symbol
Now that lookup_minimal_symbol has default values for sfile and objf, calling lookup_bound_minimal_symbol is identical to calling lookup_minimal_symbol without sfile and objf. Remove lookup_bound_minimal_symbol, replace call sites with lookup_minimal_symbol. Change-Id: I0a420fb56de1de8bee8a7303228c9e4546e3577b Reviewed-by: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
-rw-r--r--gdb/ada-tasks.c2
-rw-r--r--gdb/c-exp.y2
-rw-r--r--gdb/coff-pe-read.c4
-rw-r--r--gdb/compile/compile-c-symbols.c2
-rw-r--r--gdb/compile/compile-cplus-symbols.c2
-rw-r--r--gdb/d-exp.y2
-rw-r--r--gdb/fbsd-tdep.c2
-rw-r--r--gdb/glibc-tdep.c2
-rw-r--r--gdb/go-exp.y2
-rw-r--r--gdb/minsyms.c8
-rw-r--r--gdb/minsyms.h5
-rw-r--r--gdb/mips-fbsd-tdep.c2
-rw-r--r--gdb/objc-lang.c5
-rw-r--r--gdb/p-exp.y2
-rw-r--r--gdb/parse.c4
-rw-r--r--gdb/printcmd.c4
-rw-r--r--gdb/symfile.c3
-rw-r--r--gdb/valops.c2
-rw-r--r--gdb/value.c2
-rw-r--r--gdb/z80-tdep.c2
20 files changed, 22 insertions, 37 deletions
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 72a1399..43a63f8 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -600,7 +600,7 @@ ada_get_tcb_types_info (void)
/* Check for the CPU offset. */
bound_minimal_symbol first_id_sym
- = lookup_bound_minimal_symbol ("__gnat_gdb_cpu_first_id");
+ = lookup_minimal_symbol ("__gnat_gdb_cpu_first_id");
unsigned int first_id = 0;
if (first_id_sym.minsym != nullptr)
{
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 9240552..a06a000 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1210,7 +1210,7 @@ variable: name_not_typename
std::string arg = copy_name ($1.stoken);
bound_minimal_symbol msymbol
- = lookup_bound_minimal_symbol (arg.c_str ());
+ = lookup_minimal_symbol (arg.c_str ());
if (msymbol.minsym == NULL)
{
if (!have_full_symbols (current_program_space)
diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c
index 9d08721..9cfa1a3 100644
--- a/gdb/coff-pe-read.c
+++ b/gdb/coff-pe-read.c
@@ -183,14 +183,14 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
forward_func_name);
bound_minimal_symbol msymbol
- = lookup_bound_minimal_symbol (forward_qualified_name.c_str ());
+ = lookup_minimal_symbol (forward_qualified_name.c_str ());
if (!msymbol.minsym)
{
int i;
for (i = 0; i < forward_dll_name_len; i++)
forward_qualified_name[i] = tolower (forward_qualified_name[i]);
- msymbol = lookup_bound_minimal_symbol (forward_qualified_name.c_str ());
+ msymbol = lookup_minimal_symbol (forward_qualified_name.c_str ());
}
if (!msymbol.minsym)
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index 1dffa6b..e2af722 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -410,7 +410,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
}
else
{
- bound_minimal_symbol msym = lookup_bound_minimal_symbol (identifier);
+ bound_minimal_symbol msym = lookup_minimal_symbol (identifier);
if (msym.minsym != NULL)
{
if (compile_debug)
diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c
index 45b965a..7e251a6 100644
--- a/gdb/compile/compile-cplus-symbols.c
+++ b/gdb/compile/compile-cplus-symbols.c
@@ -453,7 +453,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context,
}
else
{
- bound_minimal_symbol msym = lookup_bound_minimal_symbol (identifier);
+ bound_minimal_symbol msym = lookup_minimal_symbol (identifier);
if (msym.minsym != nullptr)
{
if (compile_debug)
diff --git a/gdb/d-exp.y b/gdb/d-exp.y
index f4de994..9fc63af 100644
--- a/gdb/d-exp.y
+++ b/gdb/d-exp.y
@@ -464,7 +464,7 @@ PrimaryExpression:
{
/* Lookup foreign name in global static symbols. */
bound_minimal_symbol msymbol
- = lookup_bound_minimal_symbol (copy.c_str ());
+ = lookup_minimal_symbol (copy.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation> (msymbol);
else if (!have_full_symbols (current_program_space)
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index cba460b..cc07933 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -2059,7 +2059,7 @@ fbsd_get_thread_local_address (struct gdbarch *gdbarch, CORE_ADDR dtv_addr,
CORE_ADDR
fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_rtld_bind");
+ bound_minimal_symbol msym = lookup_minimal_symbol ("_rtld_bind");
if (msym.minsym != nullptr && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
diff --git a/gdb/glibc-tdep.c b/gdb/glibc-tdep.c
index 493645d..8f27133 100644
--- a/gdb/glibc-tdep.c
+++ b/gdb/glibc-tdep.c
@@ -53,7 +53,7 @@ glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
debugging programs that use shared libraries. */
bound_minimal_symbol resolver
- = lookup_bound_minimal_symbol ("_dl_runtime_resolve");
+ = lookup_minimal_symbol ("_dl_runtime_resolve");
if (resolver.minsym)
{
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index 345b231..ce2b7e6 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -572,7 +572,7 @@ variable: name_not_typename
std::string arg = copy_name ($1.stoken);
bound_minimal_symbol msymbol =
- lookup_bound_minimal_symbol (arg.c_str ());
+ lookup_minimal_symbol (arg.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation>
(msymbol);
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index bc6ab51..31e8e7d 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -473,14 +473,6 @@ lookup_minimal_symbol (const char *name, objfile *objf, const char *sfile)
return {};
}
-/* See minsyms.h. */
-
-bound_minimal_symbol
-lookup_bound_minimal_symbol (const char *name)
-{
- return lookup_minimal_symbol (name);
-}
-
/* See gdbsupport/symbol.h. */
int
diff --git a/gdb/minsyms.h b/gdb/minsyms.h
index f8d4117..b05ca2b 100644
--- a/gdb/minsyms.h
+++ b/gdb/minsyms.h
@@ -209,11 +209,6 @@ bound_minimal_symbol lookup_minimal_symbol (const char *name,
objfile *obj = nullptr,
const char *sfile = nullptr);
-/* Like lookup_minimal_symbol, but searches all files and
- objfiles. */
-
-bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
-
/* Look through all the current minimal symbol tables and find the
first minimal symbol that matches NAME and has text type. If OBJF
is non-NULL, limit the search to that objfile. Returns a bound
diff --git a/gdb/mips-fbsd-tdep.c b/gdb/mips-fbsd-tdep.c
index 717c9c5..22881e8 100644
--- a/gdb/mips-fbsd-tdep.c
+++ b/gdb/mips-fbsd-tdep.c
@@ -468,7 +468,7 @@ static const struct tramp_frame mips64_fbsd_sigframe =
static CORE_ADDR
mips_fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_mips_rtld_bind");
+ bound_minimal_symbol msym = lookup_minimal_symbol ("_mips_rtld_bind");
if (msym.minsym != nullptr && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 1054297..3d50d10 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1241,11 +1241,10 @@ find_objc_msgsend (void)
for (i = 0; i < nmethcalls; i++)
{
/* Try both with and without underscore. */
- bound_minimal_symbol func
- = lookup_bound_minimal_symbol (methcalls[i].name);
+ bound_minimal_symbol func = lookup_minimal_symbol (methcalls[i].name);
if ((func.minsym == NULL) && (methcalls[i].name[0] == '_'))
{
- func = lookup_bound_minimal_symbol (methcalls[i].name + 1);
+ func = lookup_minimal_symbol (methcalls[i].name + 1);
}
if (func.minsym == NULL)
{
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 77f853b..7476176 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -720,7 +720,7 @@ variable: name_not_typename
std::string arg = copy_name ($1.stoken);
bound_minimal_symbol msymbol
- = lookup_bound_minimal_symbol (arg.c_str ());
+ = lookup_minimal_symbol (arg.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation>
(msymbol);
diff --git a/gdb/parse.c b/gdb/parse.c
index 1b602a7..d5bbc4d 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -145,7 +145,7 @@ parser_state::push_symbol (const char *name, block_symbol sym)
}
else
{
- bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
if (msymbol.minsym != NULL)
push_new<expr::var_msym_value_operation> (msymbol);
else if (!have_full_symbols (current_program_space)
@@ -231,7 +231,7 @@ parser_state::push_dollar (struct stoken str)
push_new<expr::var_value_operation> (sym);
return;
}
- bound_minimal_symbol msym = lookup_bound_minimal_symbol (copy.c_str ());
+ bound_minimal_symbol msym = lookup_minimal_symbol (copy.c_str ());
if (msym.minsym)
{
push_new<expr::var_msym_value_operation> (msym);
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 8e02583..d2d5497 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1600,7 +1600,7 @@ info_address_command (const char *exp, int from_tty)
return;
}
- bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (exp);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol (exp);
if (msymbol.minsym != NULL)
{
@@ -1753,7 +1753,7 @@ info_address_command (const char *exp, int from_tty)
case LOC_UNRESOLVED:
{
bound_minimal_symbol msym
- = lookup_bound_minimal_symbol (sym->linkage_name ());
+ = lookup_minimal_symbol (sym->linkage_name ());
if (msym.minsym == NULL)
gdb_printf ("unresolved");
else
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 7643329..c9f5e9d 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3442,8 +3442,7 @@ simple_read_overlay_table (void)
return 0;
}
- bound_minimal_symbol ovly_table_msym
- = lookup_bound_minimal_symbol ("_ovly_table");
+ bound_minimal_symbol ovly_table_msym = lookup_minimal_symbol ("_ovly_table");
if (! ovly_table_msym.minsym)
{
error (_("Error reading inferior's overlay table: couldn't find "
diff --git a/gdb/valops.c b/gdb/valops.c
index af2b760..cca610a 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -129,7 +129,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p)
}
else
{
- bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
if (msymbol.minsym != NULL)
{
diff --git a/gdb/value.c b/gdb/value.c
index 45038fb..42a7af4 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -3176,7 +3176,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f,
nullptr).symbol;
if (sym == nullptr)
{
- msym = lookup_bound_minimal_symbol (physname);
+ msym = lookup_minimal_symbol (physname);
if (msym.minsym == NULL)
return NULL;
}
diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c
index f04724f..6eea634 100644
--- a/gdb/z80-tdep.c
+++ b/gdb/z80-tdep.c
@@ -908,7 +908,7 @@ z80_read_overlay_region_table ()
}
bound_minimal_symbol ovly_region_table_msym
- = lookup_bound_minimal_symbol ("_ovly_region_table");
+ = lookup_minimal_symbol ("_ovly_region_table");
if (! ovly_region_table_msym.minsym)
{
error (_("Error reading inferior's overlay table: couldn't find "