* minsyms.c, symtab.h (prim_record_minimal_symbol{,_and_info}),
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 27 Dec 1993 17:47:28 +0000 (17:47 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 27 Dec 1993 17:47:28 +0000 (17:47 +0000)
coffread.c (record_minimal_symbol),
xcoffread.c (RECORD_MINIMAL_SYMBOL), callers: Add objfile parameter.

gdb/ChangeLog
gdb/elfread.c
gdb/mdebugread.c
gdb/minsyms.c
gdb/nlmread.c
gdb/paread.c
gdb/solib.c
gdb/xcoffread.c

index a04c463dc53f8b7b1d75f560d5e227ed5c6ae198..70b17913e46681134ce3d5a17302dd59f88b1a87 100644 (file)
@@ -13,6 +13,9 @@ Mon Dec 27 11:07:05 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
        * minsyms.c (prim_record_minimal_symbol_and_info): . . . to here.
        * minsyms.c (prim_record_minimal_symbol): Call
        prim_record_minimal_symbol_and_info rather than duplicating code.
+       * minsyms.c, symtab.h (prim_record_minimal_symbol{,_and_info}),
+       coffread.c (record_minimal_symbol),
+       xcoffread.c (RECORD_MINIMAL_SYMBOL), callers: Add objfile parameter.
 
 Sun Dec 26 20:44:02 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
 
index 11a8c0e3759e0e203947a76d068eaf1dc88d3c6f..9b5b34c56926636efea888040892539213d85b82 100644 (file)
@@ -205,7 +205,8 @@ record_minimal_symbol_and_info (name, address, ms_type, info, objfile)
     }
 
   name = obsavestring (name, strlen (name), &objfile -> symbol_obstack);
-  prim_record_minimal_symbol_and_info (name, address, ms_type, info, section);
+  prim_record_minimal_symbol_and_info (name, address, ms_type, info, section,
+                                      objfile);
 }
 
 /*
index 92f30598f5127629b6fa94387c07e152145d0aaf..a1193c132a3cb881e5124e60dbeb18c4696ff83d 100644 (file)
@@ -2161,7 +2161,7 @@ parse_partial_symbols (objfile, section_offsets)
          ms_type = mst_unknown;
          complain (&unknown_ext_complaint, name);
        }
-      prim_record_minimal_symbol (name, ext_in->asym.value, ms_type);
+      prim_record_minimal_symbol (name, ext_in->asym.value, ms_type, objfile);
     }
 
   /* Pass 3 over files, over local syms: fill in static symbols */
@@ -2333,7 +2333,8 @@ parse_partial_symbols (objfile, section_offsets)
                  /* I believe this is used only for file-local functions.
                     The comment in symconst.h ("load time only static procs")
                     isn't particularly clear on this point.  */
-                 prim_record_minimal_symbol (name, sh.value, mst_file_text);
+                 prim_record_minimal_symbol (name, sh.value, mst_file_text,
+                                             objfile);
                  /* FALLTHROUGH */
 
                case stProc:    /* Asm labels apparently */
@@ -2378,9 +2379,11 @@ parse_partial_symbols (objfile, section_offsets)
 
                case stStatic:  /* Variable */
                  if (sh.sc == scData || sh.sc == scSData || sh.sc == scRData)
-                   prim_record_minimal_symbol (name, sh.value, mst_file_data);
+                   prim_record_minimal_symbol (name, sh.value, mst_file_data,
+                                               objfile);
                  else
-                   prim_record_minimal_symbol (name, sh.value, mst_file_bss);
+                   prim_record_minimal_symbol (name, sh.value, mst_file_bss,
+                                               objfile);
                  class = LOC_STATIC;
                  break;
 
index b45b4f4a3db3ec3418892307dff2568a0a8c1f4d..31f20c339e53638c4be7fd3e6cf43dc1a3f708ed 100644 (file)
@@ -292,21 +292,24 @@ init_minimal_symbol_collection ()
 }
 
 void
