* gas/mips/macro-warn-[1234].[sdl]: New tests.
[deliverable/binutils-gdb.git] / gdb / symtab.c
index d984a35420544d8f5cdeb160951f0885602a4ea8..1d7b3968d79a78d8b166c3f0b4679b232064ae68 100644 (file)
@@ -114,8 +114,6 @@ struct symbol *lookup_symbol_aux_minsyms (const char *name,
                                          struct symtab **symtab);
 #endif
 
-static struct symbol *find_active_alias (struct symbol *sym, CORE_ADDR addr);
-
 /* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */
 /* Signals the presence of objects compiled by HP compilers */
 int hp_som_som_object_present = 0;
@@ -345,7 +343,7 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
   is_full_physname_constructor = is_constructor_name (physname);
 
   is_constructor =
-    is_full_physname_constructor || (newname && STREQ (field_name, newname));
+    is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0);
 
   if (!is_destructor)
     is_destructor = (strncmp (physname, "__dt", 4) == 0);
@@ -1668,29 +1666,6 @@ lookup_block_symbol (const struct block *block, const char *name,
              && (linkage_name != NULL
                  ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1))
            {
-             /* If SYM has aliases, then use any alias that is active
-                at the current PC.  If no alias is active at the current
-                PC, then use the main symbol.
-
-                ?!? Is checking the current pc correct?  Is this routine
-                ever called to look up a symbol from another context?
-
-                FIXME: No, it's not correct.  If someone sets a
-                conditional breakpoint at an address, then the
-                breakpoint's `struct expression' should refer to the
-                `struct symbol' appropriate for the breakpoint's
-                address, which may not be the PC.
-
-                Even if it were never called from another context,
-                it's totally bizarre for lookup_symbol's behavior to
-                depend on the value of the inferior's current PC.  We
-                should pass in the appropriate PC as well as the
-                block.  The interface to lookup_symbol should change
-                to require the caller to provide a PC.  */
-
-             if (SYMBOL_ALIASES (sym))
-               sym = find_active_alias (sym, read_pc ());
-
              sym_found = sym;
              if (SYMBOL_CLASS (sym) != LOC_ARG &&
                  SYMBOL_CLASS (sym) != LOC_LOCAL_ARG &&
@@ -1708,38 +1683,6 @@ lookup_block_symbol (const struct block *block, const char *name,
     }
 }
 
-/* Given a main symbol SYM and ADDR, search through the alias
-   list to determine if an alias is active at ADDR and return
-   the active alias.
-
-   If no alias is active, then return SYM.  */
-
-static struct symbol *
-find_active_alias (struct symbol *sym, CORE_ADDR addr)
-{
-  struct range_list *r;
-  struct alias_list *aliases;
-
-  /* If we have aliases, check them first.  */
-  aliases = SYMBOL_ALIASES (sym);
-
-  while (aliases)
-    {
-      if (!SYMBOL_RANGES (aliases->sym))
-       return aliases->sym;
-      for (r = SYMBOL_RANGES (aliases->sym); r; r = r->next)
-       {
-         if (r->start <= addr && r->end > addr)
-           return aliases->sym;
-       }
-      aliases = aliases->next;
-    }
-
-  /* Nothing found, return the main symbol.  */
-  return sym;
-}
-\f
-
 /* Find the symtab associated with PC and SECTION.  Look through the
    psymtabs and read in another symtab if necessary. */
 
@@ -1872,7 +1815,7 @@ find_pc_symtab (CORE_ADDR pc)
 /* If it's worth the effort, we could be using a binary search.  */
 
 struct symtab_and_line
-find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
+find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent)
 {
   struct symtab *s;
   struct linetable *l;
@@ -1969,7 +1912,7 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
     if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
       {
        mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol),
-                                             NULL, NULL);
+                                             NULL);
        if (mfunsym == NULL)
          /* I eliminated this warning since it is coming out
           * in the following situation:
@@ -2182,7 +2125,7 @@ find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match)
        struct linetable *l;
        int ind;
 
-       if (!STREQ (symtab->filename, s->filename))
+       if (strcmp (symtab->filename, s->filename) != 0)
          continue;
        l = LINETABLE (s);
        ind = find_line_common (l, line, &exact);
@@ -2371,10 +2314,6 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
     }
   sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0);
 
-#ifdef PROLOGUE_FIRSTLINE_OVERLAP
-  /* Convex: no need to suppress code on first line, if any */
-  sal.pc = pc;
-#else
   /* Check if SKIP_PROLOGUE left us in mid-line, and the next
      line is still part of the same function.  */
   if (sal.pc != pc
@@ -2387,7 +2326,6 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
       sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0);
     }
   sal.pc = pc;
-#endif
 
   return sal;
 }
@@ -3930,7 +3868,7 @@ decode_line_spec (char *string, int funfirstline)
   
   sals = decode_line_1 (&string, funfirstline,
                        cursal.symtab, cursal.line,
-                       (char ***) NULL);
+                       (char ***) NULL, NULL);
 
   if (*string)
     error ("Junk at end of line specification: %s", string);
This page took 0.025556 seconds and 4 git commands to generate.