diff options
Diffstat (limited to 'gdb/aix-thread.c')
-rw-r--r-- | gdb/aix-thread.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index ea64220..cf1a462 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1749,7 +1749,6 @@ static char * aix_thread_extra_thread_info (struct target_ops *self, struct thread_info *thread) { - struct ui_file *buf; int status; pthdb_pthread_t pdtid; pthdb_tid_t tid; @@ -1762,43 +1761,42 @@ aix_thread_extra_thread_info (struct target_ops *self, if (!PD_TID (thread->ptid)) return NULL; - buf = mem_fileopen (); + string_file buf; pdtid = thread->priv->pdtid; tid = thread->priv->tid; if (tid != PTHDB_INVALID_TID) /* i18n: Like "thread-identifier %d, [state] running, suspended" */ - fprintf_unfiltered (buf, _("tid %d"), (int)tid); + buf.printf (_("tid %d"), (int)tid); status = pthdb_pthread_state (pd_session, pdtid, &state); if (status != PTHDB_SUCCESS) state = PST_NOTSUP; - fprintf_unfiltered (buf, ", %s", state2str (state)); + buf.printf (", %s", state2str (state)); status = pthdb_pthread_suspendstate (pd_session, pdtid, &suspendstate); if (status == PTHDB_SUCCESS && suspendstate == PSS_SUSPENDED) /* i18n: Like "Thread-Id %d, [state] running, suspended" */ - fprintf_unfiltered (buf, _(", suspended")); + buf.printf (_(", suspended")); status = pthdb_pthread_detachstate (pd_session, pdtid, &detachstate); if (status == PTHDB_SUCCESS && detachstate == PDS_DETACHED) /* i18n: Like "Thread-Id %d, [state] running, detached" */ - fprintf_unfiltered (buf, _(", detached")); + buf.printf (_(", detached")); pthdb_pthread_cancelpend (pd_session, pdtid, &cancelpend); if (status == PTHDB_SUCCESS && cancelpend) /* i18n: Like "Thread-Id %d, [state] running, cancel pending" */ - fprintf_unfiltered (buf, _(", cancel pending")); + buf.printf (_(", cancel pending")); - ui_file_write (buf, "", 1); + buf.write ("", 1); xfree (ret); /* Free old buffer. */ - ret = ui_file_xstrdup (buf, NULL); - ui_file_delete (buf); + ret = xstrdup (buf.c_str ()); return ret; } |