-prim_record_minimal_symbol (name, address, ms_type)
+prim_record_minimal_symbol (name, address, ms_type, objfile)
      const char *name;
      CORE_ADDR address;
      enum minimal_symbol_type ms_type;
+     struct objfile *objfile;
 {
-  prim_record_minimal_symbol (name, address, ms_type, NULL, -1);
+  prim_record_minimal_symbol (name, address, ms_type, NULL, -1, objfile);
 }
 
 void
-prim_record_minimal_symbol_and_info (name, address, ms_type, info, section)
+prim_record_minimal_symbol_and_info (name, address, ms_type, info, section,
+                                    objfile)
      const char *name;
      CORE_ADDR address;
      enum minimal_symbol_type ms_type;
      char *info;
      int section;
+     struct objfile *objfile;
 {
   register struct msym_bunch *new;
   register struct minimal_symbol *msymbol;
index f3455039dd12b11cdd6597093678584edc3d87db..2f0d7719b630ece42390e42c3fa296931c6424fe 100644 (file)
@@ -89,7 +89,7 @@ record_minimal_symbol (name, address, ms_type, objfile)
      struct objfile *objfile;
 {
   name = obsavestring (name, strlen (name), &objfile -> symbol_obstack);
-  prim_record_minimal_symbol (name, address, ms_type);
+  prim_record_minimal_symbol (name, address, ms_type, objfile);
 }
 
 
index a7922f2c63ad3b88079f5a6937017d651e2c4e4d..7c24fdd80c6902135a623a03ee143d166dd9134c 100644 (file)
@@ -81,7 +81,7 @@ record_minimal_symbol (name, address, ms_type, objfile)
      struct objfile *objfile;
 {
   name = obsavestring (name, strlen (name), &objfile -> symbol_obstack);
-  prim_record_minimal_symbol (name, address, ms_type);
+  prim_record_minimal_symbol (name, address, ms_type, objfile);
 }
 
 /*
index 1b50615aaaf1ee528e78ae63dfe7ab92a9402d38..854d6ea2df22dc35a40c7622bb75b93eb80132e6 100644 (file)
@@ -326,7 +326,7 @@ solib_add_common_symbols (rtc_symp, objfile)
              name = obsavestring (name, strlen (name),
                                   &objfile -> symbol_obstack);
              prim_record_minimal_symbol (name, inferior_rtc_nlist.n_value,
-                                         mst_bss);
+                                         mst_bss, objfile);
            }
          free (origname);
        }
@@ -442,7 +442,7 @@ look_for_base (fd, baseaddr)
      mapped memory segment, so skip it.  Also, if the fd corresponds
      to the exec file, skip it as well. */
 
-  if ((fd == -1) || fdmatch (fileno ((FILE *)(exec_bfd -> iostream)), fd))
+  if ((fd == -1) || fdmatch (fileno ((GDB_FILE *)(exec_bfd -> iostream)), fd))
     {
       return (0);
     }
@@ -785,7 +785,7 @@ solib_add (arg_string, from_tty, target)
            {
              if (from_tty)
                {
-                 printf ("Symbols already loaded for %s\n", so -> so_name);
+                 printf_unfiltered ("Symbols already loaded for %s\n", so -> so_name);
                }
            }
          else if (catch_errors
@@ -887,7 +887,7 @@ info_sharedlibrary_command (ignore, from_tty)
   
   if (exec_bfd == NULL)
     {
-      printf ("No exec file.\n");
+      printf_unfiltered ("No exec file.\n");
       return;
     }
   while ((so = find_solib (so)) != NULL)
@@ -896,23 +896,23 @@ info_sharedlibrary_command (ignore, from_tty)
        {
          if (!header_done)
            {
-             printf("%-12s%-12s%-12s%s\n", "From", "To", "Syms Read",
+             printf_unfiltered("%-12s%-12s%-12s%s\n", "From", "To", "Syms Read",
                     "Shared Object Library");
              header_done++;
            }
-         printf ("%-12s",
+         printf_unfiltered ("%-12s",
                  local_hex_string_custom ((unsigned long) LM_ADDR (so),
                                           "08l"));
-         printf ("%-12s",
+         printf_unfiltered ("%-12s",
                  local_hex_string_custom ((unsigned long) so -> lmend,
                                           "08l"));
-         printf ("%-12s", so -> symbols_loaded ? "Yes" : "No");
-         printf ("%s\n",  so -> so_name);
+         printf_unfiltered ("%-12s", so -> symbols_loaded ? "Yes" : "No");
+         printf_unfiltered ("%s\n",  so -> so_name);
        }
     }
   if (so_list_head == NULL)
     {
-      printf ("No shared libraries loaded at this time.\n");   
+      printf_unfiltered ("No shared libraries loaded at this time.\n");        
     }
 }
 
@@ -1268,7 +1268,7 @@ solib_create_inferior_hook()
   stop_signal = 0;
   do
     {
-      target_resume (inferior_pid, 0, stop_signal);
+      target_resume (-1, 0, stop_signal);
       wait_for_inferior ();
     }
   while (stop_signal != SIGTRAP);
index 2ce0ce40e2d1bc3b7dd3a05c99389a954da62f6a..6e61e80df5e6d1bc7f7b056b8210d9fc3511b7c8 100644 (file)
@@ -926,7 +926,7 @@ retrieve_traceback (abfd, textsec, cs, size)
 /* Reading symbol table has to be fast! Keep the followings as macros, rather
    than functions. */
 
-#define        RECORD_MINIMAL_SYMBOL(NAME, ADDR, TYPE, ALLOCED, SECTION)       \
+#define        RECORD_MINIMAL_SYMBOL(NAME, ADDR, TYPE, ALLOCED, SECTION, OBJFILE) \
 {                                              \
   char *namestr;                               \
   if (ALLOCED)                                         \
@@ -937,7 +937,7 @@ retrieve_traceback (abfd, textsec, cs, size)
     (ALLOCED) = 1;                                             \
   }                                                            \
   prim_record_minimal_symbol_and_info (namestr, (ADDR), (TYPE), \
-                                      (char *)NULL, (SECTION));        \
+                                      (char *)NULL, (SECTION), (OBJFILE)); \
   misc_func_recorded = 1;                                      \
 }
 
@@ -1182,7 +1182,8 @@ read_xcoff_symtab (objfile, nsyms)
                  if (!misc_func_recorded) {
                     int alloced = 0;
                     RECORD_MINIMAL_SYMBOL (last_csect_name, last_csect_val,
-                                           mst_text, alloced, last_csect_sec);
+                                           mst_text, alloced, last_csect_sec,
+                                           objfile);
                  }
                    
 
