symtab.h (struct symbol_search) <symtab>: Delete, unnecessary.
authorDoug Evans <xdje42@gmail.com>
Wed, 17 Dec 2014 06:00:13 +0000 (22:00 -0800)
committerDoug Evans <xdje42@gmail.com>
Wed, 17 Dec 2014 06:00:13 +0000 (22:00 -0800)
gdb/ChangeLog:

* symtab.h (struct symbol_search) <symtab>: Delete.  All uses updated.
* symtab.c (compare_search_syms): Use SYMBOL_SYMTAB accessor.
(print_symbol_info): Delete arg symtab.  All callers updated.
(symtab_symbol_info): Use SYMBOL_SYMTAB accessor.

gdb/ChangeLog
gdb/symtab.c
gdb/symtab.h

index 7c2e6f35d6f4210daa04dd54f6b8a98e04a381f4..087c9c9f844abc09487904610d095380624deb9e 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-16  Doug Evans  <xdje42@gmail.com>
+
+       * symtab.h (struct symbol_search) <symtab>: Delete.  All uses updated.
+       * symtab.c (compare_search_syms): Use SYMBOL_SYMTAB accessor.
+       (print_symbol_info): Delete arg symtab.  All callers updated.
+       (symtab_symbol_info): Use SYMBOL_SYMTAB accessor.
+
 2014-12-16  Andreas Arnez  <arnez@vnet.linux.ibm.com>
 
        * user-regs.c (maintenance_print_user_registers): Swap "Nr" and
index 54e4be45782fdc51c95aacc85b7cfb0e25895abc..a95234fd782582333ecbbaa5594211a661f0f2d0 100644 (file)
@@ -3406,7 +3406,8 @@ compare_search_syms (const void *sa, const void *sb)
   struct symbol_search *sym_b = *(struct symbol_search **) sb;
   int c;
 
-  c = FILENAME_CMP (sym_a->symtab->filename, sym_b->symtab->filename);
+  c = FILENAME_CMP (SYMBOL_SYMTAB (sym_a->symbol)->filename,
+                   SYMBOL_SYMTAB (sym_b->symbol)->filename);
   if (c != 0)
     return c;
 
@@ -3722,7 +3723,6 @@ search_symbols (const char *regexp, enum search_domain kind,
                struct symbol_search *psr = (struct symbol_search *)
                  xmalloc (sizeof (struct symbol_search));
                psr->block = i;
-               psr->symtab = real_symtab;
                psr->symbol = sym;
                memset (&psr->msymbol, 0, sizeof (psr->msymbol));
                psr->next = NULL;
@@ -3780,7 +3780,6 @@ search_symbols (const char *regexp, enum search_domain kind,
                        psr->block = i;
                        psr->msymbol.minsym = msymbol;
                        psr->msymbol.objfile = objfile;
-                       psr->symtab = NULL;
                        psr->symbol = NULL;
                        psr->next = NULL;
                        if (tail == NULL)
@@ -3806,9 +3805,10 @@ search_symbols (const char *regexp, enum search_domain kind,
 
 static void
 print_symbol_info (enum search_domain kind,
-                  struct symtab *s, struct symbol *sym,
+                  struct symbol *sym,
                   int block, const char *last)
 {
+  struct symtab *s = SYMBOL_SYMTAB (sym);
   const char *s_filename = symtab_to_filename_for_display (s);
 
   if (last == NULL || filename_cmp (last, s_filename) != 0)
@@ -3903,11 +3903,11 @@ symtab_symbol_info (char *regexp, enum search_domain kind, int from_tty)
       else
        {
          print_symbol_info (kind,
-                            p->symtab,
                             p->symbol,
                             p->block,
                             last_filename);
-         last_filename = symtab_to_filename_for_display (p->symtab);
+         last_filename
+           = symtab_to_filename_for_display (SYMBOL_SYMTAB (p->symbol));
        }
     }
 
@@ -3993,7 +3993,8 @@ rbreak_command (char *regexp, int from_tty)
     {
       if (p->msymbol.minsym == NULL)
        {
-         const char *fullname = symtab_to_fullname (p->symtab);
+         struct symtab *symtab = SYMBOL_SYMTAB (p->symbol);
+         const char *fullname = symtab_to_fullname (symtab);
 
          int newlen = (strlen (fullname)
                        + strlen (SYMBOL_LINKAGE_NAME (p->symbol))
@@ -4010,10 +4011,9 @@ rbreak_command (char *regexp, int from_tty)
          strcat (string, "'");
          break_command (string, from_tty);
          print_symbol_info (FUNCTIONS_DOMAIN,
-                            p->symtab,
                             p->symbol,
                             p->block,
-                            symtab_to_filename_for_display (p->symtab));
+                            symtab_to_filename_for_display (symtab));
        }
       else
        {
index 4f90140505357e71c76495fb51d6010e9219d197..c9b38d276668a6a1c30e7137178977a3fc214e24 100644 (file)
@@ -1457,9 +1457,7 @@ struct symbol_search
 
   /* Information describing what was found.
 
-     If symtab and symbol are NOT NULL, then information was found
-     for this match.  */
-  struct symtab *symtab;
+     If symbol is NOT NULL, then information was found for this match.  */
   struct symbol *symbol;
 
   /* If msymbol is non-null, then a match was made on something for
This page took 0.03733 seconds and 4 git commands to generate.