* defs.h (msavestring, mstrsave): Remove prototypes.
authorMark Kettenis <kettenis@gnu.org>
Thu, 30 Sep 2004 19:57:54 +0000 (19:57 +0000)
committerMark Kettenis <kettenis@gnu.org>
Thu, 30 Sep 2004 19:57:54 +0000 (19:57 +0000)
* utils.c (msavestring, mstrsave): Remove functions.
* objfiles.c (allocate_objfile): Use xstrdup instead of mstrsave.
* solib-sunos.c (allocate_rt_common_objfile): Use xstrdup instead
of mstrsave.
* source.c (find_and_open_source): Use xstrdup instead of
mstrsave.

gdb/ChangeLog
gdb/defs.h
gdb/objfiles.c
gdb/solib-sunos.c
gdb/source.c
gdb/utils.c

index be2b28abb66285796357c5c866b50d5fc7bf498f..4c5a42cc62ba3ae7d7daf1c5842e9d52ebae5aa3 100644 (file)
@@ -1,3 +1,13 @@
+2004-09-29  Mark Kettenis  <kettenis@gnu.org>
+
+       * defs.h (msavestring, mstrsave): Remove prototypes.
+       * utils.c (msavestring, mstrsave): Remove functions.
+       * objfiles.c (allocate_objfile): Use xstrdup instead of mstrsave.
+       * solib-sunos.c (allocate_rt_common_objfile): Use xstrdup instead
+       of mstrsave.
+       * source.c (find_and_open_source): Use xstrdup instead of
+       mstrsave.
+
 2004-09-30  Andrew Cagney  <cagney@gnu.org>
 
        * inf-ptrace.c (inf_ptrace_target): Do not set to_xfer_memory.
index 63477de59680652e3d1569b602d378c872f4d65b..24b7c9ae9a6b3cf558b223efe435056a98a41d2b 100644 (file)
@@ -852,10 +852,6 @@ extern int longest_to_int (LONGEST);
 
 extern char *savestring (const char *, size_t);
 
-extern char *msavestring (void *, const char *, size_t);
-
-extern char *mstrsave (void *, const char *);
-
 /* xmalloc(), xrealloc() and xcalloc() have already been declared in
    "libiberty.h". */
 extern void xfree (void *);
index 69f61d48688ab48d15b10e636f3375094a9fbec4..3c4e0b402b0ec3fa94b03a3ef6d290a7f0e3f1f8 100644 (file)
@@ -184,7 +184,7 @@ allocate_objfile (bfd *abfd, int flags)
     }
   if (abfd != NULL)
     {
-      objfile->name = mstrsave (objfile->md, bfd_get_filename (abfd));
+      objfile->name = xstrdup (bfd_get_filename (abfd));
       objfile->mtime = bfd_get_mtime (abfd);
 
       /* Build section table.  */
@@ -197,7 +197,7 @@ allocate_objfile (bfd *abfd, int flags)
     }
   else
     {
-      objfile->name = mstrsave (objfile->md, "<<anonymous objfile>>");
+      objfile->name = xstrdup ("<<anonymous objfile>>");
     }
 
   /* Initialize the section indexes for this objfile, so that we can
index 872c8acd1e48f4d6600bac6711b8dc75a1347af0..23b7dd278d3744846884c719e44857ac5c4e798d 100644 (file)
@@ -146,7 +146,7 @@ allocate_rt_common_objfile (void)
   objfile->psymbol_cache = bcache_xmalloc ();
   objfile->macro_cache = bcache_xmalloc ();
   obstack_init (&objfile->objfile_obstack);
-  objfile->name = mstrsave (objfile->md, "rt_common");
+  objfile->name = xstrdup ("rt_common");
 
   /* Add this file onto the tail of the linked list of other such files. */
 
index b1e9c387473f3b047379dc71b89515cc644fb091..e2b6fa90f67a7db725c0d6dbb9e20705a4f2a330 100644 (file)
@@ -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;
index 1c7b73882a58c3041105f568a3c0cef045be780a..e30808c38b4d0f8a848b1f4a30016c31a22aaf49 100644 (file)
@@ -1168,21 +1168,6 @@ savestring (const char *ptr, size_t size)
   return p;
 }
 
-char *
-msavestring (void *md, const char *ptr, size_t size)
-{
-  char *p = (char *) xmalloc (size + 1);
-  memcpy (p, ptr, size);
-  p[size] = 0;
-  return p;
-}
-
-char *
-mstrsave (void *md, const char *ptr)
-{
-  return (msavestring (md, ptr, strlen (ptr)));
-}
-
 void
 print_spaces (int n, struct ui_file *file)
 {
This page took 0.034652 seconds and 4 git commands to generate.