tx19 sanitize fixes.
[deliverable/binutils-gdb.git] / gdb / symtab.c
index 732ba0d1c8524ed2173e3a41f98e9475a2fe6a34..059820b94e40dab27c3f9943754edcf41c996a4a 100644 (file)
@@ -358,8 +358,6 @@ gdb_mangle_name (type, i, j)
 
 \f
 
-struct symbol         * fixup_symbol_section  PARAMS ((struct symbol  *,
-                                                      struct objfile *));
 struct partial_symbol * fixup_psymbol_section PARAMS ((struct partial_symbol *,
                                                       struct objfile *));
 
@@ -522,8 +520,6 @@ fixup_symbol_section (sym, objfile)
      struct symbol *sym;
      struct objfile *objfile;
 {
-  struct minimal_symbol *msym;
-
   if (!sym)
     return NULL;
 
@@ -540,8 +536,6 @@ fixup_psymbol_section (psym, objfile)
      struct partial_symbol *psym;
      struct objfile *objfile;
 {
-  struct minimal_symbol *msym;
-
   if (!psym)
     return NULL;
 
@@ -918,6 +912,8 @@ lookup_block_symbol (block, name, namespace)
      const char *name;
      const namespace_enum namespace;
 {
+  extern struct symbol *ref_search_val PARAMS ((struct symbol *sym,
+                                               CORE_ADDR addr));
   register int bot, top, inc;
   register struct symbol *sym;
   register struct symbol *sym_found = NULL;
@@ -1023,6 +1019,10 @@ lookup_block_symbol (block, name, namespace)
          if (SYMBOL_NAMESPACE (sym) == namespace &&
              SYMBOL_MATCHES_NAME (sym, name))
            {
+             /* Given pc, search thu alias list to find the active symbol. */
+              if (SYMBOL_ALIASES (sym))
+                sym = ref_search_val (sym, read_pc ());
+
              sym_found = sym;
              if (SYMBOL_CLASS (sym) != LOC_ARG &&
                  SYMBOL_CLASS (sym) != LOC_LOCAL_ARG &&
@@ -1068,7 +1068,7 @@ find_pc_sect_symtab (pc, section)
   register struct symtab *best_s = NULL;
   register struct partial_symtab *ps;
   register struct objfile *objfile;
-  int distance = 0;
+  CORE_ADDR distance = 0;
 
   /* Search all symtabs for the one whose file contains our address, and which
      is the smallest of all the ones containing the address.  This is designed
@@ -2086,15 +2086,25 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line, canonical)
        }
       if (p[0] == ':' || p[0] == ' ' || p[0] == '\t')
        break;
+      if (p[0] == '.' && strchr (p, ':') == NULL) /* Java qualified method. */
+       {
+         /* Find the *last* '.', since the others are package qualifiers. */
+         for (p1 = p;  *p1;  p1++)
+           {
+             if (*p1 == '.')
+               p = p1;
+           }
+         break;
+       }
     }
   while (p[0] == ' ' || p[0] == '\t') p++;
 
-  if ((p[0] == ':') && !has_parens)
+  if ((p[0] == ':' || p[0] == '.') && !has_parens)
     {
 
-      /*  C++  */
+      /*  C++ or Java */
       if (is_quoted) *argptr = *argptr+1;
-      if (p[1] ==':')
+      if (p[0] == '.' || p[1] ==':')
        {
          /* Extract the class name.  */
          p1 = p;
@@ -2104,7 +2114,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line, canonical)
          copy[p - *argptr] = 0;
 
          /* Discard the class name from the arg.  */
-         p = p1 + 2;
+         p = p1 + (p1[0] == ':' ? 2 : 1);
          while (*p == ' ' || *p == '\t') p++;
          *argptr = p;
 
This page took 0.026149 seconds and 4 git commands to generate.