]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: make lookup_minimal_symbol objf and sfile parameters optional
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 17 Jul 2024 03:52:00 +0000 (23:52 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 12 Aug 2024 14:31:09 +0000 (10:31 -0400)
Most calls to lookup_minimal_symbol don't pass a value for sfile and
objf.  Make these parameters optional (have a default value of
nullptr).  And since passing a value to `objf` is much more common than
passing a value to `sfile`, swap the order so `objf` comes first, to
avoid having to pass a nullptr value to `sfile` when wanting to pass a
value to `objf`.

Change-Id: I8e9cc6b942e593bec640f9dfd30f62786b0f5a27
Reviewed-by: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
57 files changed:
gdb/ada-lang.c
gdb/ada-tasks.c
gdb/aix-thread.c
gdb/arc-linux-tdep.c
gdb/arm-tdep.c
gdb/auxv.c
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/breakpoint.c
gdb/bsd-uthread.c
gdb/c-exp.y
gdb/coffread.c
gdb/compile/compile-c-symbols.c
gdb/compile/compile-object-load.c
gdb/ctfread.c
gdb/d-lang.c
gdb/dbxread.c
gdb/dwarf2/loc.c
gdb/elfread.c
gdb/eval.c
gdb/fbsd-tdep.c
gdb/findvar.c
gdb/frame.c
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/gcore.c
gdb/glibc-tdep.c
gdb/gnu-v3-abi.c
gdb/go-lang.c
gdb/hppa-tdep.c
gdb/linux-fork.c
gdb/linux-thread-db.c
gdb/m32c-tdep.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/machoread.c
gdb/minsyms.c
gdb/minsyms.h
gdb/mips-linux-tdep.c
gdb/netbsd-tdep.c
gdb/objc-lang.c
gdb/obsd-tdep.c
gdb/p-lang.c
gdb/ppc-sysv-tdep.c
gdb/proc-service.c
gdb/ravenscar-thread.c
gdb/remote.c
gdb/sol-thread.c
gdb/sol2-tdep.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-svr4.c
gdb/symfile.c
gdb/tracepoint.c
gdb/tui/tui-disasm.c
gdb/value.c
gdb/z80-tdep.c

index e0f895ccf15a97ca34414b155973aa947473a5c8..972c756cab00bb9935d3512793480f6671aa80f2 100644 (file)
@@ -806,7 +806,7 @@ ada_main_name ()
      that string, then most probably the main procedure is not written
      in Ada.  */
   bound_minimal_symbol msym
-    = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
+    = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME);
 
   if (msym.minsym != NULL)
     {
@@ -11696,7 +11696,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
         the catchpoint message, and is also used when trying to catch
         a specific exception).  We do not handle this case for now.  */
       bound_minimal_symbol msym
