diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/defs.h | 4 | ||||
-rw-r--r-- | gdb/objfiles.c | 4 | ||||
-rw-r--r-- | gdb/solib-sunos.c | 2 | ||||
-rw-r--r-- | gdb/source.c | 2 | ||||
-rw-r--r-- | gdb/utils.c | 15 |
6 files changed, 14 insertions, 23 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index be2b28a..4c5a42c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. @@ -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 *); diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 69f61d4..3c4e0b4 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -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 diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c index 872c8ac..23b7dd2 100644 --- a/gdb/solib-sunos.c +++ b/gdb/solib-sunos.c @@ -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. */ diff --git a/gdb/source.c b/gdb/source.c index b1e9c3874..e2b6fa9 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -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; diff --git a/gdb/utils.c b/gdb/utils.c index 1c7b738..e30808c 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -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) { |