aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 567b01c..18cee91 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -839,9 +839,10 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args,
" Size", " Offset", "objfile");
}
- for (line = strtok (map.get (), "\n");
+ char *saveptr;
+ for (line = strtok_r (map.get (), "\n", &saveptr);
line;
- line = strtok (NULL, "\n"))
+ line = strtok_r (NULL, "\n", &saveptr))
{
ULONGEST addr, endaddr, offset, inode;
const char *permissions, *device, *mapping_filename;