along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "common/byte-vector.h"
+#include "gdbsupport/byte-vector.h"
#include "gdbcore.h"
#include "inferior.h"
#include "regcache.h"
#include "regset.h"
+#include "gdbarch.h"
#include "gdbcmd.h"
#include "gdbthread.h"
-#include "common/gdb_wait.h"
+#include "gdbsupport/gdb_wait.h"
#include "inf-ptrace.h"
#include <sys/types.h>
#include <sys/procfs.h>
#include <libutil.h>
#endif
#if !defined(HAVE_KINFO_GETVMMAP)
-#include "common/filestuff.h"
+#include "gdbsupport/filestuff.h"
#endif
#include "elf-bfd.h"
}
#ifdef PT_LWPINFO
-static int debug_fbsd_lwp;
-static int debug_fbsd_nat;
+static bool debug_fbsd_lwp;
+static bool debug_fbsd_nat;
static void
show_fbsd_lwp_debug (struct ui_file *file, int from_tty,
return true;
}
-/* Convert PTID to a string. Returns the string in a static
- buffer. */
+/* Convert PTID to a string. */
-const char *
+std::string
fbsd_nat_target::pid_to_str (ptid_t ptid)
{
lwpid_t lwp;
lwp = ptid.lwp ();
if (lwp != 0)
{
- static char buf[64];
int pid = ptid.pid ();
- xsnprintf (buf, sizeof buf, "LWP %d of process %d", lwp, pid);
- return buf;
+ return string_printf ("LWP %d of process %d", lwp, pid);
}
return normal_pid_to_str (ptid);
"FLWP: deleting thread for LWP %u\n",
pl.pl_lwpid);
if (print_thread_events)
- printf_unfiltered (_("[%s exited]\n"), target_pid_to_str
- (wptid));
+ printf_unfiltered (_("[%s exited]\n"),
+ target_pid_to_str (wptid).c_str ());
delete_thread (thr);
}
if (ptrace (PT_CONTINUE, pid, (caddr_t) 1, 0) == -1)