Make linux_ptrace_attach_fail_reason return an std::string
[deliverable/binutils-gdb.git] / gdb / gdbserver / thread-db.c
index 6829fcca42c84d5d964a63840ced89c833316b26..812aa0f61f1576aaa5bf822209db7efaa1ed3a28 100644 (file)
@@ -225,9 +225,11 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
   err = linux_attach_lwp (ptid);
   if (err != 0)
     {
+      std::string reason = linux_ptrace_attach_fail_reason_string (ptid, err);
+
       warning ("Could not attach to thread %ld (LWP %d): %s\n",
-              (unsigned long) ti_p->ti_tid, ti_p->ti_lid,
-              linux_ptrace_attach_fail_reason_string (ptid, err));
+              (unsigned long) ti_p->ti_tid, ti_p->ti_lid, reason.c_str ());
+
       return 0;
     }
 
This page took 0.023724 seconds and 4 git commands to generate.