-int server_waiting;
-
-static int extended_protocol;
-static int response_needed;
-static int exit_requested;
+static bool extended_protocol;
+static bool response_needed;
+static bool exit_requested;
/* Set if you want to disable optional thread related packets support
in gdbserver, for the sake of testing GDB against stubs that don't
support them. */
/* Set if you want to disable optional thread related packets support
in gdbserver, for the sake of testing GDB against stubs that don't
support them. */
-int disable_packet_vCont;
-int disable_packet_Tthread;
-int disable_packet_qC;
-int disable_packet_qfThreadInfo;
+bool disable_packet_vCont;
+bool disable_packet_Tthread;
+bool disable_packet_qC;
+bool disable_packet_qfThreadInfo;
else if (strcmp (mon, "help") == 0)
monitor_show_help ();
else if (strcmp (mon, "exit") == 0)
else if (strcmp (mon, "help") == 0)
monitor_show_help ();
else if (strcmp (mon, "exit") == 0)
- (" <library name=\"%s\"><segment address=\"0x%lx\"/></library>\n",
- dll.name.c_str (), (long) dll.base_addr);
+ (" <library name=\"%s\"><segment address=\"0x%s\"/></library>\n",
+ dll.name.c_str (), paddress (dll.base_addr));
/* Two passes, to avoid nested strtok calls in
target_process_qsupported. */
/* Two passes, to avoid nested strtok calls in
target_process_qsupported. */
"gdbserver is free software, covered by the "
"GNU General Public License.\n"
"This gdbserver was configured as \"%s\"\n",
"gdbserver is free software, covered by the "
"GNU General Public License.\n"
"This gdbserver was configured as \"%s\"\n",
- char *packets, *tok;
-
- packets = *next_arg += sizeof ("--disable-packet=") - 1;
- for (tok = strtok (packets, ",");
+ char *packets = *next_arg += sizeof ("--disable-packet=") - 1;
+ char *saveptr;
+ for (char *tok = strtok_r (packets, ",", &saveptr);
- disable_packet_vCont = 1;
- disable_packet_Tthread = 1;
- disable_packet_qC = 1;
- disable_packet_qfThreadInfo = 1;
+ disable_packet_vCont = true;
+ disable_packet_Tthread = true;
+ disable_packet_qC = true;
+ disable_packet_qfThreadInfo = true;
else if (strcmp (*next_arg, "--no-startup-with-shell") == 0)
startup_with_shell = false;
else if (strcmp (*next_arg, "--once") == 0)
else if (strcmp (*next_arg, "--no-startup-with-shell") == 0)
startup_with_shell = false;
else if (strcmp (*next_arg, "--once") == 0)
else if (strcmp (*next_arg, "--selftest") == 0)
selftest = true;
else if (startswith (*next_arg, "--selftest="))
else if (strcmp (*next_arg, "--selftest") == 0)
selftest = true;
else if (startswith (*next_arg, "--selftest="))