* defs.h (msavestring, mstrsave): Remove prototypes.
[deliverable/binutils-gdb.git] / gdb / source.c
index aff0542c0bf1048491bb8228670ec663f94f2586..e2b6fa90f67a7db725c0d6dbb9e20705a4f2a330 100644 (file)
@@ -325,12 +325,12 @@ forget_cached_source_info (void)
        {
          if (s->line_charpos != NULL)
            {
-             xmfree (objfile->md, s->line_charpos);
+             xfree (s->line_charpos);
              s->line_charpos = NULL;
            }
          if (s->fullname != NULL)
            {
-             xmfree (objfile->md, s->fullname);
+             xfree (s->fullname);
              s->fullname = NULL;
            }
        }
@@ -851,7 +851,7 @@ find_and_open_source (struct objfile *objfile,
       if (result >= 0)
        return result;
       /* Didn't work -- free old one, try again. */
-      xmfree (objfile->md, *fullname);
+      xfree (*fullname);
       *fullname = NULL;
     }
 
@@ -889,7 +889,7 @@ find_and_open_source (struct objfile *objfile,
     {
       char *tmp_fullname;
       tmp_fullname = *fullname;
-      *fullname = mstrsave (objfile->md, *fullname);
+      *fullname = xstrdup (tmp_fullname);
       xfree (tmp_fullname);
     }
   return result;
@@ -1014,8 +1014,8 @@ find_source_lines (struct symtab *s, int desc)
              {
                lines_allocated *= 2;
                line_charpos =
-                 (int *) xmrealloc (s->objfile->md, (char *) line_charpos,
-                                    sizeof (int) * lines_allocated);
+                 (int *) xrealloc ((char *) line_charpos,
+                                   sizeof (int) * lines_allocated);
              }
            line_charpos[nlines++] = lseek (desc, 0, SEEK_CUR);
          }
@@ -1052,8 +1052,8 @@ find_source_lines (struct symtab *s, int desc)
              {
                lines_allocated *= 2;
                line_charpos =
-                 (int *) xmrealloc (s->objfile->md, (char *) line_charpos,
-                                    sizeof (int) * lines_allocated);
+                 (int *) xrealloc ((char *) line_charpos,
+                                   sizeof (int) * lines_allocated);
              }
            line_charpos[nlines++] = p - data;
          }
@@ -1063,8 +1063,7 @@ find_source_lines (struct symtab *s, int desc)
 #endif /* lseek linear.  */
   s->nlines = nlines;
   s->line_charpos =
-    (int *) xmrealloc (s->objfile->md, (char *) line_charpos,
-                      nlines * sizeof (int));
+    (int *) xrealloc ((char *) line_charpos, nlines * sizeof (int));
 
 }
 
This page took 0.024329 seconds and 4 git commands to generate.