-       = lookup_minimal_symbol (einfo->catch_exception_sym, NULL, NULL);
+       = lookup_minimal_symbol (einfo->catch_exception_sym);
 
       if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
        error (_("Your Ada runtime appears to be missing some debugging "
@@ -11716,7 +11716,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
   if (sym == NULL)
     {
       bound_minimal_symbol msym
-       = lookup_minimal_symbol (einfo->catch_handlers_sym, NULL, NULL);
+       = lookup_minimal_symbol (einfo->catch_handlers_sym);
 
       if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
        error (_("Your Ada runtime appears to be missing some debugging "
index 745e2afe3716df74591a02a02f89f048d4878c76..72a1399369eaea2725eb8f0145ee1a335a8313d8 100644 (file)
@@ -920,8 +920,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
 
   /* Try array.  */
 
-  bound_minimal_symbol msym
-    = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (KNOWN_TASKS_NAME);
   if (msym.minsym != NULL)
     {
       data->known_tasks_kind = ADA_TASKS_ARRAY;
@@ -968,7 +967,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
 
   /* Try list.  */
 
-  msym = lookup_minimal_symbol (KNOWN_TASKS_LIST, NULL, NULL);
+  msym = lookup_minimal_symbol (KNOWN_TASKS_LIST);
   if (msym.minsym != NULL)
     {
       data->known_tasks_kind = ADA_TASKS_LIST;
index 4c3df9c06fa507141bd7f322925696398c675c51..847c9006616f7f6e789d037cc077a20836d23a28 100644 (file)
@@ -395,7 +395,7 @@ pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int co
        symbols[i].addr = 0;
       else
        {
-         bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
+         bound_minimal_symbol ms = lookup_minimal_symbol (name);
          if (ms.minsym == NULL)
            {
              if (debug_aix_thread)
@@ -978,7 +978,7 @@ pd_enable (inferior *inf)
     return;
 
   /* Set a breakpoint on the returned stub function.  */
-  bound_minimal_symbol ms = lookup_minimal_symbol (stub_name, NULL, NULL);
+  bound_minimal_symbol ms = lookup_minimal_symbol (stub_name);
   if (ms.minsym == NULL)
     return;
   data->pd_brk_addr = ms.value_address ();
index bbb8c0706f0c8e1f4d8245b1f6aa7f39ff224eba..d71c5bf0185d20b5fc9b7329c700b08f982cff86 100644 (file)
@@ -506,8 +506,7 @@ arc_linux_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 
      So we look for the symbol `_dl_linux_resolver', and if we are there,
      gdb sets a breakpoint at the return address, and continues.  */
-  bound_minimal_symbol resolver
-    = lookup_minimal_symbol ("_dl_linux_resolver", NULL, NULL);
+  bound_minimal_symbol resolver = lookup_minimal_symbol ("_dl_linux_resolver");
 
   if (arc_debug)
     {
index 6278113fc82de90356fd2356c7e9a89119717519..f3db289250595caa8d10cef4277a540871ff885a 100644 (file)
@@ -9388,8 +9388,7 @@ arm_skip_cmse_entry (CORE_ADDR pc, const char *name, struct objfile *objfile)
   char *target_name = (char *) alloca (target_len);
   xsnprintf (target_name, target_len, "%s%s", "__acle_se_", name);
 
-  bound_minimal_symbol minsym
-    = lookup_minimal_symbol (target_name, NULL, objfile);
+  bound_minimal_symbol minsym = lookup_minimal_symbol (target_name, objfile);
   if (minsym.minsym != nullptr)
     return minsym.value_address ();
 
@@ -9478,7 +9477,7 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
       sec = find_pc_section (pc);
       objfile = (sec == NULL) ? NULL : sec->objfile;
       bound_minimal_symbol minsym
-       = lookup_minimal_symbol (target_name, NULL, objfile);
+       = lookup_minimal_symbol (target_name, objfile);
       if (minsym.minsym != NULL)
        return minsym.value_address ();
       else
index b47dcdf88d783289b97ca8c09bf1697d4f92f670..8d259696ea3e3ccf384e9b4b794d4c57f822c601 100644 (file)
@@ -90,7 +90,7 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
   LONGEST retval;
   size_t block;
 
-  bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv");
   if (msym.minsym == NULL)
     return TARGET_XFER_E_IO;
 
index 690ecae161f98abcf655e07ff6ccb60fe95588b0..dc1eb61be1c56a2900fca355cd8d41ab2339a64d 100644 (file)
@@ -623,7 +623,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
       pc_offset += 2;
 
       bound_minimal_symbol msymbol
-       = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
+       = lookup_minimal_symbol ("__prologue_saves__");
       if (!msymbol.minsym)
        break;
 
index 899abb9743ce2f9af8224d0a42735386f425175e..db4dcc2e1d12cce07067f45ab39c4fb9741b1225 100644 (file)
@@ -599,7 +599,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
     case LOC_UNRESOLVED:
       {
        bound_minimal_symbol msym
-         = lookup_minimal_symbol (var->linkage_name (), NULL, NULL);
+         = lookup_minimal_symbol (var->linkage_name ());
        if (!msym.minsym)
          error (_("Couldn't resolve symbol `%s'."), var->print_name ());
 
index a8f67e79012f95f4456182676ce79663874da5b1..71da72497d2e8171f7016cd34f8e983d1e3b85e9 100644 (file)
@@ -3752,7 +3752,7 @@ create_std_terminate_master_breakpoint (void)
          if (bp_objfile_data->terminate_msym.minsym == NULL)
            {
              bound_minimal_symbol m
-               = lookup_minimal_symbol (func_name, NULL, objfile);
+               = lookup_minimal_symbol (func_name, objfile);
              if (m.minsym == NULL || (m.minsym->type () != mst_text
                                       && m.minsym->type () != mst_file_text))
                {
index ecb12ad82fd961ebfb8a893bad6d0bf45638505c..d5beba2e8114679429fc58a8e8f2ed21fea638aa 100644 (file)
@@ -157,7 +157,7 @@ static int bsd_uthread_active;
 static CORE_ADDR
 bsd_uthread_lookup_address (const char *name, struct objfile *objfile)
 {
-  bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
+  bound_minimal_symbol sym = lookup_minimal_symbol (name, objfile);
   if (sym.minsym)
     return sym.value_address ();
 
index a1a74a985a6fa6b36dcd14a06ff96c232b5f3dd8..9240552db939ab31ea300171999731d76acd0dca 100644 (file)
@@ -3150,7 +3150,7 @@ classify_name (struct parser_state *par_state, const struct block *block,
   if (bsym.symbol == NULL
       && par_state->language ()->la_language == language_cplus
       && is_a_field_of_this.type == NULL
-      && lookup_minimal_symbol (copy.c_str (), NULL, NULL).minsym == NULL)
+      && lookup_minimal_symbol (copy.c_str ()).minsym == nullptr)
     return UNKNOWN_CPP_NAME;
 
   return NAME;
index d4bc7d69e70e6a9ae57ab100f6ba05170b89f132..be1e21e8364e375920b3b299e14d5480d1bcbec9 100644 (file)
@@ -579,7 +579,7 @@ coff_read_minsyms (file_ptr symtab_offset, unsigned int nsyms,
                    name1 += 1;
 
                  bound_minimal_symbol found
-                   = lookup_minimal_symbol (name1, NULL, objfile);
+                   = lookup_minimal_symbol (name1, objfile);
 
                  /* If found, there are symbols named "_imp_foo" and "foo"
                     respectively in OBJFILE.  Set the type of symbol "foo"
index 5e602b9be686807f9837817dae80b89a7d847d51..1dffa6be6ad1bcfc34cad84e4ffde061ba0d9c64 100644 (file)
@@ -355,8 +355,7 @@ gcc_convert_symbol (void *datum,
        }
       else if (request == GCC_C_ORACLE_SYMBOL)
        {
-         bound_minimal_symbol bmsym
-           = lookup_minimal_symbol (identifier, NULL, NULL);
+         bound_minimal_symbol bmsym = lookup_minimal_symbol (identifier);
          if (bmsym.minsym != NULL)
            {
              convert_symbol_bmsym (context, bmsym);
index 64856321705377f8685846388bd45866ce89c3ea..cb690863107a71f9b6732d9103b38af39a5be03b 100644 (file)
@@ -764,8 +764,7 @@ compile_object_load (const compile_file_names &file_names,
          continue;
        }
 
-      bound_minimal_symbol bmsym
-       = lookup_minimal_symbol (sym->name, NULL, NULL);
+      bound_minimal_symbol bmsym = lookup_minimal_symbol (sym->name);
       switch (bmsym.minsym == NULL
              ? mst_unknown : bmsym.minsym->type ())
        {
index 42009dcb3bfee6fd133bf42bf4b729163708a74f..eb7cf3110e0ddd3740a2a9971c9f03fde028a45d 100644 (file)
@@ -323,7 +323,7 @@ get_bitsize (ctf_dict_t *fp, ctf_id_t tid, uint32_t kind)
 static void
 set_symbol_address (struct objfile *of, struct symbol *sym, const char *name)
 {
-  bound_minimal_symbol msym = lookup_minimal_symbol (name, nullptr, of);
+  bound_minimal_symbol msym = lookup_minimal_symbol (name, of);
   if (msym.minsym != NULL)
     {
       sym->set_value_address (msym.value_address ());
index 0a9e9b0cb0c52b2ecf1df50622707bcbd8f404de..11c5c03a3cdfbb5ce4957e20cfcaf348f14dd8da 100644 (file)
@@ -38,7 +38,7 @@ static const char D_MAIN[] = "D main";
 const char *
 d_main_name (void)
 {
-  bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN);
   if (msym.minsym != NULL)
     return D_MAIN;
 
index 47e56d4d451f6b334c9a6b1558e6d432e81646ee..4b2a7d229ff110ea3a6b71dd64fb66d084b01057 100644 (file)
@@ -907,7 +907,7 @@ find_stab_function (const char *namestring, const char *filename,
   strncpy (p, namestring, n);
   p[n] = 0;
 
-  bound_minimal_symbol msym = lookup_minimal_symbol (p, filename, objfile);
+  bound_minimal_symbol msym = lookup_minimal_symbol (p, objfile, filename);
   if (msym.minsym == NULL)
     {
       /* Sun Fortran appends an underscore to the minimal symbol name,
@@ -915,21 +915,21 @@ find_stab_function (const char *namestring, const char *filename,
         was not found.  */
       p[n] = '_';
       p[n + 1] = 0;
-      msym = lookup_minimal_symbol (p, filename, objfile);
+      msym = lookup_minimal_symbol (p, objfile, filename);
     }
 
   if (msym.minsym == NULL && filename != NULL)
     {
       /* Try again without the filename.  */
       p[n] = 0;
-      msym = lookup_minimal_symbol (p, NULL, objfile);
+      msym = lookup_minimal_symbol (p, objfile);
     }
   if (msym.minsym == NULL && filename != NULL)
     {
       /* And try again for Sun Fortran, but without the filename.  */
       p[n] = '_';
       p[n + 1] = 0;
-      msym = lookup_minimal_symbol (p, NULL, objfile);
+      msym = lookup_minimal_symbol (p, objfile);
     }
 
   return msym;
@@ -2044,7 +2044,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
       p[n] = 0;
 
       bound_minimal_symbol minsym
-       = lookup_minimal_symbol (p, pst->filename, objfile);
+       = lookup_minimal_symbol (p, objfile, pst->filename);
       if (minsym.minsym == NULL)
        {
          /* Sun Fortran appends an underscore to the minimal symbol name,
@@ -2052,7 +2052,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
             was not found.  */
          p[n] = '_';
          p[n + 1] = 0;
-         minsym = lookup_minimal_symbol (p, pst->filename, objfile);
+         minsym = lookup_minimal_symbol (p, objfile, pst->filename);
        }
 
       if (minsym.minsym)
index 57a4706d29213db06a302d63061ca624ac1597fb..06e57be891b095c050bae54e95004afe082e8152 100644 (file)
@@ -710,8 +710,7 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
        physname = m_loc.physname;
 
        /* Handle both the mangled and demangled PHYSNAME.  */
-       bound_minimal_symbol msym
-         = lookup_minimal_symbol (physname, NULL, NULL);
+       bound_minimal_symbol msym = lookup_minimal_symbol (physname);
        if (msym.minsym == NULL)
          {
            msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
index c82e1506fd3f63d02ba22abb0621b4be8c553a20..68b45efb2935025b9c3c75f9f2191f14e018738e 100644 (file)
@@ -842,9 +842,9 @@ elf_gnu_ifunc_resolve_by_got (const char *name, CORE_ADDR *addr_p)
         CORE_ADDR pointer_address, addr;
         asection *plt;
         gdb_byte *buf = (gdb_byte *) alloca (ptr_size);
-        bound_minimal_symbol msym;
 
-        msym = lookup_minimal_symbol (name_got_plt, NULL, objfile);
+        bound_minimal_symbol msym
+          = lookup_minimal_symbol (name_got_plt, objfile);
         if (msym.minsym == NULL)
           return 0;
         if (msym.minsym->type () != mst_slot_got_plt)
index f6b81363125cd565b2d2f6e65cb56dd704b5048c..bf78509c85088fcbcb5a3747af54fc0dde3ad2e2 100644 (file)
@@ -1954,7 +1954,7 @@ eval_op_objc_msgcall (struct type *expect_type, struct expression *exp,
   if (value_as_long (target) == 0)
     return value_from_longest (long_type, 0);
 
-  if (lookup_minimal_symbol ("objc_msg_lookup", 0, 0).minsym)
+  if (lookup_minimal_symbol ("objc_msg_lookup").minsym != nullptr)
     gnu_runtime = 1;
 
   /* Find the method dispatch (Apple runtime) or method lookup
index 6b0d502a748767e9fff6c98c91ad06444a833540..cba460baab388248d4afede1df723cb5bf713584 100644 (file)
@@ -1943,7 +1943,7 @@ fbsd_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread)
 static LONGEST
 fbsd_read_integer_by_name (struct gdbarch *gdbarch, const char *name)
 {
-  bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
+  bound_minimal_symbol ms = lookup_minimal_symbol (name);
   if (ms.minsym == NULL)
     error (_("Unable to resolve symbol '%s'"), name);
 
index df4ab1a28b9d3786ac9c514f7326fffca8cae8e0..c67315fb68494324328331143a1695c2dd4a9441 100644 (file)
@@ -449,8 +449,7 @@ language_defn::read_var_value (struct symbol *var,
          (var->arch (),
           [var, &bmsym] (objfile *objfile)
             {
-               bmsym = lookup_minimal_symbol (var->linkage_name (), nullptr,
-                                              objfile);
+               bmsym = lookup_minimal_symbol (var->linkage_name (), objfile);
 
                /* Stop if a match is found.  */
                return bmsym.minsym != nullptr;
index e6ab54797a8eca70f24d0a7c41b192bc06cf5508..8c30979bb2f16afb13b402fd51850fb8f2979b58 100644 (file)
@@ -2584,8 +2584,7 @@ inside_main_func (const frame_info_ptr &this_frame)
   CORE_ADDR sym_addr = 0;
   const char *name = main_name ();
   bound_minimal_symbol msymbol
-    = lookup_minimal_symbol (name, NULL,
-                            current_program_space->symfile_object_file);
+    = lookup_minimal_symbol (name, current_program_space->symfile_object_file);
 
   if (msymbol.minsym != nullptr)
     sym_addr = msymbol.value_address ();
index b1f79f30cf0542d2629ebeb0dc869e628e126ada..80cc546cea78fd5018da4e98854d1d6e6a492b7b 100644 (file)
@@ -1379,8 +1379,7 @@ frv_frame_this_id (const frame_info_ptr &this_frame,
   func = get_frame_func (this_frame);
 
   /* Check if the stack is empty.  */
-  bound_minimal_symbol msym_stack
-    = lookup_minimal_symbol ("_stack", NULL, NULL);
+  bound_minimal_symbol msym_stack = lookup_minimal_symbol ("_stack");
   if (msym_stack.minsym && info->base == msym_stack.value_address ())
     return;
 
index e34a619b1390edfcd334579197d4688e29ded73f..00dd763538901b9d2b2db98781f4821afc2a4ed8 100644 (file)
@@ -195,8 +195,7 @@ ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
 
       snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
                regnum);
-      bound_minimal_symbol msymbol
-       = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol (prolog_symbol);
       if (msymbol.minsym)
        prologs[regnum] = msymbol.value_address ();
       else
index 2ab00a0ec352554b8ea40ed6c4233407668d10e0..0f04679a6bbc1800ef308c21e0586fa005c98b17 100644 (file)
@@ -269,13 +269,13 @@ call_target_sbrk (int sbrk_arg)
   struct value *sbrk_fn, *ret;
   bfd_vma tmp;
 
-  if (lookup_minimal_symbol ("sbrk", NULL, NULL).minsym != NULL)
+  if (lookup_minimal_symbol ("sbrk").minsym != nullptr)
     {
       sbrk_fn = find_function_in_inferior ("sbrk", &sbrk_objf);
       if (sbrk_fn == NULL)
        return (bfd_vma) 0;
     }
-  else if (lookup_minimal_symbol ("_sbrk", NULL, NULL).minsym != NULL)
+  else if (lookup_minimal_symbol ("_sbrk").minsym != nullptr)
     {
       sbrk_fn = find_function_in_inferior ("_sbrk", &sbrk_objf);
       if (sbrk_fn == NULL)
index 0ade1df6b349ec22c864a062a8f32d924b2ef6a6..493645d9a3b9413a4d5f996d843be884d2e7756b 100644 (file)
@@ -59,11 +59,11 @@ glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
     {
       /* The dynamic linker began using this name in early 2005.  */
       bound_minimal_symbol fixup
-       = lookup_minimal_symbol ("_dl_fixup", NULL, resolver.objfile);
-      
+       = lookup_minimal_symbol ("_dl_fixup", resolver.objfile);
+
       /* This is the name used in older versions.  */
       if (! fixup.minsym)
-       fixup = lookup_minimal_symbol ("fixup", NULL, resolver.objfile);
+       fixup = lookup_minimal_symbol ("fixup", resolver.objfile);
 
       if (fixup.minsym && fixup.value_address () == pc)
        return frame_unwind_caller_pc (get_current_frame ());
index 92735b9d6177b8df3c89223f8be45b30920d7e62..70cdde3d275212c586e762c0ec0caa53c7f0c752 100644 (file)
@@ -1160,8 +1160,7 @@ gnuv3_get_typeid (struct value *value)
   else
     {
       std::string sym_name = std::string ("typeinfo for ") + name;
-      bound_minimal_symbol minsym
-       = lookup_minimal_symbol (sym_name.c_str (), NULL, NULL);
+      bound_minimal_symbol minsym = lookup_minimal_symbol (sym_name.c_str ());
 
       if (minsym.minsym == NULL)
        error (_("could not find typeinfo symbol for '%s'"), name);
@@ -1250,7 +1249,7 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
 
   fn_name = strstr (thunk_name, " thunk to ") + strlen (" thunk to ");
   bound_minimal_symbol fn_sym
-    = lookup_minimal_symbol (fn_name, NULL, section->objfile);
+    = lookup_minimal_symbol (fn_name, section->objfile);
   if (fn_sym.minsym == NULL)
     return 0;
 
index bbf4479a6d29f3351b10e979f9734f1ced51b1a2..cf1f5a907a62e1671fde228e4dc2a1225c21e066 100644 (file)
@@ -54,7 +54,7 @@ static const char GO_MAIN_MAIN[] = "main.main";
 const char *
 go_main_name (void)
 {
-  bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN);
   if (msym.minsym != NULL)
     return GO_MAIN_MAIN;
 
index 43cf46b3c1622d313d366a215806d765807fef11..0ce754a6ed66ace3a9b0ec418800a43a2b88ff73 100644 (file)
@@ -194,7 +194,7 @@ hppa_extract_17 (unsigned word)
 CORE_ADDR 
 hppa_symbol_address(const char *sym)
 {
-  bound_minimal_symbol minsym = lookup_minimal_symbol (sym, NULL, NULL);
+  bound_minimal_symbol minsym = lookup_minimal_symbol (sym);
   if (minsym.minsym)
     return minsym.value_address ();
   else
index e34c5e0b52546f892a744c88e0fb4d2d42a62397..d36511b70fe5569cd2c72f3f987a6d182129d6ff 100644 (file)
@@ -484,10 +484,9 @@ inferior_call_waitpid (ptid_t pptid, int pid)
   scoped_switch_fork_info switch_fork_info (pptid);
 
   /* Get the waitpid_fn.  */
-  if (lookup_minimal_symbol ("waitpid", NULL, NULL).minsym != NULL)
+  if (lookup_minimal_symbol ("waitpid").minsym != nullptr)
     waitpid_fn = find_function_in_inferior ("waitpid", &waitpid_objf);
-  if (!waitpid_fn
-      && lookup_minimal_symbol ("_waitpid", NULL, NULL).minsym != NULL)
+  if (!waitpid_fn && lookup_minimal_symbol ("_waitpid").minsym != nullptr)
     waitpid_fn = find_function_in_inferior ("_waitpid", &waitpid_objf);
   if (waitpid_fn != nullptr)
     {
@@ -701,10 +700,10 @@ checkpoint_command (const char *args, int from_tty)
   
   /* Make the inferior fork, record its (and gdb's) state.  */
 
-  if (lookup_minimal_symbol ("fork", NULL, NULL).minsym != NULL)
+  if (lookup_minimal_symbol ("fork").minsym != nullptr)
     fork_fn = find_function_in_inferior ("fork", &fork_objf);
   if (!fork_fn)
-    if (lookup_minimal_symbol ("_fork", NULL, NULL).minsym != NULL)
+    if (lookup_minimal_symbol ("_fork").minsym != nullptr)
       fork_fn = find_function_in_inferior ("fork", &fork_objf);
   if (!fork_fn)
     error (_("checkpoint: can't find fork function in inferior."));
index 0a63957a0161332a3be93f4eec1025cc8c7864bc..6abaa20c594eb17acbbe4ca6140dd800d83a983b 100644 (file)
@@ -470,8 +470,7 @@ inferior_has_bug (const char *ver_symbol, int ver_major_min, int ver_minor_min)
   CORE_ADDR version_addr;
   int got, retval = 0;
 
-  bound_minimal_symbol version_msym
-    = lookup_minimal_symbol (ver_symbol, NULL, NULL);
+  bound_minimal_symbol version_msym = lookup_minimal_symbol (ver_symbol);
   if (version_msym.minsym == NULL)
     return 0;
 
@@ -810,9 +809,7 @@ static bool
 libpthread_objfile_p (objfile *obj)
 {
   return (libpthread_name_p (objfile_name (obj))
-         && lookup_minimal_symbol ("pthread_create",
-                                   NULL,
-                                   obj).minsym != NULL);
+         && lookup_minimal_symbol ("pthread_create", obj).minsym != nullptr);
 }
 
 /* Attempt to initialize dlopen()ed libthread_db, described by INFO.
index db859bc93d7ea2867cef9f81fabf71ee36a98821..3531fbb899bacfa63301b2af8535036a75ec6747 100644 (file)
@@ -2212,8 +2212,7 @@ m32c_return_value (struct gdbarch *gdbarch,
          /* Everything else is passed in mem0, using as many bytes as
             needed.  This is not what the Renesas tools do, but it's
             what GCC does at the moment.  */
-         bound_minimal_symbol mem0
-           = lookup_minimal_symbol ("mem0", NULL, NULL);
+         bound_minimal_symbol mem0 = lookup_minimal_symbol ("mem0");
 
          if (! mem0.minsym)
            error (_("The return value is stored in memory at 'mem0', "
@@ -2244,8 +2243,7 @@ m32c_return_value (struct gdbarch *gdbarch,
          /* Everything else is passed in mem0, using as many bytes as
             needed.  This is not what the Renesas tools do, but it's
             what GCC does at the moment.  */
-         bound_minimal_symbol mem0
-           = lookup_minimal_symbol ("mem0", NULL, NULL);
+         bound_minimal_symbol mem0 = lookup_minimal_symbol ("mem0");
 
          if (! mem0.minsym)
            error (_("The return value is stored in memory at 'mem0', "
@@ -2436,8 +2434,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
       strcat (tramp_name, ".plt");
 
       /* Try to find a linker symbol for the trampoline.  */
-      bound_minimal_symbol tramp_msym
-       = lookup_minimal_symbol (tramp_name, NULL, NULL);
+      bound_minimal_symbol tramp_msym = lookup_minimal_symbol (tramp_name);
 
       /* We've either got another copy of the name now, or don't need
         the name any more.  */
@@ -2521,7 +2518,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
              memcpy (func_name, ptr_msym_name, len - 4);
              func_name[len - 4] = '\0';
              bound_minimal_symbol func_msym
-               = lookup_minimal_symbol (func_name, NULL, NULL);
+               = lookup_minimal_symbol (func_name);
 
              /* If we do have such a symbol, return its value as the
                 function's true address.  */
index b41d8a5a1f287e6d631d47189b483c71ef82cf57..4899c1556669ef32f540bf6abe12b157e5a29c4d 100644 (file)
@@ -806,8 +806,7 @@ m32r_frame_this_id (const frame_info_ptr &this_frame,
   func = get_frame_func (this_frame);
 
   /* Check if the stack is empty.  */
-  bound_minimal_symbol msym_stack
-    = lookup_minimal_symbol ("_stack", NULL, NULL);
+  bound_minimal_symbol msym_stack = lookup_minimal_symbol ("_stack");
   if (msym_stack.minsym && info->base == msym_stack.value_address ())
     return;
 
index 4093d2b6ee6e67ec0778f957e284a76682e21156..8075dbb0508a49bb9d207396e095a1c3f8e6a4f3 100644 (file)
@@ -210,7 +210,7 @@ static int soft_reg_initialized = 0;
 static void
 m68hc11_get_register_info (struct m68hc11_soft_reg *reg, const char *name)
 {
-  bound_minimal_symbol msymbol = lookup_minimal_symbol (name, NULL, NULL);
+  bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
   if (msymbol.minsym)
     {
       reg->addr = msymbol.value_address ();
index 2f2874a7ab2dd061212b7909ce7e4d23c30af275..5840b663bbeb321406f3aa8acaed64b86b759f1e 100644 (file)
@@ -396,7 +396,7 @@ macho_resolve_oso_sym_with_minsym (struct objfile *main_objfile, asymbol *sym)
       && *name == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
     ++name;
 
-  bound_minimal_symbol msym = lookup_minimal_symbol (name, NULL, main_objfile);
+  bound_minimal_symbol msym = lookup_minimal_symbol (name, main_objfile);
   if (msym.minsym == NULL)
     {
       warning (_("can't find symbol '%s' in minsymtab"), name);
index 49381dd84f7c59182d04aefc189cfa9aebfc7ce1..bc6ab516a614d550b7ac300ac0ad076713dc91b0 100644 (file)
@@ -359,8 +359,7 @@ lookup_minimal_symbol_demangled (const lookup_name_info &lookup_name,
    but the demangled names are all the same: S::S or S::~S.  */
 
 bound_minimal_symbol
-lookup_minimal_symbol (const char *name, const char *sfile,
-                      struct objfile *objf)
+lookup_minimal_symbol (const char *name, objfile *objf, const char *sfile)
 {
   found_minimal_symbols found;
 
@@ -479,7 +478,7 @@ lookup_minimal_symbol (const char *name, const char *sfile,
 bound_minimal_symbol
 lookup_bound_minimal_symbol (const char *name)
 {
-  return lookup_minimal_symbol (name, NULL, NULL);
+  return lookup_minimal_symbol (name);
 }
 
 /* See gdbsupport/symbol.h.  */
@@ -488,7 +487,7 @@ int
 find_minimal_symbol_address (const char *name, CORE_ADDR *addr,
                             struct objfile *objfile)
 {
-  bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
+  bound_minimal_symbol sym = lookup_minimal_symbol (name, objfile);
   if (sym.minsym != NULL)
     *addr = sym.value_address ();
 
index ab80c293362f24c0c9e019ee08b504bfac04bb88..f8d4117f7b9dba80dfb0b21c313ec89903c19aca 100644 (file)
@@ -205,8 +205,9 @@ unsigned int msymbol_hash_iw (const char *);
    symbols are still preferred).  Returns a bound minimal symbol that
    matches, or an empty bound minimal symbol if no match is found.  */
 
-bound_minimal_symbol lookup_minimal_symbol (const char *, const char *,
-                                           struct objfile *);
+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.  */
index 18ef9791296bd9200d59ce04a9ae9fe28dd57faf..dd37d2ce7c751f7801df1adcf512a1063b96a037 100644 (file)
@@ -700,7 +700,7 @@ static CORE_ADDR
 mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   bound_minimal_symbol resolver
-    = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
+    = lookup_minimal_symbol ("__dl_runtime_resolve");
 
   if (resolver.minsym && resolver.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
index 18155a25a51ccb45c7d85f661648ffd80e1cb6e1..4d2c41294464e2eb426f5f6c410cfc1ed005bb4b 100644 (file)
@@ -348,8 +348,7 @@ nbsd_gdb_signal_to_target (struct gdbarch *gdbarch,
 static CORE_ADDR
 nbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  bound_minimal_symbol msym
-    = lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("_rtld_bind_start");
   if (msym.minsym && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
   else
index fc1d81c01d2b76d31b0960ee9b8871951a3b64f7..1054297c70f0c9a2d6eca81f117bcf68d856d66b 100644 (file)
@@ -120,9 +120,9 @@ lookup_objc_class (struct gdbarch *gdbarch, const char *classname)
       return 0;
     }
 
-  if (lookup_minimal_symbol("objc_lookUpClass", 0, 0).minsym)
+  if (lookup_minimal_symbol ("objc_lookUpClass").minsym != nullptr)
     function = find_function_in_inferior("objc_lookUpClass", NULL);
-  else if (lookup_minimal_symbol ("objc_lookup_class", 0, 0).minsym)
+  else if (lookup_minimal_symbol ("objc_lookup_class").minsym != nullptr)
     function = find_function_in_inferior("objc_lookup_class", NULL);
   else
     {
@@ -149,9 +149,9 @@ lookup_child_selector (struct gdbarch *gdbarch, const char *selname)
       return 0;
     }
 
-  if (lookup_minimal_symbol("sel_getUid", 0, 0).minsym)
+  if (lookup_minimal_symbol ("sel_getUid").minsym != nullptr)
     function = find_function_in_inferior("sel_getUid", NULL);
-  else if (lookup_minimal_symbol ("sel_get_any_uid", 0, 0).minsym)
+  else if (lookup_minimal_symbol ("sel_get_any_uid").minsym != nullptr)
     function = find_function_in_inferior("sel_get_any_uid", NULL);
   else
     {
@@ -180,17 +180,18 @@ value_nsstring (struct gdbarch *gdbarch, const char *ptr, int len)
   stringValue[2] = value_string(ptr, len, char_type);
   stringValue[2] = value_coerce_array(stringValue[2]);
   /* _NSNewStringFromCString replaces "istr" after Lantern2A.  */
-  if (lookup_minimal_symbol("_NSNewStringFromCString", 0, 0).minsym)
+  if (lookup_minimal_symbol ("_NSNewStringFromCString").minsym != nullptr)
     {
       function = find_function_in_inferior("_NSNewStringFromCString", NULL);
       nsstringValue = call_function_by_hand(function, NULL, stringValue[2]);
     }
-  else if (lookup_minimal_symbol("istr", 0, 0).minsym)
+  else if (lookup_minimal_symbol ("istr").minsym != nullptr)
     {
       function = find_function_in_inferior("istr", NULL);
       nsstringValue = call_function_by_hand(function, NULL, stringValue[2]);
     }
-  else if (lookup_minimal_symbol("+[NSString stringWithCString:]", 0, 0).minsym)
+  else if (lookup_minimal_symbol ("+[NSString stringWithCString:]").minsym
+          != nullptr)
     {
       function
        = find_function_in_inferior("+[NSString stringWithCString:]", NULL);
@@ -1137,7 +1138,7 @@ find_imps (const char *method, std::vector<const char *> *symbol_names)
        symbol_names->push_back (sym->natural_name ());
       else
        {
-         bound_minimal_symbol msym = lookup_minimal_symbol (selector, 0, 0);
+         bound_minimal_symbol msym = lookup_minimal_symbol (selector);
 
          if (msym.minsym != NULL) 
            symbol_names->push_back (msym.minsym->natural_name ());
index fab05b751edf64468b35f6e9e35d45c5429f4782..755e612823e726cf65951964bdfef3778236ad46 100644 (file)
@@ -27,7 +27,7 @@
 CORE_ADDR
 obsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind");
   if (msym.minsym && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
   else
index 9a8a35d0148536949f1a88c82a2b106223897844..70f28c980d94b47dcf152e79edc91c9cd824bc15 100644 (file)
@@ -59,21 +59,20 @@ static const char GPC_MAIN_PROGRAM_NAME_2[] = "pascal_main_program";
 const char *
 pascal_main_name (void)
 {
-  bound_minimal_symbol msym
-    = lookup_minimal_symbol (GPC_P_INITIALIZE, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (GPC_P_INITIALIZE);
 
   /*  If '_p_initialize' was not found, the main program is likely not
      written in Pascal.  */
   if (msym.minsym == NULL)
     return NULL;
 
-  msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_1, NULL, NULL);
+  msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_1);
   if (msym.minsym != NULL)
     {
       return GPC_MAIN_PROGRAM_NAME_1;
     }
 
-  msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_2, NULL, NULL);
+  msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_2);
   if (msym.minsym != NULL)
     {
       return GPC_MAIN_PROGRAM_NAME_2;
index 041f83dbfbd6e7590b6540a76fa753aa13bc5d82..cdba46c2a88aaff20618dc9cda2a8cc7cbfd3847 100644 (file)
@@ -1060,7 +1060,7 @@ convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
      - avoids problems when two object files (i.e., shared libraries)
      contain a minimal symbol with the same name.  */
   bound_minimal_symbol fn
-    = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1, NULL,
+    = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1,
                             dot_fn_section->objfile);
   if (fn.minsym == NULL)
     return 0;
index 1889a001a1dd18a2643b13be769b7984be3d6e7a..bf57efd6c1faf4bdccf640a045abbe0f8db794e6 100644 (file)
@@ -99,7 +99,7 @@ ps_pglobal_lookup (struct ps_prochandle *ph, const char *obj,
   set_current_program_space (inf->pspace);
 
   /* FIXME: kettenis/2000-09-03: What should we do with OBJ?  */
-  bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
+  bound_minimal_symbol ms = lookup_minimal_symbol (name);
   if (ms.minsym == NULL)
     return PS_NOSYM;
 
index 9100a2c68be5366223b4f4f4b68a6552489d39cd..68c2978a92ed9f04246998b70d381c5ddb7f3460 100644 (file)
@@ -329,14 +329,13 @@ ravenscar_thread_target::add_active_thread ()
 static bound_minimal_symbol
 get_running_thread_msymbol ()
 {
-  bound_minimal_symbol msym
-    = lookup_minimal_symbol (running_thread_name, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (running_thread_name);
   if (!msym.minsym)
     /* Older versions of the GNAT runtime were using a different
        (less ideal) name for the symbol where the active thread ID
        is stored.  If we couldn't find the symbol using the latest
        name, then try the old one.  */
-    msym = lookup_minimal_symbol ("running_thread", NULL, NULL);
+    msym = lookup_minimal_symbol ("running_thread");
 
   return msym;
 }
@@ -348,11 +347,11 @@ static bool
 has_ravenscar_runtime ()
 {
   bound_minimal_symbol msym_ravenscar_runtime_initializer
-    = lookup_minimal_symbol (ravenscar_runtime_initializer, NULL, NULL);
+    = lookup_minimal_symbol (ravenscar_runtime_initializer);
   bound_minimal_symbol msym_known_tasks
-    = lookup_minimal_symbol (known_tasks_name, NULL, NULL);
+    = lookup_minimal_symbol (known_tasks_name);
   bound_minimal_symbol msym_first_task
-    = lookup_minimal_symbol (first_task_name, NULL, NULL);
+    = lookup_minimal_symbol (first_task_name);
   bound_minimal_symbol msym_running_thread = get_running_thread_msymbol ();
 
   return (msym_ravenscar_runtime_initializer.minsym
index eab527de0eb8b02fc6caf8515624ba55a62199ad..9937b2f0a04dd7d8591c8e17f73412d4d978f1c2 100644 (file)
@@ -5508,8 +5508,7 @@ remote_target::remote_check_symbols ()
       end = hex2bin (tmp, reinterpret_cast <gdb_byte *> (msg.data ()),
                     strlen (tmp) / 2);
       msg[end] = '\0';
-      bound_minimal_symbol sym
-       = lookup_minimal_symbol (msg.data (), NULL, NULL);
+      bound_minimal_symbol sym = lookup_minimal_symbol (msg.data ());
       if (sym.minsym == NULL)
        xsnprintf (msg.data (), get_remote_packet_size (), "qSymbol::%s",
                   &reply[8]);
index e09973e90dd091501dbdcc24e9f9e46c7ff4b968..25b6aa37ec0e0060331f356c4e6322897fcb46ea 100644 (file)
@@ -759,7 +759,7 @@ ps_err_e
 ps_pglobal_lookup (struct ps_prochandle *ph, const char *ld_object_name,
                   const char *ld_symbol_name, psaddr_t *ld_symbol_addr)
 {
-  bound_minimal_symbol ms = lookup_minimal_symbol (ld_symbol_name, NULL, NULL);
+  bound_minimal_symbol ms = lookup_minimal_symbol (ld_symbol_name);
   if (!ms.minsym)
     return PS_NOSYM;
 
index b3eb8280f14daa15944b8c9e560c633203f1f32a..3081726a5e10b5f98f5b5aeb8df7b5307d2010f4 100644 (file)
@@ -63,7 +63,7 @@ sol2_sigtramp_p (const frame_info_ptr &this_frame)
 static CORE_ADDR
 sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr");
   if (msym.minsym && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
 
index 9840255895bdaa968207ec122ef96e5198ac21b2..6ea9a1326db6afc3a6f2fa1a2fd0f34fe5aca9c8 100644 (file)
@@ -451,7 +451,7 @@ lm_base (void)
     return info->lm_base_cache;
 
   bound_minimal_symbol got_sym
-    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
+    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
                             current_program_space->symfile_object_file);
 
   if (got_sym.minsym != 0)
index 062a29f4a5ebb395b766390c7b0b4296c0d2a172..b10d030c965a77744d366784ae1de4ad04965a3d 100644 (file)
@@ -280,7 +280,7 @@ lm_base (void)
     return lm_base_cache;
 
   bound_minimal_symbol got_sym
-    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
+    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
                             current_program_space->symfile_object_file);
   if (got_sym.minsym == 0)
     {
@@ -842,7 +842,7 @@ main_got (void)
 {
   objfile *objf = current_program_space->symfile_object_file;
   bound_minimal_symbol got_sym
-    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
+    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", objf);
   if (got_sym.minsym == 0)
     return 0;
 
index 4633757215d00df32ee34ab1578c09c5e2e45847..666e173ea5d08fc3811cec7748e18cff20627de5 100644 (file)
@@ -751,7 +751,7 @@ elf_locate_base (void)
   /* This may be a static executable.  Look for the symbol
      conventionally named _r_debug, as a last resort.  */
   bound_minimal_symbol msymbol
-    = lookup_minimal_symbol ("_r_debug", NULL,
+    = lookup_minimal_symbol ("_r_debug",
                             current_program_space->symfile_object_file);
   if (msymbol.minsym != NULL)
     return msymbol.value_address ();
@@ -2481,8 +2481,7 @@ enable_break (struct svr4_info *info, int from_tty)
   objfile *objf = current_program_space->symfile_object_file;
   for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
     {
-      bound_minimal_symbol msymbol
-       = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol (*bkpt_namep, objf);
       if ((msymbol.minsym != NULL)
          && (msymbol.value_address () != 0))
        {
@@ -2502,7 +2501,7 @@ enable_break (struct svr4_info *info, int from_tty)
       for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
        {
          bound_minimal_symbol msymbol
-           = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
+           = lookup_minimal_symbol (*bkpt_namep, objf);
          if ((msymbol.minsym != NULL)
              && (msymbol.value_address () != 0))
            {
index b2d0b0f50b3620d25a817975e97ad908e654e215..76433293fa39a7e3bdab33e3d817acd165143634 100644 (file)
@@ -3433,8 +3433,7 @@ simple_read_overlay_table (void)
   enum bfd_endian byte_order;
 
   simple_free_overlay_table ();
-  bound_minimal_symbol novlys_msym
-    = lookup_minimal_symbol ("_novlys", NULL, NULL);
+  bound_minimal_symbol novlys_msym = lookup_minimal_symbol ("_novlys");
   if (! novlys_msym.minsym)
     {
       error (_("Error reading inferior's overlay table: "
@@ -3523,8 +3522,7 @@ simple_overlay_update (struct obj_section *osect)
       {
        /* Does its cached location match what's currently in the
           symtab?  */
-       bound_minimal_symbol minsym
-         = lookup_minimal_symbol ("_ovly_table", NULL, NULL);
+       bound_minimal_symbol minsym = lookup_minimal_symbol ("_ovly_table");
 
        if (minsym.minsym == NULL)
          error (_("Error reading inferior's overlay table: couldn't "
index f95555769e127c821dd380c787478dc57a3bfa98..2f2366bd83a66da6a42368b4252b5535a7dd184e 100644 (file)
@@ -2580,8 +2580,7 @@ info_scope_command (const char *args_in, int from_tty)
                case LOC_UNRESOLVED:
                  {
                    bound_minimal_symbol msym
-                     = lookup_minimal_symbol (sym->linkage_name (), NULL,
-                                              NULL);
+                     = lookup_minimal_symbol (sym->linkage_name ());
                    if (msym.minsym == NULL)
                      gdb_printf ("Unresolved Static");
                    else
index 6ec8216114d2618d7b5725ed14f17e499984fec7..c37c20e90bdaa019cd972885213dc095385ea2ba 100644 (file)
@@ -403,7 +403,7 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
       if (addr == 0)
        {
          bound_minimal_symbol main_symbol
-           = lookup_minimal_symbol (main_name (), nullptr, nullptr);
+           = lookup_minimal_symbol (main_name ());
          if (main_symbol.minsym != nullptr)
            addr = main_symbol.value_address ();
        }
index b83e55090b90bdc73fa47c00b853f5988a98e9a2..45038fb69d0fcd766738a1b0e242c6cba7f4d920 100644 (file)
@@ -2988,8 +2988,7 @@ value_static_field (struct type *type, int fieldno)
        {
          /* With some compilers, e.g. HP aCC, static data members are
             reported as non-debuggable symbols.  */
-         bound_minimal_symbol msym
-           = lookup_minimal_symbol (phys_name, NULL, NULL);
+         bound_minimal_symbol msym = lookup_minimal_symbol (phys_name);
          struct type *field_type = type->field (fieldno).type ();
 
          if (!msym.minsym)
index e290b65343f9902db9f45aa34081755e2e8498d7..f04724f18badecd6e8aad0a39ffa8d7954f2ef35 100644 (file)
@@ -356,8 +356,7 @@ z80_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
   /* stage2: check for FP saving scheme */
   if (prologue[pos] == 0xcd) /* call nn */
     {
-      bound_minimal_symbol msymbol
-       = lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol ("__sdcc_enter_ix");
       if (msymbol.minsym)
        {
          value = msymbol.value_address ();
@@ -622,7 +621,7 @@ z80_frame_unwind_cache (const frame_info_ptr &this_frame,
              for (i = sizeof(names)/sizeof(*names)-1; i >= 0; --i)
                {
                  bound_minimal_symbol msymbol
-                   = lookup_minimal_symbol (names[i], NULL, NULL);
+                   = lookup_minimal_symbol (names[i]);
                  if (!msymbol.minsym)
                    continue;
                  if (addr == msymbol.value_address ())
@@ -719,8 +718,7 @@ z80_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
   static int addr = -1;
   if (addr == -1)
     {
-      bound_minimal_symbol bh
-       = lookup_minimal_symbol ("_break_handler", NULL, NULL);
+      bound_minimal_symbol bh = lookup_minimal_symbol ("_break_handler");
       if (bh.minsym)
        addr = bh.value_address ();
       else
@@ -900,7 +898,7 @@ z80_read_overlay_region_table ()
 
   z80_free_overlay_region_table ();
   bound_minimal_symbol novly_regions_msym
-    = lookup_minimal_symbol ("_novly_regions", NULL, NULL);
+    = lookup_minimal_symbol ("_novly_regions");
   if (! novly_regions_msym.minsym)
     {
       error (_("Error reading inferior's overlay table: "