/* Low level interface for debugging AIX 4.3+ pthreads.
- Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2007 Free Software Foundation, Inc.
Written by Nick Duffek <nsd@redhat.com>.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* This module uses the libpthdebug.a library provided by AIX 4.3+ for
}
break;
}
- error ("aix-thread: ptrace (%d, %d) returned %d (errno = %d %s)",
+ error (_("aix-thread: ptrace (%d, %d) returned %d (errno = %d %s)"),
req, id, ret, errno, safe_strerror (errno));
return 0; /* Not reached. */
}
{
switch (state)
{
- case PST_IDLE: return "idle"; /* being created */
- case PST_RUN: return "running"; /* running */
- case PST_SLEEP: return "sleeping"; /* awaiting an event */
- case PST_READY: return "ready"; /* runnable */
- case PST_TERM: return "finished"; /* awaiting a join/detach */
- default: return "unknown";
+ case PST_IDLE:
+ /* i18n: Like "Thread-Id %d, [state] idle" */
+ return _("idle"); /* being created */
+ case PST_RUN:
+ /* i18n: Like "Thread-Id %d, [state] running" */
+ return _("running"); /* running */
+ case PST_SLEEP:
+ /* i18n: Like "Thread-Id %d, [state] sleeping" */
+ return _("sleeping"); /* awaiting an event */
+ case PST_READY:
+ /* i18n: Like "Thread-Id %d, [state] ready" */
+ return _("ready"); /* runnable */
+ case PST_TERM:
+ /* i18n: Like "Thread-Id %d, [state] finished" */
+ return _("finished"); /* awaiting a join/detach */
+ default:
+ /* i18n: Like "Thread-Id %d, [state] unknown" */
+ return _("unknown");
}
}
{
thread = find_thread_pid (ptid);
if (!thread)
- error ("aix-thread resume: unknown pthread %ld",
+ error (_("aix-thread resume: unknown pthread %ld"),
TIDGET (ptid));
tid[0] = thread->private->tid;
if (tid[0] == PTHDB_INVALID_TID)
- error ("aix-thread resume: no tid for pthread %ld",
+ error (_("aix-thread resume: no tid for pthread %ld"),
TIDGET (ptid));
tid[1] = 0;
"fetch_regs_user_thread %lx\n", (long) pdtid);
status = pthdb_pthread_context (pd_session, pdtid, &ctx);
if (status != PTHDB_SUCCESS)
- error ("aix-thread: fetch_registers: pthdb_pthread_context returned %s",
+ error (_("aix-thread: fetch_registers: pthdb_pthread_context returned %s"),
pd_status2str (status));
/* General-purpose registers. */
values. */
status = pthdb_pthread_context (pd_session, pdtid, &ctx);
if (status != PTHDB_SUCCESS)
- error ("aix-thread: store_registers: pthdb_pthread_context returned %s",
+ error (_("aix-thread: store_registers: pthdb_pthread_context returned %s"),
pd_status2str (status));
/* Collect general-purpose register values from the regcache. */
status = pthdb_pthread_setcontext (pd_session, pdtid, &ctx);
if (status != PTHDB_SUCCESS)
- error ("aix-thread: store_registers: pthdb_pthread_setcontext returned %s",
+ error (_("aix-thread: store_registers: pthdb_pthread_setcontext returned %s"),
pd_status2str (status));
}
struct cleanup *cleanup = save_inferior_ptid ();
inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
- n = base_target.to_xfer_memory (memaddr, myaddr, len,
- write, attrib, &base_target);
+ n = base_target.deprecated_xfer_memory (memaddr, myaddr, len,
+ write, attrib, &base_target);
do_cleanups (cleanup);
return n;
xstrprintf(). */
xfree (ret);
- ret = xstrprintf ("Thread %ld", ptid_get_tid (ptid));
+ ret = xstrprintf (_("Thread %ld"), ptid_get_tid (ptid));
return ret;
}
tid = thread->private->tid;
if (tid != PTHDB_INVALID_TID)
- fprintf_unfiltered (buf, "tid %d", tid);
+ /* i18n: Like "thread-identifier %d, [state] running, suspended" */
+ fprintf_unfiltered (buf, _("tid %d"), tid);
status = pthdb_pthread_state (pd_session, pdtid, &state);
if (status != PTHDB_SUCCESS)
status = pthdb_pthread_suspendstate (pd_session, pdtid,
&suspendstate);
if (status == PTHDB_SUCCESS && suspendstate == PSS_SUSPENDED)
- fprintf_unfiltered (buf, ", suspended");
+ /* i18n: Like "Thread-Id %d, [state] running, suspended" */
+ fprintf_unfiltered (buf, _(", suspended"));
status = pthdb_pthread_detachstate (pd_session, pdtid,
&detachstate);
if (status == PTHDB_SUCCESS && detachstate == PDS_DETACHED)
- fprintf_unfiltered (buf, ", detached");
+ /* i18n: Like "Thread-Id %d, [state] running, detached" */
+ fprintf_unfiltered (buf, _(", detached"));
pthdb_pthread_cancelpend (pd_session, pdtid, &cancelpend);
if (status == PTHDB_SUCCESS && cancelpend)
- fprintf_unfiltered (buf, ", cancel pending");
+ /* i18n: Like "Thread-Id %d, [state] running, cancel pending" */
+ fprintf_unfiltered (buf, _(", cancel pending"));
ui_file_write (buf, "", 1);
init_aix_thread_ops (void)
{
aix_thread_ops.to_shortname = "aix-threads";
- aix_thread_ops.to_longname = "AIX pthread support";
- aix_thread_ops.to_doc = "AIX pthread support";
+ aix_thread_ops.to_longname = _("AIX pthread support");
+ aix_thread_ops.to_doc = _("AIX pthread support");
aix_thread_ops.to_attach = aix_thread_attach;
aix_thread_ops.to_detach = aix_thread_detach;
aix_thread_ops.to_wait = aix_thread_wait;
aix_thread_ops.to_fetch_registers = aix_thread_fetch_registers;
aix_thread_ops.to_store_registers = aix_thread_store_registers;
- aix_thread_ops.to_xfer_memory = aix_thread_xfer_memory;
+ aix_thread_ops.deprecated_xfer_memory = aix_thread_xfer_memory;
/* No need for aix_thread_ops.to_create_inferior, because we activate thread
debugging when the inferior reaches pd_brk_addr. */
aix_thread_ops.to_kill = aix_thread_kill;
target_new_objfile_chain = deprecated_target_new_objfile_hook;
deprecated_target_new_objfile_hook = new_objfile;
- deprecated_add_show_from_set
- (add_set_cmd ("aix-thread", no_class, var_zinteger,
- (char *) &debug_aix_thread,
- "Set debugging of AIX thread module.\n"
- "Enables printf debugging output.\n",
- &setdebuglist),
- &showdebuglist);
+ add_setshow_boolean_cmd ("aix-thread", class_maintenance, &debug_aix_thread,
+ _("Set debugging of AIX thread module."),
+ _("Show debugging of AIX thread module."),
+ _("Enables debugging output (used to debug GDB)."),
+ NULL, NULL, /* FIXME: i18n: Debugging of AIX thread module is \"%d\". */
+ &setdebuglist, &showdebuglist);
}