aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-x86-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/linux-x86-low.c')
-rw-r--r--gdb/gdbserver/linux-x86-low.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index cafff6b..54bd2a2 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -912,9 +912,11 @@ x86_linux_process_qsupported (char **features, int count)
if (startswith (feature, "xmlRegisters="))
{
char *copy = xstrdup (feature + 13);
- char *p;
- for (p = strtok (copy, ","); p != NULL; p = strtok (NULL, ","))
+ char *saveptr;
+ for (char *p = strtok_r (copy, ",", &saveptr);
+ p != NULL;
+ p = strtok_r (NULL, ",", &saveptr))
{
if (strcmp (p, "i386") == 0)
{