summaryrefslogtreecommitdiff
path: root/gdb/fbsd-proc.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-04-08 21:53:00 +0000
committerMark Kettenis <kettenis@gnu.org>2002-04-08 21:53:00 +0000
commit4ae8f6e647c24f00afa1eabed3a8184e54e4deb4 (patch)
tree14b2a4158c4e8c30afa39169925d5dd03fa5207b /gdb/fbsd-proc.c
parentbe6cb5e49a01ecad99a2447547412c7a49ed1ed1 (diff)
downloadgdb-4ae8f6e647c24f00afa1eabed3a8184e54e4deb4.tar.gz
* fbsd-proc.c (child_pid_to_exec_file, fbsd_find_memory_regions):
s/asprintf/xasprintf/. (fbsd_make_corefile_notes): s/strdup/xstrdup/.
Diffstat (limited to 'gdb/fbsd-proc.c')
-rw-r--r--gdb/fbsd-proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/fbsd-proc.c b/gdb/fbsd-proc.c
index 91746d61786..c68238dbece 100644
--- a/gdb/fbsd-proc.c
+++ b/gdb/fbsd-proc.c
@@ -35,7 +35,7 @@ child_pid_to_exec_file (int pid)
char *path;
char *buf;
- asprintf (&path, "/proc/%d/file", pid);
+ xasprintf (&path, "/proc/%d/file", pid);
buf = xcalloc (MAXPATHLEN, sizeof (char));
make_cleanup (xfree, path);
make_cleanup (xfree, buf);
@@ -84,7 +84,7 @@ fbsd_find_memory_regions (int (*func) (CORE_ADDR,
char protection[4];
int read, write, exec;
- asprintf (&mapfilename, "/proc/%ld/map", (long) pid);
+ xasprintf (&mapfilename, "/proc/%ld/map", (long) pid);
mapfile = fopen (mapfilename, "r");
if (mapfile == NULL)
error ("Couldn't open %s\n", mapfilename);
@@ -145,7 +145,7 @@ fbsd_make_corefile_notes (bfd *obfd, int *note_size)
if (get_exec_file (0))
{
char *fname = strrchr (get_exec_file (0), '/') + 1;
- char *psargs = strdup (fname);
+ char *psargs = xstrdup (fname);
if (get_inferior_args ())
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);