@@ -1241,7 +1242,7 @@ read_xcoff_symtab (objfile, nsyms)
 
 function_entry_point:
            RECORD_MINIMAL_SYMBOL (cs->c_name, cs->c_value, mst_text, 
-                                  symname_alloced, cs->c_secnum);
+                                  symname_alloced, cs->c_secnum, objfile);
 
            fcn_line_offset = main_aux->x_sym.x_fcnary.x_fcn.x_lnnoptr;
            fcn_start_addr = cs->c_value;
@@ -1330,14 +1331,14 @@ function_entry_point:
 
            prim_record_minimal_symbol_and_info
              ("<trampoline>", cs->c_value, mst_unknown,
-              (char *)NULL, cs->c_secnum);
+              (char *)NULL, cs->c_secnum, objfile);
 #else
 
            /* record trampoline code entries as mst_unknown symbol. When we
               lookup mst symbols, we will choose mst_text over mst_unknown. */
 
            RECORD_MINIMAL_SYMBOL (cs->c_name, cs->c_value, mst_unknown,
-                                  symname_alloced);
+                                  symname_alloced, objfile);
 #endif
            continue;
          }
@@ -1361,7 +1362,7 @@ function_entry_point:
 
          int alloced = 0;
          RECORD_MINIMAL_SYMBOL (last_csect_name, last_csect_val,
-                               mst_text, alloced, last_csect_sec);
+                               mst_text, alloced, last_csect_sec, objfile);
       }
 
       /* c_value field contains symnum of next .file entry in table