]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: drop struct keyword when using bound_minimal_symbol
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 17 Jul 2024 03:51:59 +0000 (23:51 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 12 Aug 2024 14:31:09 +0000 (10:31 -0400)
This is a simple find / replace from "struct bound_minimal_symbol" to
"bound_minimal_symbol", to make things shorter and more consisten
througout.  In some cases, move variable declarations where first used.

Change-Id: Ica4af11c4ac528aa842bfa49a7afe8fe77a66849
Reviewed-by: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
95 files changed:
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h
gdb/ada-tasks.c
gdb/aix-thread.c
gdb/amd64-windows-tdep.c
gdb/arc-linux-tdep.c
gdb/arm-tdep.c
gdb/arm-wince-tdep.c
gdb/auxv.c
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/block.c
gdb/blockframe.c
gdb/breakpoint.c
gdb/bsd-uthread.c
gdb/btrace.c
gdb/c-valprint.c
gdb/coff-pe-read.c
gdb/coffread.c
gdb/compile/compile-c-symbols.c
gdb/compile/compile-cplus-symbols.c
gdb/compile/compile-object-load.c
gdb/csky-tdep.c
gdb/ctfread.c
gdb/d-exp.y
gdb/d-lang.c
gdb/dbxread.c
gdb/dwarf2/cooked-index.h
gdb/dwarf2/loc.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h
gdb/elfread.c
gdb/fbsd-tdep.c
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/glibc-tdep.c
gdb/gnu-v2-abi.c
gdb/gnu-v3-abi.c
gdb/go-exp.y
gdb/go-lang.c
gdb/hppa-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/infcall.c
gdb/infcmd.c
gdb/linespec.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/maint.c
gdb/mi/mi-symbol-cmds.c
gdb/minsyms.c
gdb/minsyms.h
gdb/mips-fbsd-tdep.c
gdb/mips-linux-tdep.c
gdb/mips-tdep.c
gdb/msp430-tdep.c
gdb/netbsd-tdep.c
gdb/objc-lang.c
gdb/objfiles.h
gdb/obsd-tdep.c
gdb/p-exp.y
gdb/p-lang.c
gdb/p-valprint.c
gdb/parse.c
gdb/ppc-linux-tdep.c
gdb/ppc-sysv-tdep.c
gdb/printcmd.c
gdb/psymtab.c
gdb/psymtab.h
gdb/python/py-framefilter.c
gdb/quick-symbol.h
gdb/ravenscar-thread.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/sol-thread.c
gdb/sol2-tdep.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-svr4.c
gdb/stack.c
gdb/symfile-debug.c
gdb/symfile.c
gdb/symtab.c
gdb/symtab.h
gdb/tracepoint.c
gdb/tui/tui-disasm.c
gdb/valops.c
gdb/value.c
gdb/x86-tdep.c
gdb/z80-tdep.c

index dfcbb2bebd9802fe597d4c4d77d26c2867e8e44f..cdfaa3af05e0c59292582634061363c557af2875 100644 (file)
@@ -1831,7 +1831,7 @@ write_var_or_type (struct parser_state *par_state,
              if (block != nullptr)
                objfile = block->objfile ();
 
-             struct bound_minimal_symbol msym
+             bound_minimal_symbol msym
                = ada_lookup_simple_minsym (decoded_name.c_str (), objfile);
              if (msym.minsym != NULL)
                {
index 1cf6ff5db8ba8505a6db5f9a7df3ffb0d01cf7bc..e0f895ccf15a97ca34414b155973aa947473a5c8 100644 (file)
@@ -798,7 +798,6 @@ ada_get_decoded_type (struct type *type)
 const char *
 ada_main_name ()
 {
-  struct bound_minimal_symbol msym;
   static gdb::unique_xmalloc_ptr<char> main_program_name;
 
   /* For Ada, the name of the main procedure is stored in a specific
@@ -806,7 +805,8 @@ ada_main_name ()
      extract its address, and then read that string.  If we didn't find
      that string, then most probably the main procedure is not written
      in Ada.  */
-  msym = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
+  bound_minimal_symbol msym
+    = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
 
   if (msym.minsym != NULL)
     {
@@ -4921,10 +4921,10 @@ add_defn_to_vec (std::vector<struct block_symbol> &result,
    specially: "standard__" is first stripped off, and only static and
    global symbols are searched.  */
 
-struct bound_minimal_symbol
+bound_minimal_symbol
 ada_lookup_simple_minsym (const char *name, struct objfile *objfile)
 {
-  struct bound_minimal_symbol result;
+  bound_minimal_symbol result;
 
   symbol_name_match_type match_type = name_match_type_from_name (name);
   lookup_name_info lookup_name (name, match_type);
@@ -11695,7 +11695,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
         the name of the exception being raised (this name is printed in
         the catchpoint message, and is also used when trying to catch
         a specific exception).  We do not handle this case for now.  */
-      struct bound_minimal_symbol msym
+      bound_minimal_symbol msym
        = lookup_minimal_symbol (einfo->catch_exception_sym, NULL, NULL);
 
       if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
@@ -11715,7 +11715,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
   sym = standard_lookup (einfo->catch_handlers_sym, NULL, SEARCH_VFT);
   if (sym == NULL)
     {
-      struct bound_minimal_symbol msym
+      bound_minimal_symbol msym
        = lookup_minimal_symbol (einfo->catch_handlers_sym, NULL, NULL);
 
       if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
index d14bfd4c6f05ea95de9f9d672c2c39e7f80c9151..77193ef78b4485761981c99b42489446e8f4d686 100644 (file)
@@ -239,8 +239,7 @@ extern struct block_symbol ada_lookup_symbol (const char *,
 extern block_symbol ada_lookup_encoded_symbol
   (const char *name, const struct block *block, domain_search_flags domain);
 
-extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *,
-                                                            objfile *);
+extern bound_minimal_symbol ada_lookup_simple_minsym (const char *, objfile *);
 
 extern int ada_scan_number (const char *, int, LONGEST *, int *);
 
index 119b223caa947c7826d99a6eba0c0e7380f746a1..745e2afe3716df74591a02a02f89f048d4878c76 100644 (file)
@@ -712,9 +712,7 @@ read_atcb (CORE_ADDR task_id, struct ada_task_info *task_info)
                               sizeof (task_info->name) - 1);
       else
        {
-         struct bound_minimal_symbol msym;
-
-         msym = lookup_minimal_symbol_by_pc (task_id);
+         bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (task_id);
          if (msym.minsym)
            {
              const char *full_name = msym.minsym->linkage_name ();
@@ -914,7 +912,6 @@ read_known_tasks_list (struct ada_tasks_inferior_data *data)
 static void
 ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
 {
-  struct bound_minimal_symbol msym;
   struct symbol *sym;
 
   /* Return now if already set.  */
@@ -923,7 +920,8 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
 
   /* Try array.  */
 
-  msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
+  bound_minimal_symbol msym
+    = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
   if (msym.minsym != NULL)
     {
       data->known_tasks_kind = ADA_TASKS_ARRAY;
index f2c5605963a7327426384805d351271d22d054fb..4c3df9c06fa507141bd7f322925696398c675c51 100644 (file)
@@ -376,7 +376,6 @@ pid_to_prc (ptid_t *ptidp)
 static int
 pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int count)
 {
-  struct bound_minimal_symbol ms;
   int i;
   char *name;
 
@@ -396,7 +395,7 @@ pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int co
        symbols[i].addr = 0;
       else
        {
-         ms = lookup_minimal_symbol (name, NULL, NULL);
+         bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
          if (ms.minsym == NULL)
            {
              if (debug_aix_thread)
@@ -956,7 +955,6 @@ pd_enable (inferior *inf)
 {
   int status;
   char *stub_name;
-  struct bound_minimal_symbol ms;
   struct aix_thread_variables *data;
 
   if (inf == NULL)
@@ -980,7 +978,7 @@ pd_enable (inferior *inf)
     return;
 
   /* Set a breakpoint on the returned stub function.  */
-  ms = lookup_minimal_symbol (stub_name, NULL, NULL);
+  bound_minimal_symbol ms = lookup_minimal_symbol (stub_name, NULL, NULL);
   if (ms.minsym == NULL)
     return;
   data->pd_brk_addr = ms.value_address ();
index 9636201d13a62b987be151099758245c174b925c..5adc7d57f4bbcae49038d95e8572c4d21fb4d95f 100644 (file)
@@ -435,11 +435,10 @@ amd64_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
       if (target_read_memory (pc + 1, buf, sizeof buf) == 0)
        {
-         struct bound_minimal_symbol s;
          CORE_ADDR call_dest;
 
          call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
-         s = lookup_minimal_symbol_by_pc (call_dest);
+         bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
          if (s.minsym != NULL
              && s.minsym->linkage_name () != NULL
              && strcmp (s.minsym->linkage_name (), "__main") == 0)
index 30bd40c8027e97e3fec26eed526e434d7ee16e6b..bbb8c0706f0c8e1f4d8245b1f6aa7f39ff224eba 100644 (file)
@@ -506,7 +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.  */
-  struct bound_minimal_symbol resolver
+  bound_minimal_symbol resolver
     = lookup_minimal_symbol ("_dl_linux_resolver", NULL, NULL);
 
   if (arc_debug)
index f36ce631a08d29ebab21a947f7c65259970998a6..6278113fc82de90356fd2356c7e9a89119717519 100644 (file)
@@ -712,7 +712,6 @@ arm_find_mapping_symbol (CORE_ADDR memaddr, CORE_ADDR *start)
 int
 arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
 {
-  struct bound_minimal_symbol sym;
   char type;
   arm_displaced_step_copy_insn_closure *dsc = nullptr;
   arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
@@ -752,7 +751,7 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
     return type == 't';
 
   /* Thumb functions have a "special" bit set in minimal symbols.  */
-  sym = lookup_minimal_symbol_by_pc (memaddr);
+  bound_minimal_symbol sym = lookup_minimal_symbol_by_pc (memaddr);
   if (sym.minsym)
     return (MSYMBOL_IS_SPECIAL (sym.minsym));
 
@@ -913,9 +912,8 @@ static int
 skip_prologue_function (struct gdbarch *gdbarch, CORE_ADDR pc, int is_thumb)
 {
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
-  struct bound_minimal_symbol msym;
 
-  msym = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
   if (msym.minsym != NULL
       && msym.value_address () == pc
       && msym.minsym->linkage_name () != NULL)
@@ -1684,7 +1682,6 @@ arm_skip_stack_protector(CORE_ADDR pc, struct gdbarch *gdbarch)
 {
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   unsigned int basereg;
-  struct bound_minimal_symbol stack_chk_guard;
   int offset;
   int is_thumb = arm_pc_is_thumb (gdbarch, pc);
   CORE_ADDR addr;
@@ -1695,7 +1692,7 @@ arm_skip_stack_protector(CORE_ADDR pc, struct gdbarch *gdbarch)
   if (!addr)
     return pc;
 
-  stack_chk_guard = lookup_minimal_symbol_by_pc (addr);
+  bound_minimal_symbol stack_chk_guard = lookup_minimal_symbol_by_pc (addr);
   /* ADDR must correspond to a symbol whose name is __stack_chk_guard.
      Otherwise, this sequence cannot be for stack protector.  */
   if (stack_chk_guard.minsym == NULL
@@ -9391,9 +9388,8 @@ 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);
 
-  struct bound_minimal_symbol minsym
-   = lookup_minimal_symbol (target_name, NULL, objfile);
-
+  bound_minimal_symbol minsym
+    = lookup_minimal_symbol (target_name, NULL, objfile);
   if (minsym.minsym != nullptr)
     return minsym.value_address ();
 
@@ -9467,7 +9463,6 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
     {
       char *target_name;
       int target_len = namelen - 2;
-      struct bound_minimal_symbol minsym;
       struct objfile *objfile;
       struct obj_section *sec;
 
@@ -9482,7 +9477,8 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
 
       sec = find_pc_section (pc);
       objfile = (sec == NULL) ? NULL : sec->objfile;
-      minsym = lookup_minimal_symbol (target_name, NULL, objfile);
+      bound_minimal_symbol minsym
+       = lookup_minimal_symbol (target_name, NULL, objfile);
       if (minsym.minsym != NULL)
        return minsym.value_address ();
       else
index eab496c2c0bd3f54c68dc6a6d3988010121d4bab..403795fbb8e2b1702e67a19910602f88ee75dd9b 100644 (file)
@@ -40,7 +40,6 @@ arm_pe_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   ULONGEST indirect;
-  struct bound_minimal_symbol indsym;
   const char *symname;
   CORE_ADDR next_pc;
 
@@ -61,7 +60,7 @@ arm_pe_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   if (indirect == 0)
     return 0;
 
-  indsym = lookup_minimal_symbol_by_pc (indirect);
+  bound_minimal_symbol indsym = lookup_minimal_symbol_by_pc (indirect);
   if (indsym.minsym == NULL)
     return 0;
 
@@ -100,7 +99,7 @@ arm_wince_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 
       long offset = sign_extend (this_instr & 0x000fffff, 23) << 2;
       CORE_ADDR call_dest = (pc + 8 + offset) & 0xffffffffU;
-      struct bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
+      bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
 
       if (s.minsym != NULL
          && s.minsym->linkage_name () != NULL
index 616564c43a3faeb4ed7ee49dac7412fb44c7a682..b47dcdf88d783289b97ca8c09bf1697d4f92f670 100644 (file)
@@ -81,7 +81,6 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
                 ULONGEST offset,
                 ULONGEST len, ULONGEST *xfered_len)
 {
-  struct bound_minimal_symbol msym;
   CORE_ADDR data_address, pointer_address;
   gdbarch *arch = current_inferior ()->arch ();
   type *ptr_type = builtin_type (arch)->builtin_data_ptr;
@@ -91,7 +90,7 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
   LONGEST retval;
   size_t block;
 
-  msym = lookup_minimal_symbol ("_dl_auxv", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv", NULL, NULL);
   if (msym.minsym == NULL)
     return TARGET_XFER_E_IO;
 
index 1e39f851bac4e5e335f0a271415cbba5822fd6b0..690ecae161f98abcf655e07ff6ccb60fe95588b0 100644 (file)
@@ -530,7 +530,6 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
   int i;
   unsigned short insn;
   int scan_stage = 0;
-  struct bound_minimal_symbol msymbol;
   unsigned char prologue[AVR_MAX_PROLOGUE_SIZE];
   int vpc = 0;
   int len;
@@ -623,7 +622,8 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
       body_addr |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
       pc_offset += 2;
 
-      msymbol = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
+      bound_minimal_symbol msymbol
+       = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
       if (!msymbol.minsym)
        break;
 
index ab5e80029e2c3af93a51bffb6873bcef9596c13c..899abb9743ce2f9af8224d0a42735386f425175e 100644 (file)
@@ -598,9 +598,8 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
 
     case LOC_UNRESOLVED:
       {
-       struct bound_minimal_symbol msym
+       bound_minimal_symbol msym
          = lookup_minimal_symbol (var->linkage_name (), NULL, NULL);
-
        if (!msym.minsym)
          error (_("Couldn't resolve symbol `%s'."), var->print_name ());
 
index 511689c9738fc18bf035da62b75c0dadafc8fe7b..8e37a63155f262df476baccc667274096770dc97 100644 (file)
@@ -227,7 +227,7 @@ call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
 
   if (cs == nullptr)
     {
-      struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
+      bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
 
       /* DW_TAG_gnu_call_site will be missing just if GCC could not determine
         the call target.  */
index 55e82fb4b193b7e8c440d42c94ccc209df666f8a..7275eb14db8cfbfa3264a92981bdc5140ae321d0 100644 (file)
@@ -85,7 +85,6 @@ CORE_ADDR
 get_pc_function_start (CORE_ADDR pc)
 {
   const struct block *bl;
-  struct bound_minimal_symbol msymbol;
 
   bl = block_for_pc (pc);
   if (bl)
@@ -99,7 +98,7 @@ get_pc_function_start (CORE_ADDR pc)
        }
     }
 
-  msymbol = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
   if (msymbol.minsym)
     {
       CORE_ADDR fstart = msymbol.value_address ();
@@ -216,9 +215,9 @@ find_pc_partial_function_sym (CORE_ADDR pc,
 {
   struct obj_section *section;
   struct symbol *f;
-  struct bound_minimal_symbol msymbol;
   struct compunit_symtab *compunit_symtab = NULL;
   CORE_ADDR mapped_pc;
+  bound_minimal_symbol msymbol;
 
   /* To ensure that the symbol returned belongs to the correct section
      (and that the last [random] symbol from the previous section
index 670a3f7acf7d9b504d89e7a5553dfc4fe3b584e1..a8f67e79012f95f4456182676ce79663874da5b1 100644 (file)
@@ -3466,7 +3466,7 @@ create_internal_breakpoint (struct gdbarch *gdbarch,
 
 static struct breakpoint *
 create_internal_breakpoint (struct gdbarch *gdbarch,
-                           struct bound_minimal_symbol &msym, enum bptype type)
+                           bound_minimal_symbol &msym, enum bptype type)
 {
   CORE_ADDR address;
 
@@ -3498,10 +3498,10 @@ static const char *const longjmp_names[] =
 struct breakpoint_objfile_data
 {
   /* Minimal symbol for "_ovly_debug_event" (if any).  */
-  struct bound_minimal_symbol overlay_msym;
+  bound_minimal_symbol overlay_msym;
 
   /* Minimal symbol(s) for "longjmp", "siglongjmp", etc. (if any).  */
-  struct bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES];
+  bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES];
 
   /* True if we have looked for longjmp probes.  */
   int longjmp_searched = 0;
@@ -3511,10 +3511,10 @@ struct breakpoint_objfile_data
   std::vector<probe *> longjmp_probes;
 
   /* Minimal symbol for "std::terminate()" (if any).  */
-  struct bound_minimal_symbol terminate_msym;
+  bound_minimal_symbol terminate_msym;
 
   /* Minimal symbol for "_Unwind_DebugHook" (if any).  */
-  struct bound_minimal_symbol exception_msym;
+  bound_minimal_symbol exception_msym;
 
   /* True if we have looked for exception probes.  */
   int exception_searched = 0;
@@ -3570,9 +3570,8 @@ create_overlay_event_breakpoint (void)
 
       if (bp_objfile_data->overlay_msym.minsym == NULL)
        {
-         struct bound_minimal_symbol m;
-
-         m = lookup_minimal_symbol_text (func_name, objfile);
+         bound_minimal_symbol m
+           = lookup_minimal_symbol_text (func_name, objfile);
          if (m.minsym == NULL)
            {
              /* Avoid future lookups in this objfile.  */
@@ -3675,9 +3674,8 @@ create_longjmp_master_breakpoint_names (objfile *objfile)
       func_name = longjmp_names[i];
       if (bp_objfile_data->longjmp_msym[i].minsym == NULL)
        {
-         struct bound_minimal_symbol m;
-
-         m = lookup_minimal_symbol_text (func_name, objfile);
+         bound_minimal_symbol m
+           = lookup_minimal_symbol_text (func_name, objfile);
          if (m.minsym == NULL)
            {
              /* Prevent future lookups in this objfile.  */
@@ -3753,9 +3751,8 @@ create_std_terminate_master_breakpoint (void)
 
          if (bp_objfile_data->terminate_msym.minsym == NULL)
            {
-             struct bound_minimal_symbol m;
-
-             m = lookup_minimal_symbol (func_name, NULL, objfile);
+             bound_minimal_symbol m
+               = lookup_minimal_symbol (func_name, NULL, objfile);
              if (m.minsym == NULL || (m.minsym->type () != mst_text
                                       && m.minsym->type () != mst_file_text))
                {
@@ -3846,9 +3843,8 @@ create_exception_master_breakpoint_hook (objfile *objfile)
 
   if (bp_objfile_data->exception_msym.minsym == NULL)
     {
-      struct bound_minimal_symbol debug_hook;
-
-      debug_hook = lookup_minimal_symbol_text (func_name, objfile);
+      bound_minimal_symbol debug_hook
+       = lookup_minimal_symbol_text (func_name, objfile);
       if (debug_hook.minsym == NULL)
        {
          bp_objfile_data->exception_msym.minsym = &msym_not_found;
index a686f173fbf25e1f41ac027a5b78f155ec32c44d..ecb12ad82fd961ebfb8a893bad6d0bf45638505c 100644 (file)
@@ -157,9 +157,7 @@ static int bsd_uthread_active;
 static CORE_ADDR
 bsd_uthread_lookup_address (const char *name, struct objfile *objfile)
 {
-  struct bound_minimal_symbol sym;
-
-  sym = lookup_minimal_symbol (name, NULL, objfile);
+  bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
   if (sym.minsym)
     return sym.value_address ();
 
index 66f20ee3fadadabd49fd8ecacf2888c31f5f1d98..5544c627b7cf9d4f5883150680dba8b1e4a92b7e 100644 (file)
@@ -547,7 +547,6 @@ ftrace_new_gap (struct btrace_thread_info *btinfo, int errcode,
 static struct btrace_function *
 ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol bmfun;
   struct minimal_symbol *mfun;
   struct symbol *fun;
   struct btrace_function *bfun;
@@ -556,7 +555,7 @@ ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
      to avoid surprises when we sometimes get a full symbol and sometimes
      only a minimal symbol.  */
   fun = find_pc_function (pc);
-  bmfun = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
   mfun = bmfun.minsym;
 
   if (fun == NULL && mfun == NULL)
index ca24b1536bcf75ec432aaeaece70bfa859639bcc..bad94903449dadcb113375100c836690a1b4d043 100644 (file)
@@ -176,8 +176,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
     {
       /* Print vtbl's nicely.  */
       CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
-      struct bound_minimal_symbol msymbol =
-       lookup_minimal_symbol_by_pc (vt_address);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (vt_address);
 
       /* If 'symbol_print' is set, we did the work above.  */
       if (!options->symbol_print
index 0da4f12f04f63ebc31e12eeeadfa721c10ed2d7a..9d087212b8c1a1ede76c6e1ba59ec3139a5aa6ce 100644 (file)
@@ -174,7 +174,6 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
                      const char *forward_func_name, int ordinal,
                      const char *dll_name, struct objfile *objfile)
 {
-  struct bound_minimal_symbol msymbol;
   enum minimal_symbol_type msymtype;
   int forward_dll_name_len = strlen (forward_dll_name);
   short section;
@@ -183,8 +182,8 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
                                                      forward_dll_name,
                                                      forward_func_name);
 
-  msymbol = lookup_bound_minimal_symbol (forward_qualified_name.c_str ());
-
+  bound_minimal_symbol msymbol
+    = lookup_bound_minimal_symbol (forward_qualified_name.c_str ());
   if (!msymbol.minsym)
     {
       int i;
index daae3ffe989c04ecdaa5e891ed2ab6a380e4487a..d4bc7d69e70e6a9ae57ab100f6ba05170b89f132 100644 (file)
@@ -574,12 +574,12 @@ coff_read_minsyms (file_ptr symtab_offset, unsigned int nsyms,
                {
                  int lead
                    = bfd_get_symbol_leading_char (objfile->obfd.get ());
-                 struct bound_minimal_symbol found;
 
                  if (lead != '\0' && *name1 == lead)
                    name1 += 1;
 
-                 found = lookup_minimal_symbol (name1, NULL, objfile);
+                 bound_minimal_symbol found
+                   = lookup_minimal_symbol (name1, NULL, objfile);
 
                  /* If found, there are symbols named "_imp_foo" and "foo"
                     respectively in OBJFILE.  Set the type of symbol "foo"
index 20e8550b3f7e8a72353c3d8337ad6ee8aa7c3aff..5e602b9be686807f9837817dae80b89a7d847d51 100644 (file)
@@ -259,8 +259,7 @@ convert_symbol_sym (compile_c_instance *context, const char *identifier,
    to use and BMSYM is the minimal symbol to convert.  */
 
 static void
-convert_symbol_bmsym (compile_c_instance *context,
-                     struct bound_minimal_symbol bmsym)
+convert_symbol_bmsym (compile_c_instance *context, bound_minimal_symbol bmsym)
 {
   struct minimal_symbol *msym = bmsym.minsym;
   struct objfile *objfile = bmsym.objfile;
@@ -356,9 +355,8 @@ gcc_convert_symbol (void *datum,
        }
       else if (request == GCC_C_ORACLE_SYMBOL)
        {
-         struct bound_minimal_symbol bmsym;
-
-         bmsym = lookup_minimal_symbol (identifier, NULL, NULL);
+         bound_minimal_symbol bmsym
+           = lookup_minimal_symbol (identifier, NULL, NULL);
          if (bmsym.minsym != NULL)
            {
              convert_symbol_bmsym (context, bmsym);
@@ -413,9 +411,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
        }
       else
        {
-         struct bound_minimal_symbol msym;
-
-         msym = lookup_bound_minimal_symbol (identifier);
+         bound_minimal_symbol msym = lookup_bound_minimal_symbol (identifier);
          if (msym.minsym != NULL)
            {
              if (compile_debug)
index 9b95cddbf248b01ac391fce42c10aef6de3110a9..45b965a30fa3a80ab41ffd9edf2ab146036aa034 100644 (file)
@@ -275,7 +275,7 @@ convert_symbol_sym (compile_cplus_instance *instance,
 
 static void
 convert_symbol_bmsym (compile_cplus_instance *instance,
-                     struct bound_minimal_symbol bmsym)
+                     bound_minimal_symbol bmsym)
 {
   struct minimal_symbol *msym = bmsym.minsym;
   struct objfile *objfile = bmsym.objfile;
@@ -453,9 +453,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context,
        }
       else
        {
-         struct bound_minimal_symbol msym;
-
-         msym = lookup_bound_minimal_symbol (identifier);
+         bound_minimal_symbol msym = lookup_bound_minimal_symbol (identifier);
          if (msym.minsym != nullptr)
            {
              if (compile_debug)
index 08e30be9d31ee8a8a9138ba00eee885eb79afabb..64856321705377f8685846388bd45866ce89c3ea 100644 (file)
@@ -604,7 +604,6 @@ compile_object_load (const compile_file_names &file_names,
   CORE_ADDR regs_addr, out_value_addr = 0;
   struct symbol *func_sym;
   struct type *func_type;
-  struct bound_minimal_symbol bmsym;
   long storage_needed;
   asymbol **symbol_table, **symp;
   long number_of_symbols, missing_symbols;
@@ -765,7 +764,8 @@ compile_object_load (const compile_file_names &file_names,
          continue;
        }
 
-      bmsym = lookup_minimal_symbol (sym->name, NULL, NULL);
+      bound_minimal_symbol bmsym
+       = lookup_minimal_symbol (sym->name, NULL, NULL);
       switch (bmsym.minsym == NULL
              ? mst_unknown : bmsym.minsym->type ())
        {
index 1b6c08eb730b7220f9ff88bdcb692c4311254c53..d69b8e5a2cadf671ecbbd5f5599bd05fa1f23f46 100644 (file)
@@ -2097,7 +2097,7 @@ csky_frame_unwind_cache (const frame_info_ptr &this_frame)
     func_size = bl->end () - bl->start ();
   else
     {
-      struct bound_minimal_symbol msymbol
+      bound_minimal_symbol msymbol
        = lookup_minimal_symbol_by_pc (prologue_start);
       if (msymbol.minsym != NULL)
        func_size = msymbol.minsym->size ();
index d8606d3c06110093e0c91c38b7a6ce31c2b1e9c4..42009dcb3bfee6fd133bf42bf4b729163708a74f 100644 (file)
@@ -323,9 +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)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol (name, nullptr, of);
+  bound_minimal_symbol msym = lookup_minimal_symbol (name, nullptr, of);
   if (msym.minsym != NULL)
     {
       sym->set_value_address (msym.value_address ());
index 6feacd8e3648f181cf2fb0a32b23b2d32f114649..f4de994ae4d602abd038b8e6af8795163e8248a7 100644 (file)
@@ -435,7 +435,7 @@ PrimaryExpression:
        '(' Expression ')'
                { /* Do nothing.  */ }
 |      IdentifierExp
-               { struct bound_minimal_symbol msymbol;
+               {
                  std::string copy = copy_name ($1);
                  struct field_of_this_result is_a_field_of_this;
                  struct block_symbol sym;
@@ -463,7 +463,8 @@ PrimaryExpression:
                  else
                    {
                      /* Lookup foreign name in global static symbols.  */
-                     msymbol = lookup_bound_minimal_symbol (copy.c_str ());
+                     bound_minimal_symbol msymbol
+                       = lookup_bound_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)
index d4f9956bc9ee1648519e81c448381b7158bf376f..0a9e9b0cb0c52b2ecf1df50622707bcbd8f404de 100644 (file)
@@ -38,9 +38,7 @@ static const char D_MAIN[] = "D main";
 const char *
 d_main_name (void)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol (D_MAIN, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN, NULL, NULL);
   if (msym.minsym != NULL)
     return D_MAIN;
 
index 830dd1cc611298632418206c452534fe1cbc6eeb..47e56d4d451f6b334c9a6b1558e6d432e81646ee 100644 (file)
@@ -891,11 +891,10 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
   return namestring;
 }
 
-static struct bound_minimal_symbol
+static bound_minimal_symbol
 find_stab_function (const char *namestring, const char *filename,
                    struct objfile *objfile)
 {
-  struct bound_minimal_symbol msym;
   int n;
 
   const char *colon = strchr (namestring, ':');
@@ -908,7 +907,7 @@ find_stab_function (const char *namestring, const char *filename,
   strncpy (p, namestring, n);
   p[n] = 0;
 
-  msym = lookup_minimal_symbol (p, filename, objfile);
+  bound_minimal_symbol msym = lookup_minimal_symbol (p, filename, objfile);
   if (msym.minsym == NULL)
     {
       /* Sun Fortran appends an underscore to the minimal symbol name,
@@ -1678,10 +1677,9 @@ read_dbx_symtab (minimal_symbol_reader &reader,
              if (nlist.n_value == 0
                  && gdbarch_sofun_address_maybe_missing (gdbarch))
                {
-                 struct bound_minimal_symbol minsym
+                 bound_minimal_symbol minsym
                    = find_stab_function (namestring,
-                                         pst ? pst->filename : NULL,
-                                         objfile);
+                                         pst ? pst->filename : NULL, objfile);
                  if (minsym.minsym != NULL)
                    nlist.n_value
                      = CORE_ADDR (minsym.minsym->unrelocated_address ());
@@ -1737,10 +1735,9 @@ read_dbx_symtab (minimal_symbol_reader &reader,
              if (nlist.n_value == 0
                  && gdbarch_sofun_address_maybe_missing (gdbarch))
                {
-                 struct bound_minimal_symbol minsym
+                 bound_minimal_symbol minsym
                    = find_stab_function (namestring,
-                                         pst ? pst->filename : NULL,
-                                         objfile);
+                                         pst ? pst->filename : NULL, objfile);
                  if (minsym.minsym != NULL)
                    nlist.n_value
                      = CORE_ADDR (minsym.minsym->unrelocated_address ());
@@ -2036,7 +2033,6 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
       && gdbarch_sofun_address_maybe_missing (gdbarch))
     {
       int n;
-      struct bound_minimal_symbol minsym;
 
       const char *colon = strchr (last_function_name, ':');
       if (colon == NULL)
@@ -2047,7 +2043,8 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
       strncpy (p, last_function_name, n);
       p[n] = 0;
 
-      minsym = lookup_minimal_symbol (p, pst->filename, objfile);
+      bound_minimal_symbol minsym
+       = lookup_minimal_symbol (p, pst->filename, objfile);
       if (minsym.minsym == NULL)
        {
          /* Sun Fortran appends an underscore to the minimal symbol name,
@@ -2840,7 +2837,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
                  && valu == section_offsets[SECT_OFF_TEXT (objfile)]
                  && gdbarch_sofun_address_maybe_missing (gdbarch))
                {
-                 struct bound_minimal_symbol minsym
+                 bound_minimal_symbol minsym
                    = find_stab_function (name, get_last_source_file (),
                                          objfile);
                  if (minsym.minsym != NULL)
index efd03e61b65d53970476fae66c4d9d4f9ecdb0d7..fa8b2fc7ec7c9846ce5947c286c1c5937d9c0805 100644 (file)
@@ -788,7 +788,7 @@ struct cooked_index_functions : public dwarf2_base_index_functions
      domain_search_flags domain) override;
 
   struct compunit_symtab *find_pc_sect_compunit_symtab
-    (struct objfile *objfile, struct bound_minimal_symbol msymbol,
+    (struct objfile *objfile, bound_minimal_symbol msymbol,
      CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override
   {
     wait (objfile, true);
index 637c81f040e86db794363ebccafe732598e40037..57a4706d29213db06a302d63061ca624ac1597fb 100644 (file)
@@ -667,9 +667,8 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
        dwarf_block = m_loc.dwarf_block;
        if (dwarf_block == NULL)
          {
-           struct bound_minimal_symbol msym;
-           
-           msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
+           bound_minimal_symbol msym
+             = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
            throw_error (NO_ENTRY_VALUE_ERROR,
                         _("DW_AT_call_target is not specified at %s in %s"),
                         paddress (call_site_gdbarch, call_site->pc ()),
@@ -679,9 +678,8 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
          }
        if (caller_frame == NULL)
          {
-           struct bound_minimal_symbol msym;
-           
-           msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
+           bound_minimal_symbol msym
+             = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
            throw_error (NO_ENTRY_VALUE_ERROR,
                         _("DW_AT_call_target DWARF block resolving "
                           "requires known frame which is currently not "
@@ -708,12 +706,12 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
     case call_site_target::PHYSNAME:
       {
        const char *physname;
-       struct bound_minimal_symbol msym;
 
        physname = m_loc.physname;
 
        /* Handle both the mangled and demangled PHYSNAME.  */
-       msym = lookup_minimal_symbol (physname, NULL, NULL);
+       bound_minimal_symbol msym
+         = lookup_minimal_symbol (physname, NULL, NULL);
        if (msym.minsym == NULL)
          {
            msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
@@ -820,9 +818,8 @@ func_verify_no_selftailcall (struct gdbarch *gdbarch, CORE_ADDR verify_addr)
            {
              if (target_addr == verify_addr)
                {
-                 struct bound_minimal_symbol msym;
-
-                 msym = lookup_minimal_symbol_by_pc (verify_addr);
+                 bound_minimal_symbol msym
+                   = lookup_minimal_symbol_by_pc (verify_addr);
                  throw_error (NO_ENTRY_VALUE_ERROR,
                               _("DW_OP_entry_value resolving has found "
                                 "function \"%s\" at %s can call itself via tail "
@@ -846,7 +843,7 @@ static void
 tailcall_dump (struct gdbarch *gdbarch, const struct call_site *call_site)
 {
   CORE_ADDR addr = call_site->pc ();
-  struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr - 1);
+  bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr - 1);
 
   gdb_printf (gdb_stdlog, " %s(%s)", paddress (gdbarch, addr),
              (msym.minsym == NULL ? "???"
@@ -1064,10 +1061,10 @@ call_site_find_chain_1 (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
 
   if (retval == NULL)
     {
-      struct bound_minimal_symbol msym_caller, msym_callee;
-      
-      msym_caller = lookup_minimal_symbol_by_pc (caller_pc);
-      msym_callee = lookup_minimal_symbol_by_pc (callee_pc);
+      bound_minimal_symbol msym_caller
+       = lookup_minimal_symbol_by_pc (caller_pc);
+      bound_minimal_symbol msym_callee
+       = lookup_minimal_symbol_by_pc (callee_pc);
       throw_error (NO_ENTRY_VALUE_ERROR,
                   _("There are no unambiguously determinable intermediate "
                     "callers or callees between caller function \"%s\" at %s "
@@ -1165,8 +1162,7 @@ dwarf_expr_reg_to_entry_parameter (const frame_info_ptr &initial_frame,
   caller_frame = get_prev_frame (frame);
   if (gdbarch != frame_unwind_arch (frame))
     {
-      struct bound_minimal_symbol msym
-       = lookup_minimal_symbol_by_pc (func_addr);
+      bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (func_addr);
       struct gdbarch *caller_gdbarch = frame_unwind_arch (frame);
 
       throw_error (NO_ENTRY_VALUE_ERROR,
@@ -1181,8 +1177,7 @@ dwarf_expr_reg_to_entry_parameter (const frame_info_ptr &initial_frame,
 
   if (caller_frame == NULL)
     {
-      struct bound_minimal_symbol msym
-       = lookup_minimal_symbol_by_pc (func_addr);
+      bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (func_addr);
 
       throw_error (NO_ENTRY_VALUE_ERROR, _("DW_OP_entry_value resolving "
                                           "requires caller of %s (%s)"),
index 71237d0fba86907ec6d256206cfcf7ddf917c94b..a0013f7e475692a46b934b8bb185bbb89ad8b3ed 100644 (file)
@@ -2997,7 +2997,7 @@ recursively_find_pc_sect_compunit_symtab (struct compunit_symtab *cust,
 struct compunit_symtab *
 dwarf2_base_index_functions::find_pc_sect_compunit_symtab
      (struct objfile *objfile,
-      struct bound_minimal_symbol msymbol,
+      bound_minimal_symbol msymbol,
       CORE_ADDR pc,
       struct obj_section *section,
       int warn_if_readin)
index e55d053232c9bf954028f7a418ab52a45a73ccc0..40e1f555b772731b69ae36d0c4511054dde2d536 100644 (file)
@@ -844,7 +844,7 @@ struct dwarf2_base_index_functions : public quick_symbol_functions
   void expand_all_symtabs (struct objfile *objfile) override;
 
   struct compunit_symtab *find_pc_sect_compunit_symtab
-    (struct objfile *objfile, struct bound_minimal_symbol msymbol,
+    (struct objfile *objfile, bound_minimal_symbol msymbol,
      CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
        override;
 
index 7a6a8cadcedd1f1fe5506d62c7c64f2b5f6fa718..c82e1506fd3f63d02ba22abb0621b4be8c553a20 100644 (file)
@@ -694,13 +694,12 @@ elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp)
 static int
 elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
 {
-  struct bound_minimal_symbol msym;
   struct objfile *objfile;
   htab_t htab;
   struct elf_gnu_ifunc_cache entry_local, *entry_p;
   void **slot;
 
-  msym = lookup_minimal_symbol_by_pc (addr);
+  bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr);
   if (msym.minsym == NULL)
     return 0;
   if (msym.value_address () != addr)
index 08a01c1e2e3df733556a595ea4fd5087bfdda01e..6b0d502a748767e9fff6c98c91ad06444a833540 100644 (file)
@@ -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)
 {
-  struct bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_rtld_bind");
+  bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_rtld_bind");
   if (msym.minsym != nullptr && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
 
index 1b5e15f831b7272265316e154a8e713f6330dee8..b1f79f30cf0542d2629ebeb0dc869e628e126ada 100644 (file)
@@ -1062,14 +1062,13 @@ frv_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
     {
       LONGEST displ;
       CORE_ADDR call_dest;
-      struct bound_minimal_symbol s;
 
       displ = ((op & 0xfe000000) >> 7) | (op & 0x0003ffff);
       if ((displ & 0x00800000) != 0)
        displ |= ~((LONGEST) 0x00ffffff);
 
       call_dest = pc + 4 * displ;
-      s = lookup_minimal_symbol_by_pc (call_dest);
+      bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
 
       if (s.minsym != NULL
          && s.minsym->linkage_name () != NULL
@@ -1374,14 +1373,14 @@ frv_frame_this_id (const frame_info_ptr &this_frame,
     = frv_frame_unwind_cache (this_frame, this_prologue_cache);
   CORE_ADDR base;
   CORE_ADDR func;
-  struct bound_minimal_symbol msym_stack;
   struct frame_id id;
 
   /* The FUNC is easy.  */
   func = get_frame_func (this_frame);
 
   /* Check if the stack is empty.  */
-  msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
+  bound_minimal_symbol msym_stack
+    = lookup_minimal_symbol ("_stack", NULL, NULL);
   if (msym_stack.minsym && info->base == msym_stack.value_address ())
     return;
 
index 647c58441515664185b3759249ce99fd308800f8..e34a619b1390edfcd334579197d4688e29ded73f 100644 (file)
@@ -174,8 +174,8 @@ ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
   ULONGEST inst;
   int isize = 0;
   int regnum, pushreg;
-  struct bound_minimal_symbol msymbol;
   const int first_saved_reg = 13;      /* The first saved register.  */
+
   /* PROLOGS are addresses of the subroutine prologs, PROLOGS[n]
      is the address of __prolog_$rN.
      __prolog_$rN pushes registers from 13 through n inclusive.
@@ -195,7 +195,8 @@ ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
 
       snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
                regnum);
-      msymbol = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
+      bound_minimal_symbol msymbol
+       = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
       if (msymbol.minsym)
        prologs[regnum] = msymbol.value_address ();
       else
index 48e080ae9bf330440df914e7c4ba8ca687891272..0ade1df6b349ec22c864a062a8f32d924b2ef6a6 100644 (file)
@@ -52,13 +52,13 @@ glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
      of GNU/Linux will provide a portable, efficient interface for
      debugging programs that use shared libraries.  */
 
-  struct bound_minimal_symbol resolver 
+  bound_minimal_symbol resolver
     = lookup_bound_minimal_symbol ("_dl_runtime_resolve");
 
   if (resolver.minsym)
     {
       /* The dynamic linker began using this name in early 2005.  */
-      struct bound_minimal_symbol fixup
+      bound_minimal_symbol fixup
        = lookup_minimal_symbol ("_dl_fixup", NULL, resolver.objfile);
       
       /* This is the name used in older versions.  */
index 7b511eabdec8191df99039e4f926691614973fee..0a9c09ef5aec854fa1ccf42222e1149ae3f360ae 100644 (file)
@@ -186,7 +186,6 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
   struct type *known_type;
   struct type *rtti_type;
   CORE_ADDR vtbl;
-  struct bound_minimal_symbol minsym;
   char *p;
   const char *linkage_name;
   struct type *btype;
@@ -239,7 +238,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
   vtbl = value_as_address (value_field (v, known_type_vptr_fieldno));
 
   /* Try to find a symbol that is the vtable.  */
-  minsym=lookup_minimal_symbol_by_pc(vtbl);
+  bound_minimal_symbol minsym = lookup_minimal_symbol_by_pc (vtbl);
   if (minsym.minsym==NULL
       || (linkage_name=minsym.minsym->linkage_name ())==NULL
       || !is_vtable_name (linkage_name))
index 1311a99ad8c2f95038ee41e93d26c7ce562deb6a..92735b9d6177b8df3c89223f8be45b30920d7e62 100644 (file)
@@ -1178,14 +1178,13 @@ static std::string
 gnuv3_get_typename_from_type_info (struct value *type_info_ptr)
 {
   struct gdbarch *gdbarch = type_info_ptr->type ()->arch ();
-  struct bound_minimal_symbol typeinfo_sym;
   CORE_ADDR addr;
   const char *symname;
   const char *class_name;
   const char *atsign;
 
   addr = value_as_address (type_info_ptr);
-  typeinfo_sym = lookup_minimal_symbol_by_pc (addr);
+  bound_minimal_symbol typeinfo_sym = lookup_minimal_symbol_by_pc (addr);
   if (typeinfo_sym.minsym == NULL)
     error (_("could not find minimal symbol for typeinfo address %s"),
           paddress (gdbarch, addr));
@@ -1229,7 +1228,6 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
 {
   CORE_ADDR real_stop_pc, method_stop_pc, func_addr;
   struct gdbarch *gdbarch = get_frame_arch (frame);
-  struct bound_minimal_symbol thunk_sym, fn_sym;
   struct obj_section *section;
   const char *thunk_name, *fn_name;
   
@@ -1238,7 +1236,7 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
     real_stop_pc = stop_pc;
 
   /* Find the linker symbol for this potential thunk.  */
-  thunk_sym = lookup_minimal_symbol_by_pc (real_stop_pc);
+  bound_minimal_symbol thunk_sym = lookup_minimal_symbol_by_pc (real_stop_pc);
   section = find_pc_section (real_stop_pc);
   if (thunk_sym.minsym == NULL || section == NULL)
     return 0;
@@ -1251,7 +1249,8 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
     return 0;
 
   fn_name = strstr (thunk_name, " thunk to ") + strlen (" thunk to ");
-  fn_sym = lookup_minimal_symbol (fn_name, NULL, section->objfile);
+  bound_minimal_symbol fn_sym
+    = lookup_minimal_symbol (fn_name, NULL, section->objfile);
   if (fn_sym.minsym == NULL)
     return 0;
 
index 115c71ba8ea946058302f95a245176368e9ab2c3..345b2315d3af91db83c32edc427f89b1bbf1304b 100644 (file)
@@ -569,10 +569,9 @@ variable:  name_not_typename
                            }
                          else
                            {
-                             struct bound_minimal_symbol msymbol;
                              std::string arg = copy_name ($1.stoken);
 
-                             msymbol =
+                             bound_minimal_symbol msymbol =
                                lookup_bound_minimal_symbol (arg.c_str ());
                              if (msymbol.minsym != NULL)
                                pstate->push_new<var_msym_value_operation>
index 8b4250b222a819da53fd5437b0d43d33baf49343..bbf4479a6d29f3351b10e979f9734f1ced51b1a2 100644 (file)
@@ -54,9 +54,7 @@ static const char GO_MAIN_MAIN[] = "main.main";
 const char *
 go_main_name (void)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
   if (msym.minsym != NULL)
     return GO_MAIN_MAIN;
 
index c15a9fcc03faff106da6f65bb36d6720d4cd84a1..43cf46b3c1622d313d366a215806d765807fef11 100644 (file)
@@ -194,9 +194,7 @@ hppa_extract_17 (unsigned word)
 CORE_ADDR 
 hppa_symbol_address(const char *sym)
 {
-  struct bound_minimal_symbol minsym;
-
-  minsym = lookup_minimal_symbol (sym, NULL, NULL);
+  bound_minimal_symbol minsym = lookup_minimal_symbol (sym, NULL, NULL);
   if (minsym.minsym)
     return minsym.value_address ();
   else
index f1f909e16169f201df468ab0ef5ca07a18e07ce2..625ffe5a3068bc78356e87b1b64f1b40ba50b076 100644 (file)
@@ -1946,12 +1946,11 @@ i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
        {
          /* Make sure address is computed correctly as a 32bit
             integer even if CORE_ADDR is 64 bit wide.  */
-         struct bound_minimal_symbol s;
          CORE_ADDR call_dest;
 
          call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
          call_dest = call_dest & 0xffffffffU;
-         s = lookup_minimal_symbol_by_pc (call_dest);
+         bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
          if (s.minsym != NULL
              && s.minsym->linkage_name () != NULL
              && strcmp (s.minsym->linkage_name (), "__main") == 0)
index 6376cf8d0699b7e49323c941a0d422b37e7b646c..27393043c65680f3ed4db527af4f720406c49190 100644 (file)
@@ -3615,9 +3615,7 @@ ia64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
   /* There are also descriptors embedded in vtables.  */
   if (s)
     {
-      struct bound_minimal_symbol minsym;
-
-      minsym = lookup_minimal_symbol_by_pc (addr);
+      bound_minimal_symbol minsym = lookup_minimal_symbol_by_pc (addr);
 
       if (minsym.minsym
          && is_vtable_name (minsym.minsym->linkage_name ()))
index 559fcb7f9a6af149812617ce45b9020f1c574f25..02e3b385bd7856b4cc98e99b52c50c6ca0a76a22 100644 (file)
@@ -488,7 +488,7 @@ get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
 
   {
     /* Try the minimal symbols.  */
-    struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (funaddr);
+    bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (funaddr);
 
     if (msymbol.minsym)
       return msymbol.minsym->print_name ();
index a030788331c3a8c0f536111dab0f7bf76a375483..347684a0be1a86ccf7b630d246def7530e77efcd 100644 (file)
@@ -1360,7 +1360,7 @@ until_next_command (int from_tty)
 
   if (!func)
     {
-      struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
 
       if (msymbol.minsym == nullptr)
        error (_("Execution is not within a known function."));
index 9b0652c9967b00f400b8dce8c4c0f7b40f783440..ee418e3a5070f383bad30bd0cd1dd933657cb6a1 100644 (file)
@@ -4165,7 +4165,7 @@ minsym_found (struct linespec_state *self, struct objfile *objfile,
 static void
 add_minsym (struct minimal_symbol *minsym, struct objfile *objfile,
            struct symtab *symtab, int list_mode,
-           std::vector<struct bound_minimal_symbol> *msyms)
+           std::vector<bound_minimal_symbol> *msyms)
 {
   if (symtab != NULL)
     {
@@ -4202,7 +4202,7 @@ search_minsyms_for_name (struct collect_info *info,
                         struct program_space *search_pspace,
                         struct symtab *symtab)
 {
-  std::vector<struct bound_minimal_symbol> minsyms;
+  std::vector<bound_minimal_symbol> minsyms;
 
   if (symtab == NULL)
     {
index 319a13fd480804bc3712931db5dc36719be876b7..e34c5e0b52546f892a744c88e0fb4d2d42a62397 100644 (file)
@@ -638,9 +638,7 @@ info_checkpoints_command (const char *arg, int from_tty)
        gdb_printf (_(", line %d"), sal.line);
       if (!sal.symtab && !sal.line)
        {
-         struct bound_minimal_symbol msym;
-
-         msym = lookup_minimal_symbol_by_pc (pc);
+         bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
          if (msym.minsym)
            gdb_printf (", <%s>", msym.minsym->linkage_name ());
        }
index 018bd689faac2809e1f87c54cec53786161d8c71..0a63957a0161332a3be93f4eec1025cc8c7864bc 100644 (file)
@@ -467,11 +467,11 @@ verbose_dlsym (void *handle, const char *name)
 static int
 inferior_has_bug (const char *ver_symbol, int ver_major_min, int ver_minor_min)
 {
-  struct bound_minimal_symbol version_msym;
   CORE_ADDR version_addr;
   int got, retval = 0;
 
-  version_msym = lookup_minimal_symbol (ver_symbol, NULL, NULL);
+  bound_minimal_symbol version_msym
+    = lookup_minimal_symbol (ver_symbol, NULL, NULL);
   if (version_msym.minsym == NULL)
     return 0;
 
index d9890d0e46449c3c8c6e9eb001ba4bf47f4fcf10..db859bc93d7ea2867cef9f81fabf71ee36a98821 100644 (file)
@@ -2212,7 +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.  */
-         struct bound_minimal_symbol mem0
+         bound_minimal_symbol mem0
            = lookup_minimal_symbol ("mem0", NULL, NULL);
 
          if (! mem0.minsym)
@@ -2244,7 +2244,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.  */
-         struct bound_minimal_symbol mem0
+         bound_minimal_symbol mem0
            = lookup_minimal_symbol ("mem0", NULL, NULL);
 
          if (! mem0.minsym)
@@ -2421,11 +2421,9 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
     {
       const char *func_name;
       char *tramp_name;
-      struct bound_minimal_symbol tramp_msym;
 
       /* Try to find a linker symbol at this address.  */
-      struct bound_minimal_symbol func_msym
-       = lookup_minimal_symbol_by_pc (addr);
+      bound_minimal_symbol func_msym = lookup_minimal_symbol_by_pc (addr);
 
       if (! func_msym.minsym)
        error (_("Cannot convert code address %s to function pointer:\n"
@@ -2438,7 +2436,8 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
       strcat (tramp_name, ".plt");
 
       /* Try to find a linker symbol for the trampoline.  */
-      tramp_msym = lookup_minimal_symbol (tramp_name, NULL, NULL);
+      bound_minimal_symbol tramp_msym
+       = lookup_minimal_symbol (tramp_name, NULL, NULL);
 
       /* We've either got another copy of the name now, or don't need
         the name any more.  */
@@ -2502,7 +2501,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
     {
       /* See if there is a minimal symbol at that address whose name is
         "NAME.plt".  */
-      struct bound_minimal_symbol ptr_msym = lookup_minimal_symbol_by_pc (ptr);
+      bound_minimal_symbol ptr_msym = lookup_minimal_symbol_by_pc (ptr);
 
       if (ptr_msym.minsym)
        {
@@ -2512,7 +2511,6 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
          if (len > 4
              && strcmp (ptr_msym_name + len - 4, ".plt") == 0)
            {
-             struct bound_minimal_symbol func_msym;
              /* We have a .plt symbol; try to find the symbol for the
                 corresponding function.
 
@@ -2522,7 +2520,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
              char *func_name = (char *) xmalloc (len - 4 + 1);
              memcpy (func_name, ptr_msym_name, len - 4);
              func_name[len - 4] = '\0';
-             func_msym
+             bound_minimal_symbol func_msym
                = lookup_minimal_symbol (func_name, NULL, NULL);
 
              /* If we do have such a symbol, return its value as the
index f2f8602f23c63f3a0087fe28796a084770236352..b41d8a5a1f287e6d631d47189b483c71ef82cf57 100644 (file)
@@ -800,14 +800,14 @@ m32r_frame_this_id (const frame_info_ptr &this_frame,
     = m32r_frame_unwind_cache (this_frame, this_prologue_cache);
   CORE_ADDR base;
   CORE_ADDR func;
-  struct bound_minimal_symbol msym_stack;
   struct frame_id id;
 
   /* The FUNC is easy.  */
   func = get_frame_func (this_frame);
 
   /* Check if the stack is empty.  */
-  msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
+  bound_minimal_symbol msym_stack
+    = lookup_minimal_symbol ("_stack", NULL, NULL);
   if (msym_stack.minsym && info->base == msym_stack.value_address ())
     return;
 
index e58e44b7fd22b80e04f3e06cc63d4a61d6ee837b..4093d2b6ee6e67ec0778f957e284a76682e21156 100644 (file)
@@ -210,9 +210,7 @@ static int soft_reg_initialized = 0;
 static void
 m68hc11_get_register_info (struct m68hc11_soft_reg *reg, const char *name)
 {
-  struct bound_minimal_symbol msymbol;
-
-  msymbol = lookup_minimal_symbol (name, NULL, NULL);
+  bound_minimal_symbol msymbol = lookup_minimal_symbol (name, NULL, NULL);
   if (msymbol.minsym)
     {
       reg->addr = msymbol.value_address ();
@@ -591,12 +589,10 @@ m68hc11_analyze_instruction (struct gdbarch *gdbarch,
 static enum insn_return_kind
 m68hc11_get_return_insn (CORE_ADDR pc)
 {
-  struct bound_minimal_symbol sym;
-
   /* A flag indicating that this is a STO_M68HC12_FAR or STO_M68HC12_INTERRUPT
      function is stored by elfread.c in the high bit of the info field.
      Use this to decide which instruction the function uses to return.  */
-  sym = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol sym = lookup_minimal_symbol_by_pc (pc);
   if (sym.minsym == 0)
     return RETURN_RTS;
 
index be68e454f644815d240718b31ad8d1e8a3a92132..2f2874a7ab2dd061212b7909ce7e4d23c30af275 100644 (file)
@@ -390,13 +390,13 @@ static CORE_ADDR
 macho_resolve_oso_sym_with_minsym (struct objfile *main_objfile, asymbol *sym)
 {
   /* For common symbol and global symbols, use the min symtab.  */
-  struct bound_minimal_symbol msym;
   const char *name = sym->name;
 
   if (*name != '\0'
       && *name == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
     ++name;
-  msym = lookup_minimal_symbol (name, NULL, main_objfile);
+
+  bound_minimal_symbol msym = lookup_minimal_symbol (name, NULL, main_objfile);
   if (msym.minsym == NULL)
     {
       warning (_("can't find symbol '%s' in minsymtab"), name);
index d0916347f94c5d19d34e6f94f32854842770d33d..237c9d8c8a35d6718f92e52a2f5e4f345a3af7c3 100644 (file)
@@ -546,7 +546,6 @@ maintenance_translate_address (const char *arg, int from_tty)
   CORE_ADDR address;
   struct obj_section *sect;
   const char *p;
-  struct bound_minimal_symbol sym;
 
   if (arg == NULL || *arg == 0)
     error (_("requires argument (address or section + address)"));
@@ -577,6 +576,7 @@ maintenance_translate_address (const char *arg, int from_tty)
 
   address = parse_and_eval_address (p);
 
+  bound_minimal_symbol sym;
   if (sect)
     sym = lookup_minimal_symbol_by_pc_section (address, sect);
   else
index 15c032b9ae2920797e7359492393713d58f7163d..e90055f6011cab59ecf13f9715b1200acb6b1b76 100644 (file)
@@ -95,8 +95,7 @@ output_debug_symbol (ui_out *uiout, domain_search_flags kind,
    and then outputs the fields for this msymbol.  */
 
 static void
-output_nondebug_symbol (ui_out *uiout,
-                       const struct bound_minimal_symbol &msymbol)
+output_nondebug_symbol (ui_out *uiout, const bound_minimal_symbol &msymbol)
 {
   struct gdbarch *gdbarch = msymbol.objfile->arch ();
   ui_out_emit_tuple tuple_emitter (uiout, NULL);
index 38176c4bdcb48b08369efabfa0026d72c556c1c7..49381dd84f7c59182d04aefc189cfa9aebfc7ce1 100644 (file)
@@ -358,7 +358,7 @@ lookup_minimal_symbol_demangled (const lookup_name_info &lookup_name,
    Obviously, there must be distinct mangled names for each of these,
    but the demangled names are all the same: S::S or S::~S.  */
 
-struct bound_minimal_symbol
+bound_minimal_symbol
 lookup_minimal_symbol (const char *name, const char *sfile,
                       struct objfile *objf)
 {
@@ -476,7 +476,7 @@ lookup_minimal_symbol (const char *name, const char *sfile,
 
 /* See minsyms.h.  */
 
-struct bound_minimal_symbol
+bound_minimal_symbol
 lookup_bound_minimal_symbol (const char *name)
 {
   return lookup_minimal_symbol (name, NULL, NULL);
@@ -488,9 +488,7 @@ int
 find_minimal_symbol_address (const char *name, CORE_ADDR *addr,
                             struct objfile *objfile)
 {
-  struct bound_minimal_symbol sym
-    = lookup_minimal_symbol (name, NULL, objfile);
-
+  bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
   if (sym.minsym != NULL)
     *addr = sym.value_address ();
 
@@ -591,7 +589,7 @@ lookup_minimal_symbol_linkage (const char *name, struct objfile *objf)
 
 /* See minsyms.h.  */
 
-struct bound_minimal_symbol
+bound_minimal_symbol
 lookup_minimal_symbol_linkage (const char *name, bool only_main)
 {
   for (objfile *objfile : current_program_space->objfiles ())
@@ -613,12 +611,12 @@ lookup_minimal_symbol_linkage (const char *name, bool only_main)
 
 /* See minsyms.h.  */
 
-struct bound_minimal_symbol
+bound_minimal_symbol
 lookup_minimal_symbol_text (const char *name, struct objfile *objf)
 {
   struct minimal_symbol *msymbol;
-  struct bound_minimal_symbol found_symbol;
-  struct bound_minimal_symbol found_file_symbol;
+  bound_minimal_symbol found_symbol;
+  bound_minimal_symbol found_file_symbol;
 
   unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
 
@@ -765,7 +763,6 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
   struct minimal_symbol *msymbol;
   struct minimal_symbol *best_symbol = NULL;
   struct objfile *best_objfile = NULL;
-  struct bound_minimal_symbol result;
 
   if (previous != nullptr)
     {
@@ -997,6 +994,7 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
        }
     }
 
+  bound_minimal_symbol result;
   result.minsym = best_symbol;
   result.objfile = best_objfile;
   return result;
@@ -1004,7 +1002,7 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
 
 /* See minsyms.h.  */
 
-struct bound_minimal_symbol
+bound_minimal_symbol
 lookup_minimal_symbol_by_pc (CORE_ADDR pc)
 {
   return lookup_minimal_symbol_by_pc_section (pc, NULL);
@@ -1598,7 +1596,7 @@ find_solib_trampoline_target (const frame_info_ptr &frame, CORE_ADDR pc)
 /* See minsyms.h.  */
 
 CORE_ADDR
-minimal_symbol_upper_bound (struct bound_minimal_symbol minsym)
+minimal_symbol_upper_bound (bound_minimal_symbol minsym)
 {
   short section;
   struct obj_section *obj_section;
index d44f281939ba015d3a5e708a74318fa4e38e6ec1..ab80c293362f24c0c9e019ee08b504bfac04bb88 100644 (file)
@@ -205,14 +205,13 @@ 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.  */
 
-struct bound_minimal_symbol lookup_minimal_symbol (const char *,
-                                                  const char *,
-                                                  struct objfile *);
+bound_minimal_symbol lookup_minimal_symbol (const char *, const char *,
+                                           struct objfile *);
 
 /* Like lookup_minimal_symbol, but searches all files and
    objfiles.  */
 
-struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
+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
@@ -222,8 +221,8 @@ struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
 
    This function only searches the mangled (linkage) names.  */
 
-struct bound_minimal_symbol lookup_minimal_symbol_text (const char *,
-                                                       struct objfile *);
+bound_minimal_symbol lookup_minimal_symbol_text (const char *,
+                                                struct objfile *);
 
 /* Look through the minimal symbols in OBJF (and its separate debug
    objfiles) for a global (not file-local) minsym whose linkage name
@@ -232,16 +231,16 @@ struct bound_minimal_symbol lookup_minimal_symbol_text (const char *,
    objfile is not accepted.  Returns a bound minimal symbol that
    matches, or an "empty" bound minimal symbol otherwise.  */
 
-extern struct bound_minimal_symbol lookup_minimal_symbol_linkage
-  (const char *name, struct objfile *objf)
+extern bound_minimal_symbol lookup_minimal_symbol_linkage (const char *name,
+                                                          struct objfile *objf)
   ATTRIBUTE_NONNULL (1) ATTRIBUTE_NONNULL (2);
 
 /* A variant of lookup_minimal_symbol_linkage that iterates over all
    objfiles.  If ONLY_MAIN is true, then only an objfile with
    OBJF_MAINLINE will be considered.  */
 
-extern struct bound_minimal_symbol lookup_minimal_symbol_linkage
-  (const char *name, bool only_main)
+extern bound_minimal_symbol lookup_minimal_symbol_linkage (const char *name,
+                                                          bool only_main)
   ATTRIBUTE_NONNULL (1);
 
 /* Look through all the current minimal symbol tables and find the
@@ -287,7 +286,7 @@ enum class lookup_msym_prefer
    then the contents will be set to reference the closest symbol before
    PC_IN.  */
 
-struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section
+bound_minimal_symbol lookup_minimal_symbol_by_pc_section
   (CORE_ADDR pc_in,
    struct obj_section *section,
    lookup_msym_prefer prefer = lookup_msym_prefer::TEXT,
@@ -299,7 +298,7 @@ struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section
    This is a wrapper that calls lookup_minimal_symbol_by_pc_section
    with a NULL section argument.  */
 
-struct bound_minimal_symbol lookup_minimal_symbol_by_pc (CORE_ADDR);
+bound_minimal_symbol lookup_minimal_symbol_by_pc (CORE_ADDR);
 
 /* Iterate over all the minimal symbols in the objfile OBJF which
    match NAME.  Both the ordinary and demangled names of each symbol
@@ -318,7 +317,7 @@ void iterate_over_minimal_symbols
    symbol in the same section, or the end of the section, as the end
    of the function.  */
 
-CORE_ADDR minimal_symbol_upper_bound (struct bound_minimal_symbol minsym);
+CORE_ADDR minimal_symbol_upper_bound (bound_minimal_symbol minsym);
 
 /* Return the type of MSYMBOL, a minimal symbol of OBJFILE.  If
    ADDRESS_P is not NULL, set it to the MSYMBOL's resolved
index 7452057e74bbca6196e4604530ca79429e414f25..717c9c5dae476bc02568313bc93e03e413758b69 100644 (file)
@@ -468,8 +468,7 @@ static const struct tramp_frame mips64_fbsd_sigframe =
 static CORE_ADDR
 mips_fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol msym
-    = lookup_bound_minimal_symbol ("_mips_rtld_bind");
+  bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_mips_rtld_bind");
   if (msym.minsym != nullptr && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
 
index fecefd723ac4623069633766fcadb5af1bc02a24..18ef9791296bd9200d59ce04a9ae9fe28dd57faf 100644 (file)
@@ -699,9 +699,8 @@ mips_linux_in_dynsym_resolve_code (CORE_ADDR pc)
 static CORE_ADDR
 mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol resolver;
-
-  resolver = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
+  bound_minimal_symbol resolver
+    = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
 
   if (resolver.minsym && resolver.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
index ae58d7c87206c2223244c83efbde14c6a2a212f6..e935e26132d53dae54fe55ca00d1d72f0ca823a7 100644 (file)
@@ -490,10 +490,10 @@ mips_make_symbol_special (struct symbol *sym, struct objfile *objfile)
       /* We are in symbol reading so it is OK to cast away constness.  */
       struct block *block = (struct block *) sym->value_block ();
       CORE_ADDR compact_block_start;
-      struct bound_minimal_symbol msym;
 
       compact_block_start = block->start () | 1;
-      msym = lookup_minimal_symbol_by_pc (compact_block_start);
+      bound_minimal_symbol msym
+       = lookup_minimal_symbol_by_pc (compact_block_start);
       if (msym.minsym && !msymbol_is_mips (msym.minsym))
        {
          block->set_start (compact_block_start);
@@ -1212,13 +1212,12 @@ show_mask_address (struct ui_file *file, int from_tty,
 int
 mips_pc_is_mips (CORE_ADDR memaddr)
 {
-  struct bound_minimal_symbol sym;
-
   /* Flags indicating that this is a MIPS16 or microMIPS function is
      stored by elfread.c in the high bit of the info field.  Use this
      to decide if the function is standard MIPS.  Otherwise if bit 0
      of the address is clear, then this is a standard MIPS function.  */
-  sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+  bound_minimal_symbol sym
+    = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
   if (sym.minsym)
     return msymbol_is_mips (sym.minsym);
   else
@@ -1230,13 +1229,12 @@ mips_pc_is_mips (CORE_ADDR memaddr)
 int
 mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr)
 {
-  struct bound_minimal_symbol sym;
-
   /* A flag indicating that this is a MIPS16 function is stored by
      elfread.c in the high bit of the info field.  Use this to decide
      if the function is MIPS16.  Otherwise if bit 0 of the address is
      set, then ELF file flags will tell if this is a MIPS16 function.  */
-  sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+  bound_minimal_symbol sym
+    = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
   if (sym.minsym)
     return msymbol_is_mips16 (sym.minsym);
   else
@@ -1248,14 +1246,13 @@ mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr)
 int
 mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
 {
-  struct bound_minimal_symbol sym;
-
   /* A flag indicating that this is a microMIPS function is stored by
      elfread.c in the high bit of the info field.  Use this to decide
      if the function is microMIPS.  Otherwise if bit 0 of the address
      is set, then ELF file flags will tell if this is a microMIPS
      function.  */
-  sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+  bound_minimal_symbol sym
+    = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
   if (sym.minsym)
     return msymbol_is_micromips (sym.minsym);
   else
@@ -1268,14 +1265,13 @@ mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
 static enum mips_isa
 mips_pc_isa (struct gdbarch *gdbarch, CORE_ADDR memaddr)
 {
-  struct bound_minimal_symbol sym;
-
   /* A flag indicating that this is a MIPS16 or a microMIPS function
      is stored by elfread.c in the high bit of the info field.  Use
      this to decide if the function is MIPS16 or microMIPS or normal
      MIPS.  Otherwise if bit 0 of the address is set, then ELF file
      flags will tell if this is a MIPS16 or a microMIPS function.  */
-  sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+  bound_minimal_symbol sym
+    = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
   if (sym.minsym)
     {
       if (msymbol_is_micromips (sym.minsym))
@@ -3841,7 +3837,6 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
 {
   gdb_byte dummy[4];
   CORE_ADDR pc = get_frame_address_in_block (this_frame);
-  struct bound_minimal_symbol msym;
 
   /* Use the stub unwinder for unreadable code.  */
   if (target_read_memory (get_frame_pc (this_frame), dummy, 4) != 0)
@@ -3852,7 +3847,7 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
 
   /* Calling a PIC function from a non-PIC function passes through a
      stub.  The stub for foo is named ".pic.foo".  */
-  msym = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
   if (msym.minsym != NULL
       && msym.minsym->linkage_name () != NULL
       && startswith (msym.minsym->linkage_name (), ".pic."))
@@ -7824,7 +7819,6 @@ mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  struct bound_minimal_symbol msym;
   int i;
   gdb_byte stub_code[16];
   int32_t stub_words[4];
@@ -7832,7 +7826,7 @@ mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   /* The stub for foo is named ".pic.foo", and is either two
      instructions inserted before foo or a three instruction sequence
      which jumps to foo.  */
-  msym = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
   if (msym.minsym == NULL
       || msym.value_address () != pc
       || msym.minsym->linkage_name () == NULL
index 017ebb432d4bd7d8991c7730df73d77f61e972c9..41a8f990a168ffbdd69f5ebc059e8887e91bba59 100644 (file)
@@ -807,11 +807,10 @@ msp430_in_return_stub (struct gdbarch *gdbarch, CORE_ADDR pc,
 static CORE_ADDR
 msp430_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol bms;
   const char *stub_name;
   struct gdbarch *gdbarch = get_frame_arch (frame);
 
-  bms = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol bms = lookup_minimal_symbol_by_pc (pc);
   if (!bms.minsym)
     return pc;
 
index 953b329674a48a102a6e951799720463fb74bfbe..18155a25a51ccb45c7d85f661648ffd80e1cb6e1 100644 (file)
@@ -348,9 +348,8 @@ nbsd_gdb_signal_to_target (struct gdbarch *gdbarch,
 static CORE_ADDR
 nbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL);
+  bound_minimal_symbol msym
+    = lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL);
   if (msym.minsym && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
   else
index 3655445833af57b6d73581c7b684fe2f75c1fbe4..fc1d81c01d2b76d31b0960ee9b8871951a3b64f7 100644 (file)
@@ -1137,8 +1137,7 @@ find_imps (const char *method, std::vector<const char *> *symbol_names)
        symbol_names->push_back (sym->natural_name ());
       else
        {
-         struct bound_minimal_symbol msym
-           = lookup_minimal_symbol (selector, 0, 0);
+         bound_minimal_symbol msym = lookup_minimal_symbol (selector, 0, 0);
 
          if (msym.minsym != NULL) 
            symbol_names->push_back (msym.minsym->natural_name ());
@@ -1240,10 +1239,9 @@ find_objc_msgsend (void)
 
   for (i = 0; i < nmethcalls; i++)
     {
-      struct bound_minimal_symbol func;
-
       /* Try both with and without underscore.  */
-      func = lookup_bound_minimal_symbol (methcalls[i].name);
+      bound_minimal_symbol func
+       = lookup_bound_minimal_symbol (methcalls[i].name);
       if ((func.minsym == NULL) && (methcalls[i].name[0] == '_'))
        {
          func = lookup_bound_minimal_symbol (methcalls[i].name + 1);
index 50bd6f8dde5f39d446a22afa90527fad082d900e..8b1e89cfe64e8e7a62860f622953164f93e6d0b5 100644 (file)
@@ -600,11 +600,10 @@ public:
      domain_search_flags domain);
 
   /* See quick_symbol_functions.  */
-  struct compunit_symtab *find_pc_sect_compunit_symtab
-    (struct bound_minimal_symbol msymbol,
-     CORE_ADDR pc,
-     struct obj_section *section,
-     int warn_if_readin);
+  struct compunit_symtab *
+  find_pc_sect_compunit_symtab (bound_minimal_symbol msymbol, CORE_ADDR pc,
+                               struct obj_section *section,
+                               int warn_if_readin);
 
   /* See quick_symbol_functions.  */
   void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
index 5142984bc84fcb1b8f4c1e8127e64dc284acdb38..fab05b751edf64468b35f6e9e35d45c5429f4782 100644 (file)
@@ -27,9 +27,7 @@
 CORE_ADDR
 obsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol("_dl_bind", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind", NULL, NULL);
   if (msym.minsym && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
   else
index 0a0fa95e86888ff8c493703ddf5ddf7f662f02d5..77f853b5e6be92395f2f9bc0e9b4c17196531bed 100644 (file)
@@ -717,11 +717,10 @@ variable: name_not_typename
                            }
                          else
                            {
-                             struct bound_minimal_symbol msymbol;
                              std::string arg = copy_name ($1.stoken);
 
-                             msymbol =
-                               lookup_bound_minimal_symbol (arg.c_str ());
+                             bound_minimal_symbol msymbol
+                               lookup_bound_minimal_symbol (arg.c_str ());
                              if (msymbol.minsym != NULL)
                                pstate->push_new<var_msym_value_operation>
                                  (msymbol);
index d3d491c54cd258c1bbef3d9bbeb4463ccd811532..9a8a35d0148536949f1a88c82a2b106223897844 100644 (file)
@@ -59,9 +59,8 @@ static const char GPC_MAIN_PROGRAM_NAME_2[] = "pascal_main_program";
 const char *
 pascal_main_name (void)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol (GPC_P_INITIALIZE, NULL, NULL);
+  bound_minimal_symbol msym
+    = lookup_minimal_symbol (GPC_P_INITIALIZE, NULL, NULL);
 
   /*  If '_p_initialize' was not found, the main program is likely not
      written in Pascal.  */
index bdb9524d969c962aa46d7c4482e1182c3c5cade6..aa7f1a9f1070da3fafcb43e13dc0964d10b72086 100644 (file)
@@ -225,8 +225,8 @@ pascal_language::value_print_inner (struct value *val,
        {
          /* Print vtbl's nicely.  */
          CORE_ADDR vt_address = unpack_pointer (type, valaddr);
-         struct bound_minimal_symbol msymbol =
-           lookup_minimal_symbol_by_pc (vt_address);
+         bound_minimal_symbol msymbol
+           lookup_minimal_symbol_by_pc (vt_address);
 
          /* If 'symbol_print' is set, we did the work above.  */
          if (!options->symbol_print
index 2541a2eb143fdbc06ea1f8781640d9f2d9c6da75..1b602a74f5c4718fbd3dc9b9a409726c13900cd2 100644 (file)
@@ -145,7 +145,7 @@ parser_state::push_symbol (const char *name, block_symbol sym)
     }
   else
     {
-      struct bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
+      bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
       if (msymbol.minsym != NULL)
        push_new<expr::var_msym_value_operation> (msymbol);
       else if (!have_full_symbols (current_program_space)
@@ -162,7 +162,6 @@ void
 parser_state::push_dollar (struct stoken str)
 {
   struct block_symbol sym;
-  struct bound_minimal_symbol msym;
   struct internalvar *isym = NULL;
   std::string copy;
 
@@ -232,7 +231,7 @@ parser_state::push_dollar (struct stoken str)
       push_new<expr::var_value_operation> (sym);
       return;
     }
-  msym = lookup_bound_minimal_symbol (copy.c_str ());
+  bound_minimal_symbol msym = lookup_bound_minimal_symbol (copy.c_str ());
   if (msym.minsym)
     {
       push_new<expr::var_msym_value_operation> (msym);
index e1000452390cb0edfb037df0715a412a8f3bed00..3116fc1e2d21bfa74550c658ee7fef7aee324edb 100644 (file)
@@ -313,15 +313,13 @@ static const struct ppc_insn_pattern powerpc32_plt_stub_so_2[] =
 static int
 powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
 {
-  struct bound_minimal_symbol sym;
-
   /* Check whether PC is in the dynamic linker.  This also checks
      whether it is in the .plt section, used by non-PIC executables.  */
   if (svr4_in_dynsym_resolve_code (pc))
     return 1;
 
   /* Check if we are in the resolver.  */
-  sym = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol sym = lookup_minimal_symbol_by_pc (pc);
   if (sym.minsym != NULL
       && (strcmp (sym.minsym->linkage_name (), "__glink") == 0
          || strcmp (sym.minsym->linkage_name (), "__glink_PLTresolve") == 0))
@@ -1670,10 +1668,9 @@ ppc_elfv2_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
 static CORE_ADDR
 ppc_elfv2_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol fun;
   int local_entry_offset = 0;
 
-  fun = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol fun = lookup_minimal_symbol_by_pc (pc);
   if (fun.minsym == NULL)
     return pc;
 
index 47e6292992e786ef59ca13a293c7129edf5a0a9c..041f83dbfbd6e7590b6540a76fa753aa13bc5d82 100644 (file)
@@ -1044,12 +1044,10 @@ static int
 convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
 {
   struct obj_section *dot_fn_section;
-  struct bound_minimal_symbol dot_fn;
-  struct bound_minimal_symbol fn;
 
   /* Find the minimal symbol that corresponds to CODE_ADDR (should
      have a name of the form ".FN").  */
-  dot_fn = lookup_minimal_symbol_by_pc (code_addr);
+  bound_minimal_symbol dot_fn = lookup_minimal_symbol_by_pc (code_addr);
   if (dot_fn.minsym == NULL || dot_fn.minsym->linkage_name ()[0] != '.')
     return 0;
   /* Get the section that contains CODE_ADDR.  Need this for the
@@ -1061,8 +1059,9 @@ convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
      address.  Only look for the minimal symbol in ".FN"'s object file
      - avoids problems when two object files (i.e., shared libraries)
      contain a minimal symbol with the same name.  */
-  fn = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1, NULL,
-                             dot_fn_section->objfile);
+  bound_minimal_symbol fn
+    = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1, NULL,
+                            dot_fn_section->objfile);
   if (fn.minsym == NULL)
     return 0;
   /* Found a descriptor.  */
index e37e30edb87b67917136040f8600a9b17c76d475..8e025839cf4c04132a40c98fbad5686854f99224 100644 (file)
@@ -606,7 +606,6 @@ build_address_symbolic (struct gdbarch *gdbarch,
                        int *line,       /* OUT */
                        int *unmapped)   /* OUT */
 {
-  struct bound_minimal_symbol msymbol;
   struct symbol *symbol;
   CORE_ADDR name_location = 0;
   struct obj_section *section = NULL;
@@ -638,7 +637,8 @@ build_address_symbolic (struct gdbarch *gdbarch,
      save some memory, but for many debug format--ELF/DWARF or
      anything/stabs--it would be inconvenient to eliminate those minimal
      symbols anyway).  */
-  msymbol = lookup_minimal_symbol_by_pc_section (addr, section);
+  bound_minimal_symbol msymbol
+    = lookup_minimal_symbol_by_pc_section (addr, section);
   symbol = find_pc_sect_function (addr, section);
 
   if (symbol)
@@ -1575,7 +1575,6 @@ info_address_command (const char *exp, int from_tty)
   struct gdbarch *gdbarch;
   int regno;
   struct symbol *sym;
-  struct bound_minimal_symbol msymbol;
   long val;
   struct obj_section *section;
   CORE_ADDR load_addr, context_pc = 0;
@@ -1601,7 +1600,7 @@ info_address_command (const char *exp, int from_tty)
          return;
        }
 
-      msymbol = lookup_bound_minimal_symbol (exp);
+      bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (exp);
 
       if (msymbol.minsym != NULL)
        {
@@ -1753,9 +1752,8 @@ info_address_command (const char *exp, int from_tty)
 
     case LOC_UNRESOLVED:
       {
-       struct bound_minimal_symbol msym;
-
-       msym = lookup_bound_minimal_symbol (sym->linkage_name ());
+       bound_minimal_symbol msym
+         = lookup_bound_minimal_symbol (sym->linkage_name ());
        if (msym.minsym == NULL)
          gdb_printf ("unresolved");
        else
index 7d6648c4666c4bfcf3c76baf3df988a965608b7c..0df3dc8ecbba6d60781ff4cb7d88a94e6bfe927a 100644 (file)
@@ -87,7 +87,7 @@ static struct partial_symtab *
 find_pc_sect_psymtab_closer (struct objfile *objfile,
                             CORE_ADDR pc, struct obj_section *section,
                             struct partial_symtab *pst,
-                            struct bound_minimal_symbol msymbol)
+                            bound_minimal_symbol msymbol)
 {
   struct partial_symtab *tpst;
   struct partial_symtab *best_pst = pst;
@@ -161,7 +161,7 @@ struct partial_symtab *
 psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile,
                                         CORE_ADDR pc,
                                         struct obj_section *section,
-                                        struct bound_minimal_symbol msymbol)
+                                        bound_minimal_symbol msymbol)
 {
   for (partial_symtab *pst : partial_symbols (objfile))
     if (pc >= pst->text_low (objfile) && pc < pst->text_high (objfile))
@@ -181,12 +181,11 @@ psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile,
    the definition of quick_symbol_functions in symfile.h.  */
 
 struct compunit_symtab *
-psymbol_functions::find_pc_sect_compunit_symtab
-     (struct objfile *objfile,
-      struct bound_minimal_symbol msymbol,
-      CORE_ADDR pc,
-      struct obj_section *section,
-      int warn_if_readin)
+psymbol_functions::find_pc_sect_compunit_symtab (struct objfile *objfile,
+                                                bound_minimal_symbol msymbol,
+                                                CORE_ADDR pc,
+                                                struct obj_section *section,
+                                                int warn_if_readin)
 {
   struct partial_symtab *ps = find_pc_sect_psymtab (objfile,
                                                    pc, section,
@@ -1281,7 +1280,7 @@ maintenance_print_psymbols (const char *args, int from_tty)
 
          if (address_arg != NULL)
            {
-             struct bound_minimal_symbol msymbol;
+             bound_minimal_symbol msymbol;
 
              /* We don't assume each pc has a unique objfile (this is for
                 debugging).  */
index f41f2418639e683f775d3a650014ede4f6e80748..508e77810d2c93205d512f581db21ed4ff4bdb4c 100644 (file)
@@ -636,8 +636,8 @@ struct psymbol_functions : public quick_symbol_functions
      domain_search_flags kind) override;
 
   struct compunit_symtab *find_pc_sect_compunit_symtab
-    (struct objfile *objfile, struct bound_minimal_symbol msymbol,
-     CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override;
+    (struct objfile *objfile, bound_minimal_symbol msymbol, CORE_ADDR pc,
+     struct obj_section *section, int warn_if_readin) override;
 
   struct compunit_symtab *find_compunit_symtab_by_address
     (struct objfile *objfile, CORE_ADDR address) override
@@ -672,11 +672,10 @@ struct psymbol_functions : public quick_symbol_functions
      exactly matches PC, or, if we cannot find an exact match, the
      psymtab that contains a symbol whose address is closest to PC.  */
 
-  struct partial_symtab *find_pc_sect_psymtab
-       (struct objfile *objfile,
-       CORE_ADDR pc,
-       struct obj_section *section,
-       struct bound_minimal_symbol msymbol);
+  struct partial_symtab *find_pc_sect_psymtab (struct objfile *objfile,
+                                              CORE_ADDR pc,
+                                              struct obj_section *section,
+                                              bound_minimal_symbol msymbol);
 
 private:
 
index 89695ff5ac5d260ba50fd6adc17ef80b1903baf3..9f9032fbe179e0072b4512ff6c5da3f367ae937c 100644 (file)
@@ -923,12 +923,12 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
          else if (PyLong_Check (py_func.get ()))
            {
              CORE_ADDR addr;
-             struct bound_minimal_symbol msymbol;
 
              if (get_addr_from_python (py_func.get (), &addr) < 0)
                return EXT_LANG_BT_ERROR;
 
-             msymbol = lookup_minimal_symbol_by_pc (addr);
+             bound_minimal_symbol msymbol
+               = lookup_minimal_symbol_by_pc (addr);
              if (msymbol.minsym != NULL)
                function = msymbol.minsym->print_name ();
            }
index 676c3ede3733242081bee651669f96c46bbd30fd..d6de7340065c2f732da33b184014f25ab7e10579 100644 (file)
@@ -163,8 +163,8 @@ struct quick_symbol_functions
      compunit that contains a symbol whose address is closest to
      PC.  */
   virtual struct compunit_symtab *find_pc_sect_compunit_symtab
-    (struct objfile *objfile, struct bound_minimal_symbol msymbol,
-     CORE_ADDR pc, struct obj_section *section, int warn_if_readin) = 0;
+    (struct objfile *objfile, bound_minimal_symbol msymbol, CORE_ADDR pc,
+     struct obj_section *section, int warn_if_readin) = 0;
 
   /* Return the comp unit from OBJFILE that contains a symbol at
      ADDRESS.  Return NULL if there is no such comp unit.  Unlike
index 1957f3ca2e3dda8bb208473709dc452f22788ef7..9100a2c68be5366223b4f4f4b68a6552489d39cd 100644 (file)
@@ -326,12 +326,11 @@ ravenscar_thread_target::add_active_thread ()
    and return its associated minimal symbol.
    Return NULL if not found.  */
 
-static struct bound_minimal_symbol
+static bound_minimal_symbol
 get_running_thread_msymbol ()
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol (running_thread_name, NULL, NULL);
+  bound_minimal_symbol msym
+    = lookup_minimal_symbol (running_thread_name, NULL, NULL);
   if (!msym.minsym)
     /* Older versions of the GNAT runtime were using a different
        (less ideal) name for the symbol where the active thread ID
@@ -348,14 +347,13 @@ get_running_thread_msymbol ()
 static bool
 has_ravenscar_runtime ()
 {
-  struct bound_minimal_symbol msym_ravenscar_runtime_initializer
+  bound_minimal_symbol msym_ravenscar_runtime_initializer
     = lookup_minimal_symbol (ravenscar_runtime_initializer, NULL, NULL);
-  struct bound_minimal_symbol msym_known_tasks
+  bound_minimal_symbol msym_known_tasks
     = lookup_minimal_symbol (known_tasks_name, NULL, NULL);
-  struct bound_minimal_symbol msym_first_task
+  bound_minimal_symbol msym_first_task
     = lookup_minimal_symbol (first_task_name, NULL, NULL);
-  struct bound_minimal_symbol msym_running_thread
-    = get_running_thread_msymbol ();
+  bound_minimal_symbol msym_running_thread = get_running_thread_msymbol ();
 
   return (msym_ravenscar_runtime_initializer.minsym
          && (msym_known_tasks.minsym || msym_first_task.minsym)
@@ -377,7 +375,7 @@ ravenscar_thread_target::runtime_initialized ()
 static CORE_ADDR
 get_running_thread_id (int cpu)
 {
-  struct bound_minimal_symbol object_msym = get_running_thread_msymbol ();
+  bound_minimal_symbol object_msym = get_running_thread_msymbol ();
   int object_size;
   int buf_size;
   gdb_byte *buf;
index 4948a54e322880019aec701f4079b52f8ca7b121..eab527de0eb8b02fc6caf8515624ba55a62199ad 100644 (file)
@@ -5504,13 +5504,12 @@ remote_target::remote_check_symbols ()
 
   while (startswith (reply.data (), "qSymbol:"))
     {
-      struct bound_minimal_symbol sym;
-
       tmp = &reply[8];
       end = hex2bin (tmp, reinterpret_cast <gdb_byte *> (msg.data ()),
                     strlen (tmp) / 2);
       msg[end] = '\0';
-      sym = lookup_minimal_symbol (msg.data (), NULL, NULL);
+      bound_minimal_symbol sym
+       = lookup_minimal_symbol (msg.data (), NULL, NULL);
       if (sym.minsym == NULL)
        xsnprintf (msg.data (), get_remote_packet_size (), "qSymbol::%s",
                   &reply[8]);
index 2edb8234e6b49b2cd93965ecf5af99c5166122d3..a5b12498e58b7ed9e0e4155e109b121518f9017f 100644 (file)
@@ -2250,7 +2250,7 @@ rs6000_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
     {
       CORE_ADDR displ = op & BL_DISPLACEMENT_MASK;
       CORE_ADDR call_dest = pc + 4 + displ;
-      struct bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
+      bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
 
       /* We check for ___eabi (three leading underscores) in addition
         to __eabi in case the GCC option "-fleading-underscore" was
@@ -2324,7 +2324,6 @@ rs6000_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   unsigned int ii, op;
   int rel;
   CORE_ADDR solib_target_pc;
-  struct bound_minimal_symbol msymbol;
 
   static unsigned trampoline_code[] =
   {
@@ -2339,7 +2338,7 @@ rs6000_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   };
 
   /* Check for bigtoc fixup code.  */
-  msymbol = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
   if (msymbol.minsym
       && rs6000_in_solib_return_trampoline (gdbarch, pc,
                                            msymbol.minsym->linkage_name ()))
index 77740fed5d96666e13d654cd645ce70f5053b94a..e09973e90dd091501dbdcc24e9f9e46c7ff4b968 100644 (file)
@@ -759,9 +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)
 {
-  struct bound_minimal_symbol ms;
-
-  ms = lookup_minimal_symbol (ld_symbol_name, NULL, NULL);
+  bound_minimal_symbol ms = lookup_minimal_symbol (ld_symbol_name, NULL, NULL);
   if (!ms.minsym)
     return PS_NOSYM;
 
@@ -1068,7 +1066,7 @@ info_cb (const td_thrhandle_t *th, void *s)
       /* Print thr_create start function.  */
       if (ti.ti_startfunc != 0)
        {
-         const struct bound_minimal_symbol msym
+         const bound_minimal_symbol msym
            = lookup_minimal_symbol_by_pc (ti.ti_startfunc);
 
          gdb_printf ("   startfunc=%s",
@@ -1081,7 +1079,7 @@ info_cb (const td_thrhandle_t *th, void *s)
       /* If thread is asleep, print function that went to sleep.  */
       if (ti.ti_state == TD_THR_SLEEP)
        {
-         const struct bound_minimal_symbol msym
+         const bound_minimal_symbol msym
            = lookup_minimal_symbol_by_pc (ti.ti_pc);
 
          gdb_printf ("   sleepfunc=%s",
index 468b132165e6a601142168b844e08d6a5dcead97..b3eb8280f14daa15944b8c9e560c633203f1f32a 100644 (file)
@@ -63,9 +63,7 @@ sol2_sigtramp_p (const frame_info_ptr &this_frame)
 static CORE_ADDR
 sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct bound_minimal_symbol msym;
-
-  msym = lookup_minimal_symbol("elf_bndr", NULL, NULL);
+  bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr", NULL, NULL);
   if (msym.minsym && msym.value_address () == pc)
     return frame_unwind_caller_pc (get_current_frame ());
 
index 908c78aebdca3a42f29df93ad85b87fff030176c..9840255895bdaa968207ec122ef96e5198ac21b2 100644 (file)
@@ -434,7 +434,6 @@ static CORE_ADDR
 lm_base (void)
 {
   bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
-  struct bound_minimal_symbol got_sym;
   CORE_ADDR addr;
   gdb_byte buf[TIC6X_PTR_SIZE];
   dsbt_info *info = get_dsbt_info (current_program_space);
@@ -451,8 +450,9 @@ lm_base (void)
   if (info->lm_base_cache)
     return info->lm_base_cache;
 
-  got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
-                                  current_program_space->symfile_object_file);
+  bound_minimal_symbol got_sym
+    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
+                            current_program_space->symfile_object_file);
 
   if (got_sym.minsym != 0)
     {
index f84ff89ffe098f4858dc83ed9018ff65d0dfbd9e..062a29f4a5ebb395b766390c7b0b4296c0d2a172 100644 (file)
@@ -264,7 +264,6 @@ static CORE_ADDR
 lm_base (void)
 {
   bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
-  struct bound_minimal_symbol got_sym;
   CORE_ADDR addr;
   gdb_byte buf[FRV_PTR_SIZE];
 
@@ -280,8 +279,9 @@ lm_base (void)
   if (lm_base_cache)
     return lm_base_cache;
 
-  got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
-                                  current_program_space->symfile_object_file);
+  bound_minimal_symbol got_sym
+    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
+                            current_program_space->symfile_object_file);
   if (got_sym.minsym == 0)
     {
       solib_debug_printf ("_GLOBAL_OFFSET_TABLE_ not found.");
@@ -840,10 +840,9 @@ frv_relocate_section_addresses (solib &so, target_section *sec)
 static CORE_ADDR
 main_got (void)
 {
-  struct bound_minimal_symbol got_sym;
-
   objfile *objf = current_program_space->symfile_object_file;
-  got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
+  bound_minimal_symbol got_sym
+    = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
   if (got_sym.minsym == 0)
     return 0;
 
index 8c3ff39d2ac0c600121930b4f8590f3f12dfc246..4633757215d00df32ee34ab1578c09c5e2e45847 100644 (file)
@@ -695,7 +695,6 @@ scan_dyntag_auxv (const int desired_dyntag, CORE_ADDR *ptr,
 static CORE_ADDR
 elf_locate_base (void)
 {
-  struct bound_minimal_symbol msymbol;
   CORE_ADDR dyn_ptr, dyn_ptr_addr;
 
   if (!svr4_have_link_map_offsets ())
@@ -751,8 +750,9 @@ elf_locate_base (void)
 
   /* This may be a static executable.  Look for the symbol
      conventionally named _r_debug, as a last resort.  */
-  msymbol = lookup_minimal_symbol ("_r_debug", NULL,
-                                  current_program_space->symfile_object_file);
+  bound_minimal_symbol msymbol
+    = lookup_minimal_symbol ("_r_debug", NULL,
+                            current_program_space->symfile_object_file);
   if (msymbol.minsym != NULL)
     return msymbol.value_address ();
 
@@ -2227,7 +2227,6 @@ svr4_create_solib_event_breakpoints (svr4_info *info, struct gdbarch *gdbarch,
 static int
 enable_break (struct svr4_info *info, int from_tty)
 {
-  struct bound_minimal_symbol msymbol;
   const char * const *bkpt_namep;
   asection *interp_sect;
   CORE_ADDR sym_addr;
@@ -2482,7 +2481,8 @@ 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++)
     {
-      msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
+      bound_minimal_symbol msymbol
+       = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
       if ((msymbol.minsym != NULL)
          && (msymbol.value_address () != 0))
        {
@@ -2501,7 +2501,8 @@ enable_break (struct svr4_info *info, int from_tty)
     {
       for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
        {
-         msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
+         bound_minimal_symbol msymbol
+           = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
          if ((msymbol.minsym != NULL)
              && (msymbol.value_address () != 0))
            {
index b36193be2f39ebc5f0091d34aff81f45b46bacbd..b7a102eb2c3a4a0e5c3f3abdb8adbe5fbf969282 100644 (file)
@@ -1299,13 +1299,12 @@ find_frame_funname (const frame_info_ptr &frame, enum language *funlang,
     }
   else
     {
-      struct bound_minimal_symbol msymbol;
       CORE_ADDR pc;
 
       if (!get_frame_address_in_block_if_available (frame, &pc))
        return funname;
 
-      msymbol = lookup_minimal_symbol_by_pc (pc);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
       if (msymbol.minsym != NULL)
        {
          funname.reset (xstrdup (msymbol.minsym->print_name ()));
@@ -1529,9 +1528,7 @@ info_frame_command_core (const frame_info_ptr &fi, bool selected_frame_p)
     }
   else if (frame_pc_p)
     {
-      struct bound_minimal_symbol msymbol;
-
-      msymbol = lookup_minimal_symbol_by_pc (frame_pc);
+      bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (frame_pc);
       if (msymbol.minsym != NULL)
        {
          funname = msymbol.minsym->print_name ();
index 3a223d0789e50a01bfc90c951d12f9512c02b3aa..0eccda21f39f1ea35488cfed38d6b67ff2f74f62 100644 (file)
@@ -399,7 +399,7 @@ objfile::expand_symtabs_matching
 }
 
 struct compunit_symtab *
-objfile::find_pc_sect_compunit_symtab (struct bound_minimal_symbol msymbol,
+objfile::find_pc_sect_compunit_symtab (bound_minimal_symbol msymbol,
                                       CORE_ADDR pc,
                                       struct obj_section *section,
                                       int warn_if_readin)
index 06c7faf2bbe15abf95482eac88f8b934b64a2354..b2d0b0f50b3620d25a817975e97ad908e654e215 100644 (file)
@@ -3428,14 +3428,13 @@ read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr,
 static int
 simple_read_overlay_table (void)
 {
-  struct bound_minimal_symbol novlys_msym;
-  struct bound_minimal_symbol ovly_table_msym;
   struct gdbarch *gdbarch;
   int word_size;
   enum bfd_endian byte_order;
 
   simple_free_overlay_table ();
-  novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL);
+  bound_minimal_symbol novlys_msym
+    = lookup_minimal_symbol ("_novlys", NULL, NULL);
   if (! novlys_msym.minsym)
     {
       error (_("Error reading inferior's overlay table: "
@@ -3444,7 +3443,8 @@ simple_read_overlay_table (void)
       return 0;
     }
 
-  ovly_table_msym = lookup_bound_minimal_symbol ("_ovly_table");
+  bound_minimal_symbol ovly_table_msym
+    = lookup_bound_minimal_symbol ("_ovly_table");
   if (! ovly_table_msym.minsym)
     {
       error (_("Error reading inferior's overlay table: couldn't find "
@@ -3523,7 +3523,7 @@ simple_overlay_update (struct obj_section *osect)
       {
        /* Does its cached location match what's currently in the
           symtab?  */
-       struct bound_minimal_symbol minsym
+       bound_minimal_symbol minsym
          = lookup_minimal_symbol ("_ovly_table", NULL, NULL);
 
        if (minsym.minsym == NULL)
index 9d1170375ded20b8f9c4a779059fc5e466125b03..c77537f121ae60ceb012e62835eaefce310736b4 100644 (file)
@@ -2892,14 +2892,14 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
 {
   struct compunit_symtab *best_cust = NULL;
   CORE_ADDR best_cust_range = 0;
-  struct bound_minimal_symbol msymbol;
 
   /* If we know that this is not a text address, return failure.  This is
      necessary because we loop based on the block's high and low code
      addresses, which do not include the data ranges, and because
      we call find_pc_sect_psymtab which has a similar restriction based
      on the partial_symtab's texthigh and textlow.  */
-  msymbol = lookup_minimal_symbol_by_pc_section (pc, section);
+  bound_minimal_symbol msymbol
+    = lookup_minimal_symbol_by_pc_section (pc, section);
   if (msymbol.minsym && msymbol.minsym->data_p ())
     return NULL;
 
@@ -3091,7 +3091,6 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
   int len;
   const linetable_entry *item;
   const struct blockvector *bv;
-  struct bound_minimal_symbol msymbol;
 
   /* Info on best line seen so far, and where it starts, and its file.  */
 
@@ -3170,13 +3169,12 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
    *      check for the address being the same, to avoid an
    *      infinite recursion.
    */
-  msymbol = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
   if (msymbol.minsym != NULL)
     if (msymbol.minsym->type () == mst_solib_trampoline)
       {
-       struct bound_minimal_symbol mfunsym
-         = lookup_minimal_symbol_text (msymbol.minsym->linkage_name (),
-                                       NULL);
+       bound_minimal_symbol mfunsym
+         = lookup_minimal_symbol_text (msymbol.minsym->linkage_name (), NULL);
 
        if (mfunsym.minsym == NULL)
          /* I eliminated this warning since it is coming out
@@ -3919,7 +3917,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
     }
   else
     {
-      struct bound_minimal_symbol msymbol
+      bound_minimal_symbol msymbol
        = lookup_minimal_symbol_by_pc_section (sal->pc, sal->section);
 
       if (msymbol.minsym == NULL)
@@ -5290,7 +5288,7 @@ print_symbol_info (struct symbol *sym, int block, const char *last)
    for non-debugging symbols to gdb_stdout.  */
 
 static void
-print_msymbol_info (struct bound_minimal_symbol msymbol)
+print_msymbol_info (bound_minimal_symbol msymbol)
 {
   struct gdbarch *gdbarch = msymbol.objfile->arch ();
   const char *tmp;
index a5631a27b5e26103c183618c4a7a4bf38237b3ec..4197a3a164c5292adc426e0596c7f0ff852b99a6 100644 (file)
@@ -2599,7 +2599,7 @@ struct symbol_search
 
   /* If msymbol is non-null, then a match was made on something for
      which only minimal_symbols exist.  */
-  struct bound_minimal_symbol msymbol;
+  bound_minimal_symbol msymbol;
 
 private:
 
index e9bcbfdd5b39dba9420595e6fec3a51e8a930806..f95555769e127c821dd380c787478dc57a3bfa98 100644 (file)
@@ -2455,7 +2455,6 @@ tfind_outside_command (const char *args, int from_tty)
 static void
 info_scope_command (const char *args_in, int from_tty)
 {
-  struct bound_minimal_symbol msym;
   const struct block *block;
   const char *symname;
   const char *save_args = args_in;
@@ -2579,17 +2578,20 @@ info_scope_command (const char *args_in, int from_tty)
                                        sym->value_block ()->entry_pc ()));
                  break;
                case LOC_UNRESOLVED:
-                 msym = lookup_minimal_symbol (sym->linkage_name (),
-                                               NULL, NULL);
-                 if (msym.minsym == NULL)
-                   gdb_printf ("Unresolved Static");
-                 else
-                   {
-                     gdb_printf ("static storage at address ");
-                     gdb_printf ("%s",
-                                 paddress (gdbarch, msym.value_address ()));
-                   }
-                 break;
+                 {
+                   bound_minimal_symbol msym
+                     = lookup_minimal_symbol (sym->linkage_name (), NULL,
+                                              NULL);
+                   if (msym.minsym == NULL)
+                     gdb_printf ("Unresolved Static");
+                   else
+                     {
+                       gdb_printf ("static storage at address ");
+                       gdb_printf ("%s",
+                                   paddress (gdbarch, msym.value_address ()));
+                     }
+                   break;
+                 }
                case LOC_OPTIMIZED_OUT:
                  gdb_printf ("optimized out.\n");
                  continue;
index 53be866187e2ad11d8e1fbf152303ae8940166f8..6ec8216114d2618d7b5725ed14f17e499984fec7 100644 (file)
@@ -157,11 +157,11 @@ tui_disassemble (struct gdbarch *gdbarch,
 static CORE_ADDR
 tui_find_backward_disassembly_start_address (CORE_ADDR addr)
 {
-  struct bound_minimal_symbol msym, msym_prev;
-
-  msym = lookup_minimal_symbol_by_pc_section (addr - 1, nullptr,
-                                             lookup_msym_prefer::TEXT,
-                                             &msym_prev);
+  bound_minimal_symbol msym_prev;
+  bound_minimal_symbol msym
+    = lookup_minimal_symbol_by_pc_section (addr - 1, nullptr,
+                                          lookup_msym_prefer::TEXT,
+                                          &msym_prev);
   if (msym.minsym != nullptr)
     return msym.value_address ();
   else if (msym_prev.minsym != nullptr)
@@ -402,7 +402,7 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
 
       if (addr == 0)
        {
-         struct bound_minimal_symbol main_symbol
+         bound_minimal_symbol main_symbol
            = lookup_minimal_symbol (main_name (), nullptr, nullptr);
          if (main_symbol.minsym != nullptr)
            addr = main_symbol.value_address ();
index a0e945cf155479ad6d534f0c7c25577585aa206c..af2b76055bc256de4f778fcde53968fee558c618 100644 (file)
@@ -129,8 +129,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p)
     }
   else
     {
-      struct bound_minimal_symbol msymbol = 
-       lookup_bound_minimal_symbol (name);
+      bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
 
       if (msymbol.minsym != NULL)
        {
index aaa9ed20ae1c211a5a0f7d9f0c9fa2bd629b6356..b83e55090b90bdc73fa47c00b853f5988a98e9a2 100644 (file)
@@ -2988,7 +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.  */
-         struct bound_minimal_symbol msym
+         bound_minimal_symbol msym
            = lookup_minimal_symbol (phys_name, NULL, NULL);
          struct type *field_type = type->field (fieldno).type ();
 
@@ -3171,7 +3171,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f,
   struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);
   const char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
   struct symbol *sym;
-  struct bound_minimal_symbol msym;
+  bound_minimal_symbol msym;
 
   sym = lookup_symbol (physname, nullptr, SEARCH_FUNCTION_DOMAIN,
                       nullptr).symbol;
index 5d7aa9535b7c986f6d7b5c22a86d994e1d273c78..e50b5fb9fa4b230fea6be74bfc061317b3268b6e 100644 (file)
@@ -42,7 +42,7 @@ bool
 x86_in_indirect_branch_thunk (CORE_ADDR pc, const char * const *register_names,
                              int lo, int hi)
 {
-  struct bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
+  bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
   if (bmfun.minsym == nullptr)
     return false;
 
index 23cdb68e1902bef66589704a1998c7f5ec51a41e..e290b65343f9902db9f45aa34081755e2e8498d7 100644 (file)
@@ -356,8 +356,8 @@ 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 */
     {
-      struct bound_minimal_symbol msymbol;
-      msymbol = lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
+      bound_minimal_symbol msymbol
+       = lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
       if (msymbol.minsym)
        {
          value = msymbol.value_address ();
@@ -621,8 +621,8 @@ z80_frame_unwind_cache (const frame_info_ptr &this_frame,
                break; /* found */
              for (i = sizeof(names)/sizeof(*names)-1; i >= 0; --i)
                {
-                 struct bound_minimal_symbol msymbol;
-                 msymbol = lookup_minimal_symbol (names[i], NULL, NULL);
+                 bound_minimal_symbol msymbol
+                   = lookup_minimal_symbol (names[i], NULL, NULL);
                  if (!msymbol.minsym)
                    continue;
                  if (addr == msymbol.value_address ())
@@ -719,8 +719,8 @@ z80_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
   static int addr = -1;
   if (addr == -1)
     {
-      struct bound_minimal_symbol bh;
-      bh = lookup_minimal_symbol ("_break_handler", NULL, NULL);
+      bound_minimal_symbol bh
+       = lookup_minimal_symbol ("_break_handler", NULL, NULL);
       if (bh.minsym)
        addr = bh.value_address ();
       else
@@ -894,14 +894,13 @@ read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr,
 static int
 z80_read_overlay_region_table ()
 {
-  struct bound_minimal_symbol novly_regions_msym;
-  struct bound_minimal_symbol ovly_region_table_msym;
   struct gdbarch *gdbarch;
   int word_size;
   enum bfd_endian byte_order;
 
   z80_free_overlay_region_table ();
-  novly_regions_msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL);
+  bound_minimal_symbol novly_regions_msym
+    = lookup_minimal_symbol ("_novly_regions", NULL, NULL);
   if (! novly_regions_msym.minsym)
     {
       error (_("Error reading inferior's overlay table: "
@@ -910,7 +909,8 @@ z80_read_overlay_region_table ()
       return 0;
     }
 
-  ovly_region_table_msym = lookup_bound_minimal_symbol ("_ovly_region_table");
+  bound_minimal_symbol ovly_region_table_msym
+    = lookup_bound_minimal_symbol ("_ovly_region_table");
   if (! ovly_region_table_msym.minsym)
     {
       error (_("Error reading inferior's overlay table: couldn't find "