aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-01-05 15:43:50 +0000
committerAndrew Cagney <cagney@redhat.com>2005-01-05 15:43:50 +0000
commitedefbb7cc7b16bbfb0c831344d8edcdf483ec5a4 (patch)
tree366c8d346fc499acb175fa2c03235dac3e11eaeb /gdb
parent8af139b3f9d848a998f4b41ffdfe8b3723b39412 (diff)
downloadgdb-edefbb7cc7b16bbfb0c831344d8edcdf483ec5a4.zip
gdb-edefbb7cc7b16bbfb0c831344d8edcdf483ec5a4.tar.gz
gdb-edefbb7cc7b16bbfb0c831344d8edcdf483ec5a4.tar.bz2
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney. * ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup. * alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup. * amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup. * arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup. * armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup. * aix-thread.c (_initialize_aix_thread): Get rid of the deprecated_add_show_from_set call. * alpha-tdep.c (_initialize_alpha_tdep): Ditto. * arm-tdep.c (_initialize_arm_tdep): Ditto. * command.h (add_setshow_enum_cmd): Add arguments for returning new list elements. * cli/cli-decode.c (add_setshow_enum_cmd): Ditto. * mips-tdep.c (_initialize_mips_tdep): Modify calls to add_setshow_enum_cmd.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog18
-rw-r--r--gdb/ada-valprint.c10
-rw-r--r--gdb/aix-thread.c67
-rw-r--r--gdb/alpha-nat.c4
-rw-r--r--gdb/alpha-tdep.c22
-rw-r--r--gdb/alphabsd-nat.c12
-rw-r--r--gdb/alphanbsd-tdep.c6
-rw-r--r--gdb/amd64-linux-nat.c16
-rw-r--r--gdb/amd64-tdep.c2
-rw-r--r--gdb/amd64bsd-nat.c12
-rw-r--r--gdb/amd64fbsd-nat.c12
-rw-r--r--gdb/arch-utils.c51
-rw-r--r--gdb/arm-linux-nat.c26
-rw-r--r--gdb/arm-tdep.c162
-rw-r--r--gdb/armnbsd-nat.c24
-rw-r--r--gdb/armnbsd-tdep.c2
-rw-r--r--gdb/auxv.c96
-rw-r--r--gdb/avr-tdep.c16
-rw-r--r--gdb/cli/cli-decode.c10
-rw-r--r--gdb/command.h4
-rw-r--r--gdb/mips-tdep.c6
21 files changed, 320 insertions, 258 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 583658b..673df53 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,21 @@
+2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
+
+ Committed by Andrew Cagney.
+ * ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
+ * alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
+ * amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
+ * arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
+ * armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
+ * aix-thread.c (_initialize_aix_thread): Get rid of the
+ deprecated_add_show_from_set call.
+ * alpha-tdep.c (_initialize_alpha_tdep): Ditto.
+ * arm-tdep.c (_initialize_arm_tdep): Ditto.
+ * command.h (add_setshow_enum_cmd): Add arguments for returning
+ new list elements.
+ * cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
+ * mips-tdep.c (_initialize_mips_tdep): Modify calls to
+ add_setshow_enum_cmd.
+
2005-01-04 Mark Kettenis <kettenis@gnu.org>
* configure.host (ia64-*-aix*): Remove.
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index ca0481c..da9a6ba 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -206,7 +206,7 @@ val_print_packed_array_elements (struct type *type, char *valaddr,
val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
0, recurse + 1, pretty);
annotate_elt_rep (i - i0);
- fprintf_filtered (stream, " <repeats %u times>", i - i0);
+ fprintf_filtered (stream, _(" <repeats %u times>"), i - i0);
annotate_elt_rep_end ();
}
@@ -421,11 +421,11 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
case TYPE_CODE_MEMBER:
case TYPE_CODE_METHOD:
case TYPE_CODE_REF:
- warning ("internal error: unhandled type in ada_print_scalar");
+ warning (_("internal error: unhandled type in ada_print_scalar"));
break;
default:
- error ("Invalid type code in symbol table.");
+ error (_("Invalid type code in symbol table."));
}
gdb_flush (stream);
}
@@ -492,7 +492,7 @@ printstr (struct ui_file *stream, char *string, unsigned int length,
ada_emit_char (char_at (string, i, type_len), stream, '\'',
type_len);
fputs_filtered ("'", stream);
- fprintf_filtered (stream, " <repeats %u times>", reps);
+ fprintf_filtered (stream, _(" <repeats %u times>"), reps);
i = rep1 - 1;
things_printed += repeat_count_threshold;
need_comma = 1;
@@ -1068,7 +1068,7 @@ print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
if (TYPE_CPLUS_SPECIFIC (type) != NULL
&& TYPE_FIELD_IGNORE (type, i))
{
- fputs_filtered ("<optimized out or zero length>", stream);
+ fputs_filtered (_("<optimized out or zero length>"), stream);
}
else
{
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 63687d7..bc746d9 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -240,7 +240,7 @@ ptrace_check (int req, int id, int ret)
}
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. */
}
@@ -550,12 +550,24 @@ state2str (pthdb_state_t state)
{
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");
}
}
@@ -970,12 +982,12 @@ aix_thread_resume (ptid_t ptid, int step, enum target_signal sig)
{
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;
@@ -1131,7 +1143,7 @@ fetch_regs_user_thread (pthdb_pthread_t pdtid)
"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. */
@@ -1412,7 +1424,7 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
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. */
@@ -1473,7 +1485,7 @@ store_regs_user_thread (pthdb_pthread_t pdtid)
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));
}
@@ -1660,7 +1672,7 @@ aix_thread_pid_to_str (ptid_t ptid)
xstrprintf(). */
xfree (ret);
- ret = xstrprintf ("Thread %ld", ptid_get_tid (ptid));
+ ret = xstrprintf (_("Thread %ld"), ptid_get_tid (ptid));
return ret;
}
@@ -1690,7 +1702,8 @@ aix_thread_extra_thread_info (struct thread_info *thread)
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)
@@ -1700,16 +1713,19 @@ aix_thread_extra_thread_info (struct thread_info *thread)
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);
@@ -1727,8 +1743,8 @@ static void
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;
@@ -1761,11 +1777,10 @@ _initialize_aix_thread (void)
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_zinteger_cmd ("aix-thread", no_class, (char *) &debug_aix_thread,
+ _("Set debugging of AIX thread module."),
+ _("Show debugging of AIX thread module."),
+ _("Enables debugging output (used to debug GDB)."),
+ _("Debugging of AIX thread module is \"%d\"."),
+ NULL, NULL, &setdebuglist, &showdebuglist);
}
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index f8d04b1..b2737be 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -121,7 +121,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
}
if (bad_reg >= 0)
{
- error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
+ error (_("Register %s not found in core file."), REGISTER_NAME (bad_reg));
}
}
@@ -131,7 +131,7 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
if (core_reg_size < 32 * 8)
{
- error ("Core file register section too small (%u bytes).", core_reg_size);
+ error (_("Core file register section too small (%u bytes)."), core_reg_size);
return;
}
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 2dcce84..d75aebc 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1582,16 +1582,20 @@ _initialize_alpha_tdep (void)
/* We really would like to have both "0" and "unlimited" work, but
command.c doesn't deal with that. So make it a var_zinteger
because the user can always use "999999" or some such for unlimited. */
- c = add_set_cmd ("heuristic-fence-post", class_support, var_zinteger,
- (char *) &heuristic_fence_post,
- _("\
-Set the distance searched for the start of a function.\n\
+ /* We need to throw away the frame cache when we set this, since it
+ might change our ability to get backtraces. */
+ add_setshow_zinteger_cmd ("heuristic-fence-post", class_support,
+ &heuristic_fence_post,
+ _("\
+Set the distance searched for the start of a function."),
+ _("\
+Show the distance searched for the start of a function."),
+ _("\
If you are debugging a stripped executable, GDB needs to search through the\n\
program for the start of a function. This command sets the distance of the\n\
search. The only need to set it is when debugging a stripped executable."),
- &setlist);
- /* We need to throw away the frame cache when we set this, since it
- might change our ability to get backtraces. */
- set_cmd_sfunc (c, reinit_frame_cache_sfunc);
- deprecated_add_show_from_set (c, &showlist);
+ _("\
+The distance searched for the start of a function is \"%d\"."),
+ reinit_frame_cache_sfunc, NULL,
+ &setlist, &showlist);
}
diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c
index 4b1dbde..36b45dd 100644
--- a/gdb/alphabsd-nat.c
+++ b/gdb/alphabsd-nat.c
@@ -92,7 +92,7 @@ fetch_inferior_registers (int regno)
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &gregs, 0) == -1)
- perror_with_name ("Couldn't get registers");
+ perror_with_name (_("Couldn't get registers"));
alphabsd_supply_reg ((char *) &gregs, regno);
if (regno != -1)
@@ -105,7 +105,7 @@ fetch_inferior_registers (int regno)
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
- perror_with_name ("Couldn't get floating point status");
+ perror_with_name (_("Couldn't get floating point status"));
alphabsd_supply_fpreg ((char *) &fpregs, regno);
}
@@ -122,13 +122,13 @@ store_inferior_registers (int regno)
struct reg gregs;
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &gregs, 0) == -1)
- perror_with_name ("Couldn't get registers");
+ perror_with_name (_("Couldn't get registers"));
alphabsd_fill_reg ((char *) &gregs, regno);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &gregs, 0) == -1)
- perror_with_name ("Couldn't write registers");
+ perror_with_name (_("Couldn't write registers"));
if (regno != -1)
return;
@@ -140,12 +140,12 @@ store_inferior_registers (int regno)
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
- perror_with_name ("Couldn't get floating point status");
+ perror_with_name (_("Couldn't get floating point status"));
alphabsd_fill_fpreg ((char *) &fpregs, regno);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
- perror_with_name ("Couldn't write floating point status");
+ perror_with_name (_("Couldn't write floating point status"));
}
}
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index ad00f98..87832c6 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -64,7 +64,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
if (core_reg_size < (SIZEOF_TRAPFRAME + SIZEOF_STRUCT_FPREG))
{
- warning ("Wrong size register set in core file.");
+ warning (_("Wrong size register set in core file."));
return;
}
@@ -86,14 +86,14 @@ fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{
case 0: /* Integer registers. */
if (core_reg_size != SIZEOF_STRUCT_REG)
- warning ("Wrong size register set in core file.");
+ warning (_("Wrong size register set in core file."));
else
alphabsd_supply_reg (core_reg_sect, -1);
break;
case 2: /* Floating point registers. */
if (core_reg_size != SIZEOF_STRUCT_FPREG)
- warning ("Wrong size FP register set in core file.");
+ warning (_("Wrong size FP register set in core file."));
else
alphabsd_supply_fpreg (core_reg_sect, -1);
break;
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index ab4725e..023d161 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -162,7 +162,7 @@ fetch_inferior_registers (int regnum)
elf_gregset_t regs;
if (ptrace (PTRACE_GETREGS, tid, 0, (long) &regs) < 0)
- perror_with_name ("Couldn't get registers");
+ perror_with_name (_("Couldn't get registers"));
amd64_supply_native_gregset (current_regcache, &regs, -1);
if (regnum != -1)
@@ -174,7 +174,7 @@ fetch_inferior_registers (int regnum)
elf_fpregset_t fpregs;
if (ptrace (PTRACE_GETFPREGS, tid, 0, (long) &fpregs) < 0)
- perror_with_name ("Couldn't get floating point status");
+ perror_with_name (_("Couldn't get floating point status"));
amd64_supply_fxsave (current_regcache, -1, &fpregs);
}
@@ -199,12 +199,12 @@ store_inferior_registers (int regnum)
elf_gregset_t regs;
if (ptrace (PTRACE_GETREGS, tid, 0, (long) &regs) < 0)
- perror_with_name ("Couldn't get registers");
+ perror_with_name (_("Couldn't get registers"));
amd64_collect_native_gregset (current_regcache, &regs, regnum);
if (ptrace (PTRACE_SETREGS, tid, 0, (long) &regs) < 0)
- perror_with_name ("Couldn't write registers");
+ perror_with_name (_("Couldn't write registers"));
if (regnum != -1)
return;
@@ -215,12 +215,12 @@ store_inferior_registers (int regnum)
elf_fpregset_t fpregs;
if (ptrace (PTRACE_GETFPREGS, tid, 0, (long) &fpregs) < 0)
- perror_with_name ("Couldn't get floating point status");
+ perror_with_name (_("Couldn't get floating point status"));
amd64_collect_fxsave (current_regcache, regnum, &fpregs);
if (ptrace (PTRACE_SETFPREGS, tid, 0, (long) &fpregs) < 0)
- perror_with_name ("Couldn't write floating point status");
+ perror_with_name (_("Couldn't write floating point status"));
return;
}
@@ -248,7 +248,7 @@ amd64_linux_dr_get (int regnum)
offsetof (struct user, u_debugreg[regnum]), 0);
if (errno != 0)
#if 0
- perror_with_name ("Couldn't read debug register");
+ perror_with_name (_("Couldn't read debug register"));
#else
return 0;
#endif
@@ -269,7 +269,7 @@ amd64_linux_dr_set (int regnum, unsigned long value)
errno = 0;
ptrace (PT_WRITE_U, tid, offsetof (struct user, u_debugreg[regnum]), value);
if (errno != 0)
- perror_with_name ("Couldn't write debug register");
+ perror_with_name (_("Couldn't write debug register"));
}
void
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 03a54ac..0ddface 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -204,7 +204,7 @@ amd64_dwarf_reg_to_regnum (int reg)
regnum = amd64_dwarf_regmap[reg];
if (regnum == -1)
- warning ("Unmapped DWARF Register #%d encountered\n", reg);
+ warning (_("Unmapped DWARF Register #%d encountered\n"), reg);
return regnum;
}
diff --git a/gdb/amd64bsd-nat.c b/gdb/amd64bsd-nat.c
index 4393553..2882cec 100644
--- a/gdb/amd64bsd-nat.c
+++ b/gdb/amd64bsd-nat.c
@@ -49,7 +49,7 @@ amd64bsd_fetch_inferior_registers (int regnum)
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &regs, 0) == -1)
- perror_with_name ("Couldn't get registers");
+ perror_with_name (_("Couldn't get registers"));
amd64_supply_native_gregset (current_regcache, &regs, -1);
if (regnum != -1)
@@ -62,7 +62,7 @@ amd64bsd_fetch_inferior_registers (int regnum)
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
- perror_with_name ("Couldn't get floating point status");
+ perror_with_name (_("Couldn't get floating point status"));
amd64_supply_fxsave (current_regcache, -1, &fpregs);
}
@@ -80,13 +80,13 @@ amd64bsd_store_inferior_registers (int regnum)
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &regs, 0) == -1)
- perror_with_name ("Couldn't get registers");
+ perror_with_name (_("Couldn't get registers"));
amd64_collect_native_gregset (current_regcache, &regs, regnum);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &regs, 0) == -1)
- perror_with_name ("Couldn't write registers");
+ perror_with_name (_("Couldn't write registers"));
if (regnum != -1)
return;
@@ -98,13 +98,13 @@ amd64bsd_store_inferior_registers (int regnum)
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
- perror_with_name ("Couldn't get floating point status");
+ perror_with_name (_("Couldn't get floating point status"));
amd64_collect_fxsave (current_regcache, regnum, &fpregs);
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
- perror_with_name ("Couldn't write floating point status");
+ perror_with_name (_("Couldn't write floating point status"));
}
}
diff --git a/gdb/amd64fbsd-nat.c b/gdb/amd64fbsd-nat.c
index b778761..404191b 100644
--- a/gdb/amd64fbsd-nat.c
+++ b/gdb/amd64fbsd-nat.c
@@ -178,9 +178,9 @@ _initialize_amd64fbsd_nat (void)
if (SC_RIP_OFFSET != offset)
{
- warning ("\
+ warning (_("\
offsetof (struct sigcontext, sc_rip) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>.",
+Please report this to <bug-gdb@gnu.org>."),
offset, SC_RIP_OFFSET);
}
@@ -191,9 +191,9 @@ Please report this to <bug-gdb@gnu.org>.",
if (SC_RSP_OFFSET != offset)
{
- warning ("\
+ warning (_("\
offsetof (struct sigcontext, sc_rsp) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>.",
+Please report this to <bug-gdb@gnu.org>."),
offset, SC_RSP_OFFSET);
}
@@ -204,9 +204,9 @@ Please report this to <bug-gdb@gnu.org>.",
if (SC_RBP_OFFSET != offset)
{
- warning ("\
+ warning (_("\
offsetof (struct sigcontext, sc_rbp) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>.",
+Please report this to <bug-gdb@gnu.org>."),
offset, SC_RBP_OFFSET);
}
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 431b242..6303e3f 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -180,7 +180,7 @@ default_float_format (struct gdbarch *gdbarch)
return &floatformat_ieee_single_little;
default:
internal_error (__FILE__, __LINE__,
- "default_float_format: bad byte order");
+ _("default_float_format: bad byte order"));
}
}
@@ -197,7 +197,7 @@ default_double_format (struct gdbarch *gdbarch)
return &floatformat_ieee_double_little;
default:
internal_error (__FILE__, __LINE__,
- "default_double_format: bad byte order");
+ _("default_double_format: bad byte order"));
}
}
@@ -261,7 +261,7 @@ legacy_virtual_frame_pointer (CORE_ADDR pc,
else
/* Should this be an internal error? I guess so, it is reflecting
an architectural limitation in the current design. */
- internal_error (__FILE__, __LINE__, "No virtual frame pointer available");
+ internal_error (__FILE__, __LINE__, _("No virtual frame pointer available"));
*frame_offset = 0;
}
@@ -372,11 +372,17 @@ static void
show_endian (char *args, int from_tty)
{
if (target_byte_order_auto)
- printf_unfiltered ("The target endianness is set automatically (currently %s endian)\n",
- (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"));
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ printf_unfiltered (_("The target endianness is set automatically "
+ "(currently big endian)\n"));
+ else
+ printf_unfiltered (_("The target endianness is set automatically "
+ "(currently little endian)\n"));
else
- printf_unfiltered ("The target is assumed to be %s endian\n",
- (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"));
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ printf_unfiltered ("The target is assumed to be big endian\n");
+ else
+ printf_unfiltered ("The target is assumed to be little endian\n");
}
static void
@@ -393,7 +399,7 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
gdbarch_info_init (&info);
info.byte_order = BFD_ENDIAN_LITTLE;
if (! gdbarch_update_p (info))
- printf_unfiltered ("Little endian target not supported by GDB\n");
+ printf_unfiltered (_("Little endian target not supported by GDB\n"));
}
else if (set_endian_string == endian_big)
{
@@ -402,11 +408,11 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
gdbarch_info_init (&info);
info.byte_order = BFD_ENDIAN_BIG;
if (! gdbarch_update_p (info))
- printf_unfiltered ("Big endian target not supported by GDB\n");
+ printf_unfiltered (_("Big endian target not supported by GDB\n"));
}
else
internal_error (__FILE__, __LINE__,
- "set_endian: bad value");
+ _("set_endian: bad value"));
show_endian (NULL, from_tty);
}
@@ -436,9 +442,9 @@ show_architecture (char *args, int from_tty)
const char *arch;
arch = TARGET_ARCHITECTURE->printable_name;
if (target_architecture_auto)
- printf_filtered ("The target architecture is set automatically (currently %s)\n", arch);
+ printf_filtered (_("The target architecture is set automatically (currently %s)\n"), arch);
else
- printf_filtered ("The target architecture is assumed to be %s\n", arch);
+ printf_filtered (_("The target architecture is assumed to be %s\n"), arch);
}
@@ -459,11 +465,11 @@ set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
info.bfd_arch_info = bfd_scan_arch (set_architecture_string);
if (info.bfd_arch_info == NULL)
internal_error (__FILE__, __LINE__,
- "set_architecture: bfd_scan_arch failed");
+ _("set_architecture: bfd_scan_arch failed"));
if (gdbarch_update_p (info))
target_architecture_auto = 0;
else
- printf_unfiltered ("Architecture `%s' not recognized.\n",
+ printf_unfiltered (_("Architecture `%s' not recognized.\n"),
set_architecture_string);
}
show_architecture (NULL, from_tty);
@@ -533,7 +539,7 @@ set_gdbarch_from_file (bfd *abfd)
gdbarch = gdbarch_from_bfd (abfd);
if (gdbarch == NULL)
- error ("Architecture of file not recognized.\n");
+ error (_("Architecture of file not recognized.\n"));
deprecated_current_gdbarch_select_hack (gdbarch);
}
@@ -581,11 +587,11 @@ initialize_current_architecture (void)
}
if (chosen == NULL)
internal_error (__FILE__, __LINE__,
- "initialize_current_architecture: No arch");
+ _("initialize_current_architecture: No arch"));
info.bfd_arch_info = bfd_scan_arch (chosen);
if (info.bfd_arch_info == NULL)
internal_error (__FILE__, __LINE__,
- "initialize_current_architecture: Arch not found");
+ _("initialize_current_architecture: Arch not found"));
}
/* Take several guesses at a byte order. */
@@ -623,7 +629,8 @@ initialize_current_architecture (void)
if (! gdbarch_update_p (info))
internal_error (__FILE__, __LINE__,
- "initialize_current_architecture: Selection of initial architecture failed");
+ _("initialize_current_architecture: Selection of "
+ "initial architecture failed"));
/* Create the ``set architecture'' command appending ``auto'' to the
list of architectures. */
@@ -640,14 +647,14 @@ initialize_current_architecture (void)
safe. */
c = add_set_enum_cmd ("architecture", class_support,
arches, &set_architecture_string,
- "Set architecture of target.",
+ _("Set architecture of target."),
&setlist);
set_cmd_sfunc (c, set_architecture);
add_alias_cmd ("processor", "architecture", class_support, 1, &setlist);
/* Don't use set_from_show - need to print both auto/manual and
current setting. */
add_cmd ("architecture", class_support, show_architecture,
- "Show the current target architecture", &showlist);
+ _("Show the current target architecture"), &showlist);
}
}
@@ -724,11 +731,11 @@ _initialize_gdbarch_utils (void)
struct cmd_list_element *c;
c = add_set_enum_cmd ("endian", class_support,
endian_enum, &set_endian_string,
- "Set endianness of target.",
+ _("Set endianness of target."),
&setlist);
set_cmd_sfunc (c, set_endian);
/* Don't use set_from_show - need to print both auto/manual and
current setting. */
add_cmd ("endian", class_support, show_endian,
- "Show the current byte-order", &showlist);
+ _("Show the current byte-order"), &showlist);
}
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index fa0fda0..b5311f4 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -236,7 +236,7 @@ fetch_fpregister (int regno)
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
if (ret < 0)
{
- warning ("Unable to fetch floating point register.");
+ warning (_("Unable to fetch floating point register."));
return;
}
@@ -285,7 +285,7 @@ fetch_fpregs (void)
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
if (ret < 0)
{
- warning ("Unable to fetch the floating point registers.");
+ warning (_("Unable to fetch the floating point registers."));
return;
}
@@ -333,7 +333,7 @@ store_fpregister (int regno)
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
if (ret < 0)
{
- warning ("Unable to fetch the floating point registers.");
+ warning (_("Unable to fetch the floating point registers."));
return;
}
@@ -350,7 +350,7 @@ store_fpregister (int regno)
ret = ptrace (PTRACE_SETFPREGS, tid, 0, &fp);
if (ret < 0)
{
- warning ("Unable to store floating point register.");
+ warning (_("Unable to store floating point register."));
return;
}
}
@@ -371,7 +371,7 @@ store_fpregs (void)
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
if (ret < 0)
{
- warning ("Unable to fetch the floating point registers.");
+ warning (_("Unable to fetch the floating point registers."));
return;
}
@@ -388,7 +388,7 @@ store_fpregs (void)
ret = ptrace (PTRACE_SETFPREGS, tid, 0, &fp);
if (ret < 0)
{
- warning ("Unable to store floating point registers.");
+ warning (_("Unable to store floating point registers."));
return;
}
}
@@ -408,7 +408,7 @@ fetch_register (int regno)
ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
if (ret < 0)
{
- warning ("Unable to fetch general register.");
+ warning (_("Unable to fetch general register."));
return;
}
@@ -448,7 +448,7 @@ fetch_regs (void)
ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
if (ret < 0)
{
- warning ("Unable to fetch general registers.");
+ warning (_("Unable to fetch general registers."));
return;
}
@@ -486,7 +486,7 @@ store_register (int regno)
ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
if (ret < 0)
{
- warning ("Unable to fetch general registers.");
+ warning (_("Unable to fetch general registers."));
return;
}
@@ -496,7 +496,7 @@ store_register (int regno)
ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
if (ret < 0)
{
- warning ("Unable to store general register.");
+ warning (_("Unable to store general register."));
return;
}
}
@@ -514,7 +514,7 @@ store_regs (void)
ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
if (ret < 0)
{
- warning ("Unable to fetch general registers.");
+ warning (_("Unable to fetch general registers."));
return;
}
@@ -528,7 +528,7 @@ store_regs (void)
if (ret < 0)
{
- warning ("Unable to store general registers.");
+ warning (_("Unable to store general registers."));
return;
}
}
@@ -691,7 +691,7 @@ get_linux_version (unsigned int *vmajor,
if (-1 == uname (&info))
{
- warning ("Unable to determine GNU/Linux version.");
+ warning (_("Unable to determine GNU/Linux version."));
return -1;
}
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index e3a479ec..0da3eba 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1322,12 +1322,15 @@ arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
int type;
type = (status >> 24) & 127;
- printf ("%s FPU type %d\n",
- (status & (1 << 31)) ? "Hardware" : "Software",
- type);
- fputs ("mask: ", stdout);
+ if (status & (1 << 31))
+ printf (_("Hardware FPU type %d\n"), type);
+ else
+ printf (_("Software FPU type %d\n"), type);
+ /* i18n: [floating point unit] mask */
+ fputs (_("mask: "), stdout);
print_fpu_flags (status >> 16);
- fputs ("flags: ", stdout);
+ /* i18n: [floating point unit] flags */
+ fputs (_("flags: "), stdout);
print_fpu_flags (status);
}
@@ -1384,7 +1387,7 @@ arm_register_sim_regno (int regnum)
return SIM_ARM_FPS_REGNUM + reg;
reg -= NUM_SREGS;
- internal_error (__FILE__, __LINE__, "Bad REGNUM %d", regnum);
+ internal_error (__FILE__, __LINE__, _("Bad REGNUM %d"), regnum);
}
/* NOTE: cagney/2001-08-20: Both convert_from_extended() and
@@ -1549,7 +1552,7 @@ thumb_get_next_pc (CORE_ADDR pc)
nextpc = (CORE_ADDR) read_memory_integer (sp + offset, 4);
nextpc = ADDR_BITS_REMOVE (nextpc);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
}
else if ((inst1 & 0xf000) == 0xd000) /* conditional branch */
{
@@ -1580,7 +1583,7 @@ thumb_get_next_pc (CORE_ADDR pc)
nextpc = ADDR_BITS_REMOVE (nextpc);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
}
return nextpc;
@@ -1620,7 +1623,7 @@ arm_get_next_pc (CORE_ADDR pc)
if (bits (this_instr, 22, 25) == 0
&& bits (this_instr, 4, 7) == 9) /* multiply */
- error ("Illegal update to pc in instruction");
+ error (_("Invalid update to pc in instruction"));
/* BX <reg>, BLX <reg> */
if (bits (this_instr, 4, 28) == 0x12fff1
@@ -1631,7 +1634,7 @@ arm_get_next_pc (CORE_ADDR pc)
nextpc = (CORE_ADDR) ADDR_BITS_REMOVE (result);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
return nextpc;
}
@@ -1712,7 +1715,7 @@ arm_get_next_pc (CORE_ADDR pc)
nextpc = (CORE_ADDR) ADDR_BITS_REMOVE (result);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
break;
}
@@ -1730,7 +1733,7 @@ arm_get_next_pc (CORE_ADDR pc)
unsigned long base;
if (bit (this_instr, 22))
- error ("Illegal update to pc in instruction");
+ error (_("Invalid update to pc in instruction"));
/* byte write to PC */
rn = bits (this_instr, 16, 19);
@@ -1755,7 +1758,7 @@ arm_get_next_pc (CORE_ADDR pc)
nextpc = ADDR_BITS_REMOVE (nextpc);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
}
}
break;
@@ -1791,7 +1794,7 @@ arm_get_next_pc (CORE_ADDR pc)
}
nextpc = ADDR_BITS_REMOVE (nextpc);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
}
}
break;
@@ -1807,7 +1810,7 @@ arm_get_next_pc (CORE_ADDR pc)
nextpc = ADDR_BITS_REMOVE (nextpc);
if (nextpc == pc)
- error ("Infinite loop detected");
+ error (_("Infinite loop detected"));
break;
}
@@ -1818,7 +1821,7 @@ arm_get_next_pc (CORE_ADDR pc)
break;
default:
- fprintf_filtered (gdb_stderr, "Bad bit-field extraction\n");
+ fprintf_filtered (gdb_stderr, _("Bad bit-field extraction\n"));
return (pc);
}
}
@@ -2012,7 +2015,7 @@ arm_extract_return_value (struct type *type,
default:
internal_error
(__FILE__, __LINE__,
- "arm_extract_return_value: Floating point model not supported");
+ _("arm_extract_return_value: Floating point model not supported"));
break;
}
}
@@ -2202,7 +2205,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
default:
internal_error
(__FILE__, __LINE__,
- "arm_store_return_value: Floating point model not supported");
+ _("arm_store_return_value: Floating point model not supported"));
break;
}
}
@@ -2329,7 +2332,8 @@ arm_skip_stub (CORE_ADDR pc)
static void
set_arm_command (char *args, int from_tty)
{
- printf_unfiltered ("\"set arm\" must be followed by an apporpriate subcommand.\n");
+ printf_unfiltered (_("\
+\"set arm\" must be followed by an apporpriate subcommand.\n"));
help_list (setarmcmdlist, "set arm ", all_commands, gdb_stdout);
}
@@ -2383,7 +2387,7 @@ set_fp_model_sfunc (char *args, int from_tty,
}
if (fp_model == ARM_FLOAT_LAST)
- internal_error (__FILE__, __LINE__, "Invalid fp model accepted: %s.",
+ internal_error (__FILE__, __LINE__, _("Invalid fp model accepted: %s."),
current_fp_model);
if (gdbarch_bfd_arch_info (current_gdbarch)->arch == bfd_arch_arm)
@@ -2398,7 +2402,8 @@ show_fp_model (char *args, int from_tty,
if (arm_fp_model == ARM_FLOAT_AUTO
&& gdbarch_bfd_arch_info (current_gdbarch)->arch == bfd_arch_arm)
- printf_filtered (" - the default for the current ABI is \"%s\".\n",
+ /* i18n: "the default [floating point model] for the current ABI..." */
+ printf_filtered (_(" - the default for the current ABI is \"%s\".\n"),
fp_model_strings[tdep->fp_model]);
}
@@ -2561,8 +2566,9 @@ arm_elf_osabi_sniffer (bfd *abfd)
default:
internal_error (__FILE__, __LINE__,
- "arm_elf_osabi_sniffer: Unknown ARM EABI "
- "version 0x%x", eflags);
+ _("\
+arm_elf_osabi_sniffer: Unknown ARM EABI version 0x%x"),
+ eflags);
}
}
break;
@@ -2667,7 +2673,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
default:
internal_error (__FILE__, __LINE__,
- "arm_gdbarch_init: bad byte order for float format");
+ _("arm_gdbarch_init: bad byte order for float format"));
}
/* On ARM targets char defaults to unsigned. */
@@ -2768,7 +2774,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
default:
internal_error (__FILE__, __LINE__,
- "arm_gdbarch_init: bad byte order for float format");
+ _("arm_gdbarch_init: bad byte order for float format"));
}
return gdbarch;
@@ -2782,7 +2788,7 @@ arm_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
- fprintf_unfiltered (file, "arm_dump_tdep: Lowest pc = 0x%lx",
+ fprintf_unfiltered (file, _("arm_dump_tdep: Lowest pc = 0x%lx"),
(unsigned long) tdep->lowest_pc);
}
@@ -2820,6 +2826,8 @@ _initialize_arm_tdep (void)
const char **regnames;
int numregs, i, j;
static char *helptext;
+ char regdesc[1024], *rdptr = regdesc;
+ size_t rest = sizeof (regdesc);
gdbarch_register (bfd_arch_arm, arm_gdbarch_init, arm_dump_tdep);
@@ -2841,21 +2849,16 @@ _initialize_arm_tdep (void)
/* Add root prefix command for all "set arm"/"show arm" commands. */
add_prefix_cmd ("arm", no_class, set_arm_command,
- "Various ARM-specific commands.",
+ _("Various ARM-specific commands."),
&setarmcmdlist, "set arm ", 0, &setlist);
add_prefix_cmd ("arm", no_class, show_arm_command,
- "Various ARM-specific commands.",
+ _("Various ARM-specific commands."),
&showarmcmdlist, "show arm ", 0, &showlist);
/* Sync the opcode insn printer with our register viewer. */
parse_arm_disassembler_option ("reg-names-std");
- /* Begin creating the help text. */
- stb = mem_fileopen ();
- fprintf_unfiltered (stb, "Set the disassembly style.\n"
- "The valid values are:\n");
-
/* Initialize the array that will be passed to add_set_enum_cmd(). */
valid_disassembly_styles
= xmalloc ((num_disassembly_options + 1) * sizeof (char *));
@@ -2863,8 +2866,9 @@ _initialize_arm_tdep (void)
{
numregs = get_arm_regnames (i, &setname, &setdesc, &regnames);
valid_disassembly_styles[i] = setname;
- fprintf_unfiltered (stb, "%s - %s\n", setname,
- setdesc);
+ length = snprintf (rdptr, rest, "%s - %s\n", setname, setdesc);
+ rdptr += length;
+ rest -= length;
/* Copy the default names (if found) and synchronize disassembler. */
if (!strcmp (setname, "std"))
{
@@ -2878,64 +2882,70 @@ _initialize_arm_tdep (void)
/* Mark the end of valid options. */
valid_disassembly_styles[num_disassembly_options] = NULL;
- /* Finish the creation of the help text. */
- fprintf_unfiltered (stb, "The default is \"std\".");
+ /* Create the help text. */
+ stb = mem_fileopen ();
+ fprintf_unfiltered (stb, "%s%s%s",
+ _("The valid values are:\n"),
+ regdesc,
+ _("The default is \"std\"."));
helptext = ui_file_xstrdup (stb, &length);
ui_file_delete (stb);
/* Add the deprecated disassembly-flavor command. */
- new_set = add_set_enum_cmd ("disassembly-flavor", no_class,
- valid_disassembly_styles,
- &disassembly_style,
- helptext,
- &setlist);
- set_cmd_sfunc (new_set, set_disassembly_style_sfunc);
+ add_setshow_enum_cmd("disassembly-flavor", no_class,
+ valid_disassembly_styles,
+ &disassembly_style,
+ _("Set the disassembly style."),
+ _("Show the disassembly style."),
+ helptext,
+ _("The disassembly style is \"%s\"."),
+ set_disassembly_style_sfunc, NULL,
+ &setlist, &showlist, &new_set, &new_show);
deprecate_cmd (new_set, "set arm disassembly");
- deprecate_cmd (deprecated_add_show_from_set (new_set, &showlist),
- "show arm disassembly");
+ deprecate_cmd (new_show, "show arm disassembly");
/* And now add the new interface. */
- new_set = add_set_enum_cmd ("disassembler", no_class,
- valid_disassembly_styles, &disassembly_style,
- helptext, &setarmcmdlist);
-
- set_cmd_sfunc (new_set, set_disassembly_style_sfunc);
- deprecated_add_show_from_set (new_set, &showarmcmdlist);
-
- add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32, "\
-Set usage of ARM 32-bit mode.", "\
-Show usage of ARM 32-bit mode.", "\
-When off, a 26-bit PC will be used.\n\
-When off, a 26-bit PC will be used.", "\
-Usage of ARM 32-bit mode is %s.",
+ add_setshow_enum_cmd("disassembler", no_class,
+ valid_disassembly_styles, &disassembly_style,
+ _("Set the disassembly style."),
+ _("Show the disassembly style."),
+ helptext,
+ _("The disassembly style is \"%s\"."),
+ set_disassembly_style_sfunc, NULL,
+ &setarmcmdlist, &showarmcmdlist, NULL, NULL);
+
+ add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32,
+ _("Set usage of ARM 32-bit mode."),
+ _("Show usage of ARM 32-bit mode."),
+ _("When off, a 26-bit PC will be used."),
+ _("Usage of ARM 32-bit mode is %s."),
NULL, NULL,
&setarmcmdlist, &showarmcmdlist);
/* Add a command to allow the user to force the FPU model. */
- new_set = add_set_enum_cmd
- ("fpu", no_class, fp_model_strings, &current_fp_model,
- "Set the floating point type.\n"
- "auto - Determine the FP typefrom the OS-ABI.\n"
- "softfpa - Software FP, mixed-endian doubles on little-endian ARMs.\n"
- "fpa - FPA co-processor (GCC compiled).\n"
- "softvfp - Software FP with pure-endian doubles.\n"
- "vfp - VFP co-processor.",
- &setarmcmdlist);
- set_cmd_sfunc (new_set, set_fp_model_sfunc);
- set_cmd_sfunc (deprecated_add_show_from_set (new_set, &showarmcmdlist),
- show_fp_model);
+ add_setshow_enum_cmd ("fpu", no_class, fp_model_strings, &current_fp_model,
+ _("Set the floating point type."),
+ _("Show the floating point type."),
+ _("auto - Determine the FP typefrom the OS-ABI.\n\
+softfpa - Software FP, mixed-endian doubles on little-endian ARMs.\n\
+fpa - FPA co-processor (GCC compiled).\n\
+softvfp - Software FP with pure-endian doubles.\n\
+vfp - VFP co-processor."),
+ _("The floating point type is \"%s\"."),
+ set_fp_model_sfunc, show_fp_model,
+ &setarmcmdlist, &showarmcmdlist, NULL, NULL);
/* Add the deprecated "othernames" command. */
deprecate_cmd (add_com ("othernames", class_obscure, arm_othernames,
- "Switch to the next set of register names."),
+ _("Switch to the next set of register names.")),
"set arm disassembly");
/* Debugging flag. */
- add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug, "\
-Set ARM debugging.", "\
-Show ARM debugging.", "\
-When on, arm-specific debugging is enabled.", "\
-ARM debugging is %s.",
+ add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug,
+ _("Set ARM debugging."),
+ _("Show ARM debugging."),
+ _("When on, arm-specific debugging is enabled."),
+ _("ARM debugging is %s."),
NULL, NULL,
&setdebuglist, &showdebuglist);
}
diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c
index 2f10ec1..1e5997b 100644
--- a/gdb/armnbsd-nat.c
+++ b/gdb/armnbsd-nat.c
@@ -88,7 +88,7 @@ fetch_register (int regno)
if (ret < 0)
{
- warning ("unable to fetch general register");
+ warning (_("unable to fetch general register"));
return;
}
@@ -139,7 +139,7 @@ fetch_regs (void)
if (ret < 0)
{
- warning ("unable to fetch general registers");
+ warning (_("unable to fetch general registers"));
return;
}
@@ -157,7 +157,7 @@ fetch_fp_register (int regno)
if (ret < 0)
{
- warning ("unable to fetch floating-point register");
+ warning (_("unable to fetch floating-point register"));
return;
}
@@ -187,7 +187,7 @@ fetch_fp_regs (void)
if (ret < 0)
{
- warning ("unable to fetch general registers");
+ warning (_("unable to fetch general registers"));
return;
}
@@ -223,7 +223,7 @@ store_register (int regno)
if (ret < 0)
{
- warning ("unable to fetch general registers");
+ warning (_("unable to fetch general registers"));
return;
}
@@ -284,7 +284,7 @@ store_register (int regno)
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
- warning ("unable to write register %d to inferior", regno);
+ warning (_("unable to write register %d to inferior"), regno);
}
static void
@@ -331,7 +331,7 @@ store_regs (void)
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
- warning ("unable to store general registers");
+ warning (_("unable to store general registers"));
}
static void
@@ -345,7 +345,7 @@ store_fp_register (int regno)
if (ret < 0)
{
- warning ("unable to fetch floating-point registers");
+ warning (_("unable to fetch floating-point registers"));
return;
}
@@ -366,7 +366,7 @@ store_fp_register (int regno)
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
- warning ("unable to write register %d to inferior", regno);
+ warning (_("unable to write register %d to inferior"), regno);
}
static void
@@ -388,7 +388,7 @@ store_fp_regs (void)
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
- warning ("unable to store floating-point registers");
+ warning (_("unable to store floating-point registers"));
}
void
@@ -437,7 +437,7 @@ fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size,
{
case 0: /* Integer registers. */
if (core_reg_size != sizeof (struct reg))
- warning ("wrong size of register set in core file");
+ warning (_("wrong size of register set in core file"));
else
{
/* The memcpy may be unnecessary, but we can't really be sure
@@ -449,7 +449,7 @@ fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size,
case 2:
if (core_reg_size != sizeof (struct fpreg))
- warning ("wrong size of FPA register set in core file");
+ warning (_("wrong size of FPA register set in core file"));
else
{
/* The memcpy may be unnecessary, but we can't really be sure
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index 99fb25d..d5ac9e8 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -64,7 +64,7 @@ arm_netbsd_init_abi_common (struct gdbarch_info info,
default:
internal_error (__FILE__, __LINE__,
- "arm_gdbarch_init: bad byte order for float format");
+ _("arm_gdbarch_init: bad byte order for float format"));
}
tdep->jb_pc = ARM_NBSD_JB_PC;
diff --git a/gdb/auxv.c b/gdb/auxv.c
index a2516b6..d09fc38 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -202,50 +202,50 @@ fprint_target_auxv (struct ui_file *file, struct target_ops *ops)
{
#define TAG(tag, text, kind) \
case tag: name = #tag; description = text; flavor = kind; break
- TAG (AT_NULL, "End of vector", hex);
- TAG (AT_IGNORE, "Entry should be ignored", hex);
- TAG (AT_EXECFD, "File descriptor of program", dec);
- TAG (AT_PHDR, "Program headers for program", hex);
- TAG (AT_PHENT, "Size of program header entry", dec);
- TAG (AT_PHNUM, "Number of program headers", dec);
- TAG (AT_PAGESZ, "System page size", dec);
- TAG (AT_BASE, "Base address of interpreter", hex);
- TAG (AT_FLAGS, "Flags", hex);
- TAG (AT_ENTRY, "Entry point of program", hex);
- TAG (AT_NOTELF, "Program is not ELF", dec);
- TAG (AT_UID, "Real user ID", dec);
- TAG (AT_EUID, "Effective user ID", dec);
- TAG (AT_GID, "Real group ID", dec);
- TAG (AT_EGID, "Effective group ID", dec);
- TAG (AT_CLKTCK, "Frequency of times()", dec);
- TAG (AT_PLATFORM, "String identifying platform", str);
- TAG (AT_HWCAP, "Machine-dependent CPU capability hints", hex);
- TAG (AT_FPUCW, "Used FPU control word", dec);
- TAG (AT_DCACHEBSIZE, "Data cache block size", dec);
- TAG (AT_ICACHEBSIZE, "Instruction cache block size", dec);
- TAG (AT_UCACHEBSIZE, "Unified cache block size", dec);
- TAG (AT_IGNOREPPC, "Entry should be ignored", dec);
- TAG (AT_SYSINFO, "Special system info/entry points", hex);
- TAG (AT_SYSINFO_EHDR, "System-supplied DSO's ELF header", hex);
- TAG (AT_SECURE, "Boolean, was exec setuid-like?", dec);
- TAG (AT_SUN_UID, "Effective user ID", dec);
- TAG (AT_SUN_RUID, "Real user ID", dec);
- TAG (AT_SUN_GID, "Effective group ID", dec);
- TAG (AT_SUN_RGID, "Real group ID", dec);
- TAG (AT_SUN_LDELF, "Dynamic linker's ELF header", hex);
- TAG (AT_SUN_LDSHDR, "Dynamic linker's section headers", hex);
- TAG (AT_SUN_LDNAME, "String giving name of dynamic linker", str);
- TAG (AT_SUN_LPAGESZ, "Large pagesize", dec);
- TAG (AT_SUN_PLATFORM, "Platform name string", str);
- TAG (AT_SUN_HWCAP, "Machine-dependent CPU capability hints", hex);
- TAG (AT_SUN_IFLUSH, "Should flush icache?", dec);
- TAG (AT_SUN_CPU, "CPU name string", str);
- TAG (AT_SUN_EMUL_ENTRY, "COFF entry point address", hex);
- TAG (AT_SUN_EMUL_EXECFD, "COFF executable file descriptor", dec);
+ TAG (AT_NULL, _("End of vector"), hex);
+ TAG (AT_IGNORE, _("Entry should be ignored"), hex);
+ TAG (AT_EXECFD, _("File descriptor of program"), dec);
+ TAG (AT_PHDR, _("Program headers for program"), hex);
+ TAG (AT_PHENT, _("Size of program header entry"), dec);
+ TAG (AT_PHNUM, _("Number of program headers"), dec);
+ TAG (AT_PAGESZ, _("System page size"), dec);
+ TAG (AT_BASE, _("Base address of interpreter"), hex);
+ TAG (AT_FLAGS, _("Flags"), hex);
+ TAG (AT_ENTRY, _("Entry point of program"), hex);
+ TAG (AT_NOTELF, _("Program is not ELF"), dec);
+ TAG (AT_UID, _("Real user ID"), dec);
+ TAG (AT_EUID, _("Effective user ID"), dec);
+ TAG (AT_GID, _("Real group ID"), dec);
+ TAG (AT_EGID, _("Effective group ID"), dec);
+ TAG (AT_CLKTCK, _("Frequency of times()"), dec);
+ TAG (AT_PLATFORM, _("String identifying platform"), str);
+ TAG (AT_HWCAP, _("Machine-dependent CPU capability hints"), hex);
+ TAG (AT_FPUCW, _("Used FPU control word"), dec);
+ TAG (AT_DCACHEBSIZE, _("Data cache block size"), dec);
+ TAG (AT_ICACHEBSIZE, _("Instruction cache block size"), dec);
+ TAG (AT_UCACHEBSIZE, _("Unified cache block size"), dec);
+ TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
+ TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
+ TAG (AT_SYSINFO_EHDR, _("System-supplied DSO's ELF header"), hex);
+ TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
+ TAG (AT_SUN_UID, _("Effective user ID"), dec);
+ TAG (AT_SUN_RUID, _("Real user ID"), dec);
+ TAG (AT_SUN_GID, _("Effective group ID"), dec);
+ TAG (AT_SUN_RGID, _("Real group ID"), dec);
+ TAG (AT_SUN_LDELF, _("Dynamic linker's ELF header"), hex);
+ TAG (AT_SUN_LDSHDR, _("Dynamic linker's section headers"), hex);
+ TAG (AT_SUN_LDNAME, _("String giving name of dynamic linker"), str);
+ TAG (AT_SUN_LPAGESZ, _("Large pagesize"), dec);
+ TAG (AT_SUN_PLATFORM, _("Platform name string"), str);
+ TAG (AT_SUN_HWCAP, _("Machine-dependent CPU capability hints"), hex);
+ TAG (AT_SUN_IFLUSH, _("Should flush icache?"), dec);
+ TAG (AT_SUN_CPU, _("CPU name string"), str);
+ TAG (AT_SUN_EMUL_ENTRY, _("COFF entry point address"), hex);
+ TAG (AT_SUN_EMUL_EXECFD, _("COFF executable file descriptor"), dec);
TAG (AT_SUN_EXECNAME,
- "Canonicalized file name given to execve", str);
- TAG (AT_SUN_MMU, "String for name of MMU module", str);
- TAG (AT_SUN_LDDATA, "Dynamic linker's data segment address", hex);
+ _("Canonicalized file name given to execve"), str);
+ TAG (AT_SUN_MMU, _("String for name of MMU module"), str);
+ TAG (AT_SUN_LDDATA, _("Dynamic linker's data segment address"), hex);
}
fprintf_filtered (file, "%-4s %-20s %-30s ",
@@ -277,14 +277,14 @@ static void
info_auxv_command (char *cmd, int from_tty)
{
if (! target_has_stack)
- error ("The program has no auxiliary information now.");
+ error (_("The program has no auxiliary information now."));
else
{
int ents = fprint_target_auxv (gdb_stdout, &current_target);
if (ents < 0)
- error ("No auxiliary vector found, or failed reading it.");
+ error (_("No auxiliary vector found, or failed reading it."));
else if (ents == 0)
- error ("Auxiliary vector is empty.");
+ error (_("Auxiliary vector is empty."));
}
}
@@ -295,6 +295,6 @@ void
_initialize_auxv (void)
{
add_info ("auxv", info_auxv_command,
- "Display the inferior's auxiliary vector.\n\
-This is information provided by the operating system at program startup.");
+ _("Display the inferior's auxiliary vector.\n\
+This is information provided by the operating system at program startup."));
}
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index cda7002..a89585c 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -588,7 +588,7 @@ avr_scan_prologue (CORE_ADDR pc, struct avr_unwind_cache *info)
if (num_pushes > AVR_MAX_PUSHES)
{
- fprintf_unfiltered (gdb_stderr, "Num pushes too large: %d\n",
+ fprintf_unfiltered (gdb_stderr, _("Num pushes too large: %d\n"),
num_pushes);
num_pushes = 0;
}
@@ -667,7 +667,7 @@ avr_scan_prologue (CORE_ADDR pc, struct avr_unwind_cache *info)
if (vpc >= AVR_MAX_PROLOGUE_SIZE)
fprintf_unfiltered (gdb_stderr,
- "Hit end of prologue while scanning pushes\n");
+ _("Hit end of prologue while scanning pushes\n"));
/* Second stage of the prologue scanning.
Scan:
@@ -1337,8 +1337,8 @@ avr_io_reg_read_command (char *args, int from_tty)
if (bufsiz < 0)
{
fprintf_unfiltered (gdb_stderr,
- "ERR: info io_registers NOT supported by current "
- "target\n");
+ _("ERR: info io_registers NOT supported "
+ "by current target\n"));
return;
}
if (bufsiz > sizeof (buf))
@@ -1352,20 +1352,20 @@ avr_io_reg_read_command (char *args, int from_tty)
if (strncmp (buf, "", bufsiz) == 0)
{
fprintf_unfiltered (gdb_stderr,
- "info io_registers NOT supported by target\n");
+ _("info io_registers NOT supported by target\n"));
return;
}
if (sscanf (buf, "%x", &nreg) != 1)
{
fprintf_unfiltered (gdb_stderr,
- "Error fetching number of io registers\n");
+ _("Error fetching number of io registers\n"));
return;
}
reinitialize_more_filter ();
- printf_unfiltered ("Target has %u io registers:\n\n", nreg);
+ printf_unfiltered (_("Target has %u io registers:\n\n"), nreg);
/* only fetch up to 8 registers at a time to keep the buffer small */
step = 8;
@@ -1412,5 +1412,5 @@ _initialize_avr_tdep (void)
io_registers' to signify it is not available on other platforms. */
add_cmd ("io_registers", class_info, avr_io_reg_read_command,
- "query remote avr target for io space register values", &infolist);
+ _("query remote avr target for io space register values"), &infolist);
}
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 4c6c89c..df70019 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -419,15 +419,19 @@ add_setshow_enum_cmd (char *name,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
- struct cmd_list_element **show_list)
+ struct cmd_list_element **show_list,
+ struct cmd_list_element **set_result,
+ struct cmd_list_element **show_result)
{
struct cmd_list_element *c;
add_setshow_cmd_full (name, class, var_enum, var,
set_doc, show_doc, help_doc, print,
set_func, show_func,
set_list, show_list,
- &c, NULL);
+ &c, show_result);
c->enums = enumlist;
+ if (set_result)
+ *set_result = c;
}
/* Add an auto-boolean command named NAME to both the set and show
@@ -1295,7 +1299,7 @@ deprecated_cmd_warning (char **text)
struct cmd_list_element *cmd = NULL;
struct cmd_list_element *c;
char *type;
-
+
if (!lookup_cmd_composition (*text, &alias, &prefix_cmd, &cmd))
/* return if text doesn't evaluate to a command */
return;
diff --git a/gdb/command.h b/gdb/command.h
index 5b7a542..899d0d6 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -234,7 +234,9 @@ extern void add_setshow_enum_cmd (char *name,
cmd_sfunc_ftype *set_func,
cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_list,
- struct cmd_list_element **show_list);
+ struct cmd_list_element **show_list,
+ struct cmd_list_element **set_result,
+ struct cmd_list_element **show_result);
extern void add_setshow_auto_boolean_cmd (char *name,
enum command_class class,
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 1fc8386..8d9d855 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5188,7 +5188,8 @@ This option can be set to one of:\n\
saved GP register size from information contained in the executable.\n\
(default: auto)", "\
Size of general purpose registers saved on the stack is %s.\n",
- NULL, NULL, &setmipscmdlist, &showmipscmdlist);
+ NULL, NULL, &setmipscmdlist, &showmipscmdlist,
+ NULL, NULL);
/* Allow the user to override the argument stack size. */
add_setshow_enum_cmd ("stack-arg-size", class_obscure,
@@ -5201,7 +5202,8 @@ This option can be set to one of:\n\
auto - Allow GDB to determine the correct setting from the current\n\
target and executable (default)", "\
The amount of stack space reserved for each argument is %s.\n",
- NULL, NULL, &setmipscmdlist, &showmipscmdlist);
+ NULL, NULL, &setmipscmdlist, &showmipscmdlist,
+ NULL, NULL);
/* Allow the user to override the ABI. */
c = add_set_enum_cmd