diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-11 04:06:14 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-11 04:06:14 +0000 |
commit | 8a3fe4f86c51d363e10efed1046ebcbdc853ae99 (patch) | |
tree | c25f4ff248aa4e2a7a1b23aa0c61a875a5791af1 /gdb | |
parent | ebdda33727b00fe468518fb23df0a9914b9ad8a6 (diff) | |
download | gdb-8a3fe4f86c51d363e10efed1046ebcbdc853ae99.zip gdb-8a3fe4f86c51d363e10efed1046ebcbdc853ae99.tar.gz gdb-8a3fe4f86c51d363e10efed1046ebcbdc853ae99.tar.bz2 |
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
Diffstat (limited to 'gdb')
185 files changed, 1919 insertions, 1910 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4b2bd42..ad02de1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,57 @@ +2005-02-10 Andrew Cagney <cagney@gnu.org> + + Mark up all error and warning messages. + * ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update. + * bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update. + * core-aout.c, core-regset.c, corefile.c, corelow.c: Update. + * cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update. + * dbxread.c, demangle.c, doublest.c, dsrec.c: Update. + * dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update. + * dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update. + * event-top.c, exec.c, expprint.c, f-lang.c: Update. + * f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update. + * frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update. + * gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update. + * hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update. + * hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update. + * hpread.c, hpux-thread.c, i386-linux-nat.c: Update. + * i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update. + * i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update. + * ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update. + * infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update. + * inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update. + * kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update. + * linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update. + * m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update. + * m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update. + * maint.c, mdebugread.c, mem-break.c, memattr.c: Update. + * mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update. + * nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update. + * observer.c, ocd.c, p-lang.c, p-typeprint.c: Update. + * p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update. + * ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update. + * remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update. + * remote-rdp.c, remote-sim.c, remote-st.c: Update. + * remote-utils.c, remote-utils.h, remote.c: Update. + * rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update. + * ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update. + * sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update. + * solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update. + * solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update. + * somread.c, somsolib.c, source.c, stabsread.c: Update. + * stack.c, std-regs.c, symfile-mem.c, symfile.c: Update. + * symmisc.c, symtab.c, target.c, thread.c, top.c: Update. + * tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update. + * uw-thread.c, valarith.c, valops.c, valprint.c: Update. + * value.c, varobj.c, version.in, win32-nat.c, wince.c: Update. + * xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update. + * cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update. + * cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update. + * mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update. + * mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update. + * mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update. + * tui/tui-win.c: Update. + 2005-02-10 Ian Lance Taylor <ian@airs.com> * MAINTAINERS: Update my e-mail address. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index b2fb2a6..f49470c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -8089,7 +8089,7 @@ get_var_value (char *name, char *err_msg) if (err_msg == NULL) return 0; else - error ("%s", err_msg); + error (("%s"), err_msg); } return value_of_variable (syms[0].sym, syms[0].block); diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 4eae88b..01584cc 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."), reg); return regnum; } diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 6303e3f..8e442c3 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -539,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.")); deprecated_current_gdbarch_select_hack (gdbarch); } diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 1fdc212..f9c1d1e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -305,7 +305,7 @@ int deprecated_exception_support_initialized = 0; #ifndef SOLIB_CREATE_CATCH_LOAD_HOOK #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) \ - error ("catch of library loads not yet implemented on this platform") + error (_("catch of library loads not yet implemented on this platform")) #endif /* This function is called by the "catch unload" command. It allows @@ -315,7 +315,7 @@ int deprecated_exception_support_initialized = 0; #ifndef SOLIB_CREATE_CATCH_UNLOAD_HOOK #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) \ - error ("catch of library unloads not yet implemented on this platform") + error (_("catch of library unloads not yet implemented on this platform")) #endif /* Return whether a breakpoint is an active enabled breakpoint. */ @@ -480,7 +480,7 @@ get_number_or_range (char **pp) end_value = get_number (temp); if (end_value < last_retval) { - error ("inverted range"); + error (_("inverted range")); } else if (end_value == last_retval) { @@ -494,7 +494,7 @@ get_number_or_range (char **pp) } } else if (! in_range) - error ("negative value"); + error (_("negative value")); else { /* pp points to the '-' that betokens a range. All @@ -530,7 +530,7 @@ condition_command (char *arg, int from_tty) p = arg; bnum = get_number (&p); if (bnum == 0) - error ("Bad breakpoint argument: '%s'", arg); + error (_("Bad breakpoint argument: '%s'"), arg); ALL_BREAKPOINTS (b) if (b->number == bnum) @@ -560,7 +560,7 @@ condition_command (char *arg, int from_tty) { b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), 0); if (*arg) - error ("Junk at end of expression"); + error (_("Junk at end of expression")); } } breakpoints_changed (); @@ -568,7 +568,7 @@ condition_command (char *arg, int from_tty) return; } - error ("No breakpoint number %d.", bnum); + error (_("No breakpoint number %d."), bnum); } static void @@ -584,13 +584,13 @@ commands_command (char *arg, int from_tty) being read from. */ if (executing_breakpoint_commands) - error ("Can't use the \"commands\" command among a breakpoint's commands."); + error (_("Can't use the \"commands\" command among a breakpoint's commands.")); p = arg; bnum = get_number (&p); if (p && *p) - error ("Unexpected extra arguments following breakpoint number."); + error (_("Unexpected extra arguments following breakpoint number.")); ALL_BREAKPOINTS (b) if (b->number == bnum) @@ -606,7 +606,7 @@ commands_command (char *arg, int from_tty) breakpoint_modify_event (b->number); return; } - error ("No breakpoint number %d.", bnum); + error (_("No breakpoint number %d."), bnum); } /* Like target_read_memory() but if breakpoints are inserted, return @@ -632,7 +632,7 @@ deprecated_read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len) ALL_BP_LOCATIONS (b) { if (b->owner->type == bp_none) - warning ("reading through apparently deleted breakpoint #%d?", + warning (_("reading through apparently deleted breakpoint #%d?"), b->owner->number); if (b->loc_type != bp_loc_software_breakpoint) @@ -798,7 +798,7 @@ insert_bp_location (struct bp_location *bpt, so we must try to set a breakpoint at the LMA. This will not work for a hardware breakpoint. */ if (bpt->loc_type == bp_loc_hardware_breakpoint) - warning ("hardware breakpoint %d not supported in overlay!\n", + warning (_("hardware breakpoint %d not supported in overlay!"), bpt->owner->number); else { @@ -1365,7 +1365,7 @@ detach_breakpoints (int pid) struct cleanup *old_chain = save_inferior_ptid (); if (pid == PIDGET (inferior_ptid)) - error ("Cannot detach breakpoints of inferior_ptid"); + error (_("Cannot detach breakpoints of inferior_ptid")); /* Set inferior_ptid; remove_breakpoint uses this global. */ inferior_ptid = pid_to_ptid (pid); @@ -1395,7 +1395,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is) return 0; if (b->owner->type == bp_none) - warning ("attempted to remove apparently deleted breakpoint #%d?", + warning (_("attempted to remove apparently deleted breakpoint #%d?"), b->owner->number); if (b->loc_type == bp_loc_software_breakpoint @@ -1503,7 +1503,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is) } /* Failure to remove any of the hardware watchpoints comes here. */ if ((is == mark_uninserted) && (b->inserted)) - warning ("Could not remove hardware watchpoint %d.", + warning (_("Could not remove hardware watchpoint %d."), b->owner->number); } else if ((b->owner->type == bp_catch_fork || @@ -1525,7 +1525,7 @@ remove_breakpoint (struct bp_location *b, insertion_state_t is) val = target_remove_exec_catchpoint (PIDGET (inferior_ptid)); break; default: - warning ("Internal error, %s line %d.", __FILE__, __LINE__); + warning (_("Internal error, %s line %d."), __FILE__, __LINE__); break; } if (val) @@ -1643,8 +1643,8 @@ breakpoint_init_inferior (enum inf_context context) /* Don't issue the warning unless it's really needed... */ if (warning_needed && (context != inf_exited)) { - warning ("Exception catchpoints from last run were deleted."); - warning ("You must reinsert them explicitly."); + warning (_("Exception catchpoints from last run were deleted.\n" + "You must reinsert them explicitly.")); warning_needed = 0; } } @@ -1906,8 +1906,7 @@ bpstat_find_step_resume_breakpoint (bpstat bsp) { int current_thread; - if (bsp == NULL) - error ("Internal error (bpstat_find_step_resume_breakpoint)"); + gdb_assert (bsp != NULL); current_thread = pid_to_thread_id (inferior_ptid); @@ -1920,7 +1919,7 @@ bpstat_find_step_resume_breakpoint (bpstat bsp) return bsp->breakpoint_at; } - error ("Internal error (no step_resume breakpoint found)"); + internal_error (__FILE__, __LINE__, _("No step_resume breakpoint found.")); } @@ -3909,10 +3908,10 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr, strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8)); strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8)); if (have_bnum) - warning ("Breakpoint %d address previously adjusted from %s to %s.", + warning (_("Breakpoint %d address previously adjusted from %s to %s."), bnum, astr1, astr2); else - warning ("Breakpoint address adjusted from %s to %s.", astr1, astr2); + warning (_("Breakpoint address adjusted from %s to %s."), astr1, astr2); } /* Adjust a breakpoint's address to account for architectural constraints @@ -4361,10 +4360,10 @@ disable_breakpoints_in_shlibs (int silent) if (!disabled_shlib_breaks) { target_terminal_ours_for_output (); - warning ("Temporarily disabling shared library breakpoints:"); + warning (_("Temporarily disabling shared library breakpoints:")); } disabled_shlib_breaks = 1; - warning ("breakpoint #%d ", b->number); + warning (_("breakpoint #%d "), b->number); } } #endif @@ -4401,7 +4400,7 @@ disable_breakpoints_in_unloaded_shlib (struct so_list *solib) if (!disabled_shlib_breaks) { target_terminal_ours_for_output (); - warning ("Temporarily disabling breakpoints for unloaded shared library \"%s\"", + warning (_("Temporarily disabling breakpoints for unloaded shared library \"%s\""), so_name); } disabled_shlib_breaks = 1; @@ -4459,15 +4458,15 @@ solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname, if (sals.nelts == 0) { - warning ("Unable to set a breakpoint on dynamic linker callback."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("Unable to set a breakpoint on dynamic linker callback.\n" + "Suggest linking with /opt/langtools/lib/end.o.\n" + "GDB will be unable to track shl_load/shl_unload calls.")); return; } if (sals.nelts != 1) { - warning ("Unable to set unique breakpoint on dynamic linker callback."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("Unable to set unique breakpoint on dynamic linker callback.\n" + "GDB will be unable to track shl_load/shl_unload calls.")); return; } @@ -4900,9 +4899,9 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string, TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint, i + sals.nelts, 0); if (target_resources_ok == 0) - error ("No hardware breakpoint support in the target."); + error (_("No hardware breakpoint support in the target.")); else if (target_resources_ok < 0) - error ("Hardware breakpoints used exceeds limit."); + error (_("Hardware breakpoints used exceeds limit.")); } /* Now set all the breakpoints. */ @@ -4944,7 +4943,7 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string, b->cond_string = savestring (arg, strlen (arg)); b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), 0); if (*arg) - error ("Junk at end of pending breakpoint condition expression"); + error (_("Junk at end of pending breakpoint condition expression")); } /* If there are commands associated with the breakpoint, they should be copied too. */ @@ -4992,7 +4991,7 @@ parse_breakpoint_sals (char **address, sals->nelts = 1; } else - error ("No default breakpoint address now."); + error (_("No default breakpoint address now.")); } else { @@ -5061,9 +5060,9 @@ breakpoint_sals_to_pc (struct symtabs_and_lines *sals, if (DEPRECATED_PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc)) { if (address == NULL) - error ("Cannot break without a running program."); + error (_("Cannot break without a running program.")); else - error ("Cannot break on %s without a running program.", + error (_("Cannot break on %s without a running program."), address); } #endif @@ -5256,12 +5255,12 @@ break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_b tmptok = tok; thread = strtol (tok, &tok, 0); if (tok == tmptok) - error ("Junk after thread keyword."); + error (_("Junk after thread keyword.")); if (!valid_thread_id (thread)) - error ("Unknown thread %d\n", thread); + error (_("Unknown thread %d."), thread); } else - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); } } create_breakpoints (sals, addr_string, cond, cond_string, @@ -5298,10 +5297,8 @@ break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_b } if (sals.nelts > 1) - { - warning ("Multiple breakpoints were set."); - warning ("Use the \"delete\" command to delete unwanted breakpoints."); - } + warning (_("Multiple breakpoints were set.\n" + "Use the \"delete\" command to delete unwanted breakpoints.")); /* That's it. Discard the cleanups for data inserted into the breakpoint. */ discard_cleanups (breakpoint_chain); @@ -5386,7 +5383,7 @@ do_captured_breakpoint (struct ui_out *uiout, void *data) address. That way cleanups can take care of freeing any memory. */ if (*address_end != '\0') - error ("Garbage %s following breakpoint address", address_end); + error (_("Garbage %s following breakpoint address"), address_end); /* Resolve all line numbers to PC's. */ breakpoint_sals_to_pc (&sals, args->address); @@ -5400,7 +5397,7 @@ do_captured_breakpoint (struct ui_out *uiout, void *data) char *tok = args->condition; cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0); if (*tok != '\0') - error ("Garbage %s follows condition", tok); + error (_("Garbage %s follows condition"), tok); make_cleanup (xfree, cond[i]); cond_string[i] = xstrdup (args->condition); } @@ -5448,7 +5445,7 @@ resolve_sal_pc (struct symtab_and_line *sal) if (sal->pc == 0 && sal->symtab != NULL) { if (!find_line_pc (sal->symtab, sal->line, &pc)) - error ("No line %d in file \"%s\".", + error (_("No line %d in file \"%s\"."), sal->line, sal->symtab->filename); sal->pc = pc; } @@ -5638,7 +5635,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty) cond_end = tok; } if (*tok) - error ("Junk at end of command."); + error (_("Junk at end of command.")); if (accessflag == hw_read) bp_type = bp_read_watchpoint; @@ -5649,7 +5646,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty) mem_cnt = can_use_hardware_watchpoint (val); if (mem_cnt == 0 && bp_type != bp_hardware_watchpoint) - error ("Expression cannot be implemented with read/access watchpoint."); + error (_("Expression cannot be implemented with read/access watchpoint.")); if (mem_cnt != 0) { i = hw_watchpoint_used_count (bp_type, &other_type_used); @@ -5657,10 +5654,10 @@ watch_command_1 (char *arg, int accessflag, int from_tty) TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_type, i + mem_cnt, other_type_used); if (target_resources_ok == 0 && bp_type != bp_hardware_watchpoint) - error ("Target does not support this type of hardware watchpoint."); + error (_("Target does not support this type of hardware watchpoint.")); if (target_resources_ok < 0 && bp_type != bp_hardware_watchpoint) - error ("Target can only support one kind of HW watchpoint at a time."); + error (_("Target can only support one kind of HW watchpoint at a time.")); } #if defined(HPUXHPPA) @@ -5680,7 +5677,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty) set watches after getting the program started. */ if (!target_has_execution) { - warning ("can't do that without a running program; try \"break main\", \"run\" first"); + warning (_("can't do that without a running program; try \"break main\"), \"run\" first"); return; } #endif /* HPUXHPPA */ @@ -5910,13 +5907,13 @@ until_break_command (char *arg, int from_tty, int anywhere) 0, (char ***) NULL, NULL); if (sals.nelts != 1) - error ("Couldn't get information on specified line."); + error (_("Couldn't get information on specified line.")); sal = sals.sals[0]; xfree (sals.sals); /* malloc'd, so freed */ if (*arg) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); resolve_sal_pc (&sal); @@ -6108,7 +6105,7 @@ catch_fork_command_1 (catch_fork_kind fork_kind, char *arg, int tempflag, cond_string = ep_parse_optional_if_clause (&arg); if ((*arg != '\0') && !isspace (*arg)) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); /* If this target supports it, create a fork or vfork catchpoint and enable reporting of such events. */ @@ -6121,7 +6118,7 @@ catch_fork_command_1 (catch_fork_kind fork_kind, char *arg, int tempflag, create_vfork_event_catchpoint (tempflag, cond_string); break; default: - error ("unsupported or unknown fork kind; cannot catch it"); + error (_("unsupported or unknown fork kind; cannot catch it")); break; } } @@ -6141,7 +6138,7 @@ catch_exec_command_1 (char *arg, int tempflag, int from_tty) cond_string = ep_parse_optional_if_clause (&arg); if ((*arg != '\0') && !isspace (*arg)) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); /* If this target supports it, create an exec catchpoint and enable reporting of such events. */ @@ -6181,7 +6178,7 @@ catch_load_command_1 (char *arg, int tempflag, int from_tty) } if ((*arg != '\0') && !isspace (*arg)) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); /* Create a load breakpoint that only triggers when a load of the specified dll (or any dll, if no pathname was specified) @@ -6223,7 +6220,7 @@ catch_unload_command_1 (char *arg, int tempflag, int from_tty) } if ((*arg != '\0') && !isspace (*arg)) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); /* Create an unload breakpoint that only triggers when an unload of the specified dll (or any dll, if no pathname was specified) @@ -6258,7 +6255,7 @@ create_exception_catchpoint (int tempflag, char *cond_string, bptype = bp_catch_catch; break; default: /* error condition */ - error ("Internal error -- invalid catchpoint kind"); + error (_("Internal error -- invalid catchpoint kind")); } b = set_raw_breakpoint (*sal, bptype); @@ -6372,11 +6369,11 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg, cond_string = ep_parse_optional_if_clause (&arg); if ((*arg != '\0') && !isspace (*arg)) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); if ((ex_event != EX_EVENT_THROW) && (ex_event != EX_EVENT_CATCH)) - error ("Unsupported or unknown exception event; cannot catch it"); + error (_("Unsupported or unknown exception event; cannot catch it")); if (handle_gnu_v3_exceptions (tempflag, cond_string, ex_event, from_tty)) return; @@ -6394,7 +6391,7 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg, return; /* something went wrong with setting up callbacks */ } - warning ("Unsupported with this platform/compiler combination."); + warning (_("Unsupported with this platform/compiler combination.")); } /* Cover routine to allow wrapping target_enable_exception_catchpoints @@ -6434,18 +6431,18 @@ catch_command_1 (char *arg, int tempflag, int from_tty) /* catch_throw_command_1 (arg1_start, tempflag, from_tty); */ /* return; */ /* Now, this is not allowed */ - error ("Catch requires an event name."); + error (_("Catch requires an event name.")); } arg1_end = ep_find_event_name_end (arg1_start); if (arg1_end == NULL) - error ("catch requires an event"); + error (_("catch requires an event")); arg1_length = arg1_end + 1 - arg1_start; /* Try to match what we found against known event names. */ if (strncmp (arg1_start, "signal", arg1_length) == 0) { - error ("Catch of signal not yet implemented"); + error (_("Catch of signal not yet implemented")); } else if (strncmp (arg1_start, "catch", arg1_length) == 0) { @@ -6459,23 +6456,23 @@ catch_command_1 (char *arg, int tempflag, int from_tty) } else if (strncmp (arg1_start, "thread_start", arg1_length) == 0) { - error ("Catch of thread_start not yet implemented"); + error (_("Catch of thread_start not yet implemented")); } else if (strncmp (arg1_start, "thread_exit", arg1_length) == 0) { - error ("Catch of thread_exit not yet implemented"); + error (_("Catch of thread_exit not yet implemented")); } else if (strncmp (arg1_start, "thread_join", arg1_length) == 0) { - error ("Catch of thread_join not yet implemented"); + error (_("Catch of thread_join not yet implemented")); } else if (strncmp (arg1_start, "start", arg1_length) == 0) { - error ("Catch of start not yet implemented"); + error (_("Catch of start not yet implemented")); } else if (strncmp (arg1_start, "exit", arg1_length) == 0) { - error ("Catch of exit not yet implemented"); + error (_("Catch of exit not yet implemented")); } else if (strncmp (arg1_start, "fork", arg1_length) == 0) { @@ -6499,7 +6496,7 @@ catch_command_1 (char *arg, int tempflag, int from_tty) } else if (strncmp (arg1_start, "stop", arg1_length) == 0) { - error ("Catch of stop not yet implemented"); + error (_("Catch of stop not yet implemented")); } /* This doesn't appear to be an event name */ @@ -6510,7 +6507,7 @@ catch_command_1 (char *arg, int tempflag, int from_tty) as the name of an exception */ /* catch_throw_command_1 (arg1_start, tempflag, from_tty); */ /* Now this is not allowed */ - error ("Unknown event kind specified for catch"); + error (_("Unknown event kind specified for catch")); } } @@ -6568,7 +6565,7 @@ clear_command (char *arg, int from_tty) sal.symtab = default_breakpoint_symtab; sal.pc = default_breakpoint_address; if (sal.symtab == 0) - error ("No source file specified."); + error (_("No source file specified.")); sals.sals[0] = sal; sals.nelts = 1; @@ -6646,9 +6643,9 @@ clear_command (char *arg, int from_tty) if (found == 0) { if (arg) - error ("No breakpoint at %s.", arg); + error (_("No breakpoint at %s."), arg); else - error ("No breakpoint at this line."); + error (_("No breakpoint at this line.")); } if (found->next) @@ -6699,9 +6696,7 @@ delete_breakpoint (struct breakpoint *bpt) bpstat bs; struct bp_location *loc; - if (bpt == NULL) - error ("Internal error (attempted to delete a NULL breakpoint)"); - + gdb_assert (bpt != NULL); /* Has this bp already been deleted? This can happen because multiple lists can hold pointers to bp's. bpstat lists are especial culprits. @@ -6959,7 +6954,7 @@ breakpoint_re_set_one (void *bint) switch (b->type) { case bp_none: - warning ("attempted to reset apparently deleted breakpoint #%d?", + warning (_("attempted to reset apparently deleted breakpoint #%d?"), b->number); return 0; case bp_breakpoint: @@ -7262,7 +7257,7 @@ set_ignore_count (int bptnum, int count, int from_tty) return; } - error ("No breakpoint number %d.", bptnum); + error (_("No breakpoint number %d."), bptnum); } /* Clear the ignore counts of all breakpoints. */ @@ -7288,9 +7283,9 @@ ignore_command (char *args, int from_tty) num = get_number (&p); if (num == 0) - error ("bad breakpoint number: '%s'", args); + error (_("bad breakpoint number: '%s'"), args); if (*p == 0) - error ("Second argument (specified ignore-count) is missing."); + error (_("Second argument (specified ignore-count) is missing.")); set_ignore_count (num, longest_to_int (value_as_long (parse_and_eval (p))), @@ -7322,7 +7317,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *)) num = get_number_or_range (&p1); if (num == 0) { - warning ("bad breakpoint number at or near '%s'", p); + warning (_("bad breakpoint number at or near '%s'"), p); } else { @@ -7378,7 +7373,7 @@ disable_command (char *args, int from_tty) switch (bpt->type) { case bp_none: - warning ("attempted to disable apparently deleted breakpoint #%d?", + warning (_("attempted to disable apparently deleted breakpoint #%d?"), bpt->number); continue; case bp_breakpoint: @@ -7416,9 +7411,9 @@ do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition) TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint, i + 1, 0); if (target_resources_ok == 0) - error ("No hardware breakpoint support in the target."); + error (_("No hardware breakpoint support in the target.")); else if (target_resources_ok < 0) - error ("Hardware breakpoints used exceeds limit."); + error (_("Hardware breakpoints used exceeds limit.")); } if (bpt->pending) @@ -7529,7 +7524,7 @@ enable_command (char *args, int from_tty) switch (bpt->type) { case bp_none: - warning ("attempted to enable apparently deleted breakpoint #%d?", + warning (_("attempted to enable apparently deleted breakpoint #%d?"), bpt->number); continue; case bp_breakpoint: @@ -7594,7 +7589,7 @@ decode_line_spec_1 (char *string, int funfirstline) { struct symtabs_and_lines sals; if (string == 0) - error ("Empty line specification."); + error (_("Empty line specification.")); if (default_breakpoint_valid) sals = decode_line_1 (&string, funfirstline, default_breakpoint_symtab, @@ -7604,7 +7599,7 @@ decode_line_spec_1 (char *string, int funfirstline) sals = decode_line_1 (&string, funfirstline, (struct symtab *) NULL, 0, (char ***) NULL, NULL); if (*string) - error ("Junk at end of line specification: %s", string); + error (_("Junk at end of line specification: %s"), string); return sals; } diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c index 868ec8c..e9636a5 100644 --- a/gdb/bsd-kvm.c +++ b/gdb/bsd-kvm.c @@ -79,7 +79,7 @@ bsd_kvm_open (char *filename, int from_tty) execfile = get_exec_file (0); temp_kd = kvm_openfiles (execfile, filename, NULL, O_RDONLY, errbuf); if (temp_kd == NULL) - error ("%s", errbuf); + error (("%s"), errbuf); unpush_target (&bsd_kvm_ops); core_kd = temp_kd; @@ -98,7 +98,7 @@ bsd_kvm_close (int quitting) if (core_kd) { if (kvm_close (core_kd) == -1) - warning ("%s", kvm_geterr(core_kd)); + warning (("%s"), kvm_geterr(core_kd)); core_kd = NULL; } } @@ -124,7 +124,7 @@ bsd_kvm_fetch_pcb (struct pcb *paddr) struct pcb pcb; if (kvm_read (core_kd, (unsigned long) paddr, &pcb, sizeof pcb) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); gdb_assert (bsd_kvm_supply_pcb); return bsd_kvm_supply_pcb (current_regcache, &pcb); @@ -147,7 +147,7 @@ bsd_kvm_fetch_registers (int regnum) nl[0].n_name = "_dumppcb"; if (kvm_nlist (core_kd, nl) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); if (nl[0].n_value != 0) { @@ -165,7 +165,7 @@ bsd_kvm_fetch_registers (int regnum) nl[0].n_name = "_proc0paddr"; if (kvm_nlist (core_kd, nl) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); if (nl[0].n_value != 0) { @@ -173,7 +173,7 @@ bsd_kvm_fetch_registers (int regnum) /* Found proc0paddr. */ if (kvm_read (core_kd, nl[0].n_value, &paddr, sizeof paddr) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); bsd_kvm_fetch_pcb (paddr); return; @@ -189,7 +189,7 @@ bsd_kvm_fetch_registers (int regnum) nl[0].n_name = "_thread0"; if (kvm_nlist (core_kd, nl) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); if (nl[0].n_value != 0) { @@ -198,7 +198,7 @@ bsd_kvm_fetch_registers (int regnum) /* Found thread0. */ nl[0].n_value += offsetof (struct thread, td_pcb); if (kvm_read (core_kd, nl[0].n_value, &paddr, sizeof paddr) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); bsd_kvm_fetch_pcb (paddr); return; @@ -240,7 +240,7 @@ bsd_kvm_proc_cmd (char *arg, int fromtty) #endif if (kvm_read (core_kd, addr, &bsd_kvm_paddr, sizeof bsd_kvm_paddr) == -1) - error ("%s", kvm_geterr (core_kd)); + error (("%s"), kvm_geterr (core_kd)); target_fetch_registers (-1); diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c index 5041eb8..b1eb6c3 100644 --- a/gdb/bsd-uthread.c +++ b/gdb/bsd-uthread.c @@ -97,7 +97,7 @@ bsd_uthread_check_magic (CORE_ADDR addr) ULONGEST magic = read_memory_unsigned_integer (addr, 4); if (magic != BSD_UTHREAD_PTHREAD_MAGIC) - error ("Bad magic"); + error (_("Bad magic")); } /* Thread states. */ diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 60ede57..23ea710 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -181,7 +181,7 @@ struct cmd_list_element *showchecklist; void error_no_arg (char *why) { - error ("Argument required (%s).", why); + error (_("Argument required (%s)."), why); } /* The "info" command is defined as a prefix, with allow_unknown = 0. @@ -305,7 +305,7 @@ void quit_command (char *args, int from_tty) { if (!quit_confirm ()) - error ("Not confirmed."); + error (_("Not confirmed.")); quit_force (args, from_tty); } @@ -313,7 +313,7 @@ static void pwd_command (char *args, int from_tty) { if (args) - error ("The \"pwd\" command does not take an argument: %s", args); + error (_("The \"pwd\" command does not take an argument: %s"), args); getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)); if (strcmp (gdb_dirbuf, current_directory) != 0) @@ -432,7 +432,7 @@ source_command (char *args, int from_tty) if (file == NULL) { - error ("source command requires pathname of file to source."); + error (_("source command requires pathname of file to source.")); } file = tilde_expand (file); @@ -539,7 +539,7 @@ shell_escape (char *arg, int from_tty) while ((rc = wait (&status)) != pid && rc != -1) ; else - error ("Fork failed"); + error (_("Fork failed")); #endif /* Can fork. */ } @@ -567,7 +567,7 @@ edit_command (char *arg, int from_tty) if (arg == 0) { if (sal.symtab == 0) - error ("No default source file yet."); + error (_("No default source file yet.")); sal.line += get_lines_to_list () / 2; } else @@ -589,7 +589,7 @@ edit_command (char *arg, int from_tty) xfree (sals.sals); if (*arg1) - error ("Junk at end of line specification."); + error (_("Junk at end of line specification.")); /* if line was specified by address, first print exactly which line, and which file. @@ -599,7 +599,7 @@ edit_command (char *arg, int from_tty) { if (sal.symtab == 0) /* FIXME-32x64--assumes sal.pc fits in long. */ - error ("No source file for address %s.", + error (_("No source file for address %s."), hex_string ((unsigned long) sal.pc)); sym = find_pc_function (sal.pc); if (sym) @@ -621,7 +621,7 @@ edit_command (char *arg, int from_tty) symbol which means no source code. */ if (sal.symtab == 0) - error ("No line number known for %s.", arg); + error (_("No line number known for %s."), arg); } if ((editor = (char *) getenv ("EDITOR")) == NULL) @@ -693,7 +693,7 @@ list_command (char *arg, int from_tty) set DUMMY_BEG or DUMMY_END to record that fact. */ if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); arg1 = arg; if (*arg1 == ',') @@ -750,13 +750,13 @@ list_command (char *arg, int from_tty) } if (*arg1) - error ("Junk at end of line specification."); + error (_("Junk at end of line specification.")); if (!no_end && !dummy_beg && !dummy_end && sal.symtab != sal_end.symtab) - error ("Specified start and end are in different files."); + error (_("Specified start and end are in different files.")); if (dummy_beg && dummy_end) - error ("Two empty args do not say what lines to list."); + error (_("Two empty args do not say what lines to list.")); /* if line was specified by address, first print exactly which line, and which file. @@ -766,7 +766,7 @@ list_command (char *arg, int from_tty) { if (sal.symtab == 0) /* FIXME-32x64--assumes sal.pc fits in long. */ - error ("No source file for address %s.", + error (_("No source file for address %s."), hex_string ((unsigned long) sal.pc)); sym = find_pc_function (sal.pc); if (sym) @@ -789,7 +789,7 @@ list_command (char *arg, int from_tty) which means no source code. */ if (!linenum_beg && sal.symtab == 0) - error ("No line number known for %s.", arg); + error (_("No line number known for %s."), arg); /* If this command is repeated with RET, turn it into the no-arg variant. */ @@ -798,13 +798,13 @@ list_command (char *arg, int from_tty) *arg = 0; if (dummy_beg && sal_end.symtab == 0) - error ("No default source file yet. Do \"help list\"."); + error (_("No default source file yet. Do \"help list\".")); if (dummy_beg) print_source_lines (sal_end.symtab, max (sal_end.line - (get_lines_to_list () - 1), 1), sal_end.line + 1, 0); else if (sal.symtab == 0) - error ("No default source file yet. Do \"help list\"."); + error (_("No default source file yet. Do \"help list\".")); else if (no_end) { int first_line = sal.line - get_lines_to_list () / 2; @@ -846,11 +846,11 @@ disassemble_command (char *arg, int from_tty) if (!arg) { if (!deprecated_selected_frame) - error ("No frame selected.\n"); + error (_("No frame selected.")); pc = get_frame_pc (deprecated_selected_frame); if (find_pc_partial_function (pc, &name, &low, &high) == 0) - error ("No function contains program counter for selected frame.\n"); + error (_("No function contains program counter for selected frame.")); #if defined(TUI) /* NOTE: cagney/2003-02-13 The `tui_active' was previously `tui_version'. */ @@ -865,7 +865,7 @@ disassemble_command (char *arg, int from_tty) /* One argument. */ pc = parse_and_eval_address (arg); if (find_pc_partial_function (pc, &name, &low, &high) == 0) - error ("No function contains specified address.\n"); + error (_("No function contains specified address.")); #if defined(TUI) /* NOTE: cagney/2003-02-13 The `tui_active' was previously `tui_version'. */ @@ -942,7 +942,7 @@ show_user (char *args, int from_tty) { c = lookup_cmd (&args, cmdlist, "", 0, 1); if (c->class != class_user) - error ("Not a user command."); + error (_("Not a user command.")); show_user_1 (c, gdb_stdout); } else @@ -967,7 +967,7 @@ apropos_command (char *searchstr, int from_tty) char errorbuffer[512]; pattern_fastmap = xcalloc (256, sizeof (char)); if (searchstr == NULL) - error("REGEXP string is empty"); + error (_("REGEXP string is empty")); if (regcomp(&pattern,searchstr,REG_ICASE) == 0) { @@ -978,7 +978,7 @@ apropos_command (char *searchstr, int from_tty) else { regerror(regcomp(&pattern,searchstr,REG_ICASE),NULL,errorbuffer,512); - error("Error in regular expression:%s",errorbuffer); + error (_("Error in regular expression:%s"),errorbuffer); } xfree (pattern_fastmap); } diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 40d5cd6..883f7d0 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1154,7 +1154,7 @@ lookup_cmd_1 (char **text, struct cmd_list_element *clist, static void undef_cmd_error (char *cmdtype, char *q) { - error ("Undefined %scommand: \"%s\". Try \"help%s%.*s\".", + error (_("Undefined %scommand: \"%s\". Try \"help%s%.*s\"."), cmdtype, q, *cmdtype ? " " : "", @@ -1192,7 +1192,7 @@ lookup_cmd (char **line, struct cmd_list_element *list, char *cmdtype, if (!allow_unknown) { if (!*line) - error ("Lack of needed %scommand", cmdtype); + error (_("Lack of needed %scommand"), cmdtype); else { char *p = *line, *q; @@ -1254,7 +1254,7 @@ lookup_cmd (char **line, struct cmd_list_element *list, char *cmdtype, break; } } - error ("Ambiguous %scommand \"%s\": %s.", local_cmdtype, + error (_("Ambiguous %scommand \"%s\": %s."), local_cmdtype, *line, ambbuf); return 0; /* lint */ } @@ -1636,7 +1636,7 @@ cmd_func (struct cmd_list_element *cmd, char *args, int from_tty) if (cmd_func_p (cmd)) (*cmd->func) (cmd, args, from_tty); else - error ("Invalid command"); + error (_("Invalid command")); } diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 4030a85..593e637 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -94,7 +94,7 @@ scan_filename_with_cleanup (char **cmd, const char *defname) if ((*cmd) == NULL) { if (defname == NULL) - error ("Missing filename."); + error (_("Missing filename.")); filename = xstrdup (defname); make_cleanup (xfree, filename); } @@ -134,12 +134,12 @@ bfd_openr_with_cleanup (const char *filename, const char *target) ibfd = bfd_openr (filename, target); if (ibfd == NULL) - error ("Failed to open %s: %s.", filename, + error (_("Failed to open %s: %s."), filename, bfd_errmsg (bfd_get_error ())); make_cleanup_bfd_close (ibfd); if (!bfd_check_format (ibfd, bfd_object)) - error ("'%s' is not a recognized file format.", filename); + error (_("'%s' is not a recognized file format."), filename); return ibfd; } @@ -154,18 +154,18 @@ bfd_openw_with_cleanup (const char *filename, const char *target, { obfd = bfd_openw (filename, target); if (obfd == NULL) - error ("Failed to open %s: %s.", filename, + error (_("Failed to open %s: %s."), filename, bfd_errmsg (bfd_get_error ())); make_cleanup_bfd_close (obfd); if (!bfd_set_format (obfd, bfd_object)) - error ("bfd_openw_with_cleanup: %s.", bfd_errmsg (bfd_get_error ())); + error (_("bfd_openw_with_cleanup: %s."), bfd_errmsg (bfd_get_error ())); } else if (*mode == 'a') /* Append to existing file */ { /* FIXME -- doesn't work... */ - error ("bfd_openw does not work with append."); + error (_("bfd_openw does not work with append.")); } else - error ("bfd_openw_with_cleanup: unknown mode %s.", mode); + error (_("bfd_openw_with_cleanup: unknown mode %s."), mode); return obfd; } @@ -241,18 +241,18 @@ dump_memory_to_file (char *cmd, char *mode, char *file_format) /* Find the low address. */ if (cmd == NULL || *cmd == '\0') - error ("Missing start address."); + error (_("Missing start address.")); lo_exp = scan_expression_with_cleanup (&cmd, NULL); /* Find the second address - rest of line. */ if (cmd == NULL || *cmd == '\0') - error ("Missing stop address."); + error (_("Missing stop address.")); hi_exp = cmd; lo = parse_and_eval_address (lo_exp); hi = parse_and_eval_address (hi_exp); if (hi <= lo) - error ("Invalid memory address range (start >= end)."); + error (_("Invalid memory address range (start >= end).")); count = hi - lo; /* FIXME: Should use read_memory_partial() and a magic blocking @@ -292,10 +292,10 @@ dump_value_to_file (char *cmd, char *mode, char *file_format) /* Find the value. */ if (cmd == NULL || *cmd == '\0') - error ("No value to %s.", *mode == 'a' ? "append" : "dump"); + error (_("No value to %s."), *mode == 'a' ? "append" : "dump"); val = parse_and_eval (cmd); if (val == NULL) - error ("Invalid expression."); + error (_("Invalid expression.")); /* Have everything. Open/write the data. */ if (file_format == NULL || strcmp (file_format, "binary") == 0) @@ -314,7 +314,7 @@ dump_value_to_file (char *cmd, char *mode, char *file_format) else { vaddr = 0; - warning ("value is not an lval: address assumed to be zero"); + warning (_("value is not an lval: address assumed to be zero")); } dump_bfd_file (filename, mode, file_format, vaddr, @@ -492,7 +492,7 @@ restore_section_callback (bfd *ibfd, asection *isec, void *args) buf = xmalloc (size); old_chain = make_cleanup (xfree, buf); if (!bfd_get_section_contents (ibfd, isec, buf, 0, size)) - error ("Failed to read bfd file %s: '%s'.", bfd_get_filename (ibfd), + error (_("Failed to read bfd file %s: '%s'."), bfd_get_filename (ibfd), bfd_errmsg (bfd_get_error ())); printf_filtered ("Restoring section %s (0x%lx to 0x%lx)", @@ -513,7 +513,7 @@ restore_section_callback (bfd *ibfd, asection *isec, void *args) ret = target_write_memory (sec_start + sec_offset + data->load_offset, buf + sec_offset, sec_load_count); if (ret != 0) - warning ("restore: memory write failed (%s).", safe_strerror (ret)); + warning (_("restore: memory write failed (%s)."), safe_strerror (ret)); do_cleanups (old_chain); return; } @@ -533,7 +533,7 @@ restore_binary_file (char *filename, struct callback_data *data) perror_with_name (filename); if (len <= data->load_start) - error ("Start address is greater than length of binary file %s.", + error (_("Start address is greater than length of binary file %s."), filename); /* Chop off "len" if it exceeds the requested load_end addr. */ @@ -562,7 +562,7 @@ restore_binary_file (char *filename, struct callback_data *data) /* Now write the buffer into target memory. */ len = target_write_memory (data->load_start + data->load_offset, buf, len); if (len != 0) - warning ("restore: memory write failed (%s).", safe_strerror (len)); + warning (_("restore: memory write failed (%s)."), safe_strerror (len)); return; } @@ -608,7 +608,7 @@ restore_command (char *args, int from_tty) /* Parse end address (optional). */ data.load_end = parse_and_eval_long (args); if (data.load_end <= data.load_start) - error ("Start must be less than end."); + error (_("Start must be less than end.")); } } } diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index 773a420..c42892d 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -102,7 +102,7 @@ handle_redirections (int from_tty) gdb_stdtarg = output; if (ui_out_redirect (uiout, gdb_stdout) < 0) - warning ("Current output protocol does not support redirection"); + warning (_("Current output protocol does not support redirection")); } static void diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 458559a..51d55f1 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -73,7 +73,7 @@ build_command_line (enum command_control_type type, char *args) struct command_line *cmd; if (args == NULL) - error ("if/while commands require arguments.\n"); + error (_("if/while commands require arguments.")); cmd = (struct command_line *) xmalloc (sizeof (struct command_line)); cmd->next = NULL; @@ -105,7 +105,7 @@ get_command_line (enum command_control_type type, char *arg) /* Read in the body of this command. */ if (recurse_read_control_structure (cmd) == invalid_control) { - warning ("error reading in control structure\n"); + warning (_("Error reading in control structure.")); do_cleanups (old_chain); return NULL; } @@ -263,7 +263,7 @@ execute_user_command (struct cmd_list_element *c, char *args) return; if (++user_call_depth > max_user_call_depth) - error ("Max user call depth exceeded -- command aborted\n"); + error (_("Max user call depth exceeded -- command aborted.")); old_chain = make_cleanup (do_restore_user_call_depth, &user_call_depth); @@ -276,7 +276,7 @@ execute_user_command (struct cmd_list_element *c, char *args) ret = execute_control_command (cmdlines); if (ret != simple_control && ret != break_control) { - warning ("Error in control structure.\n"); + warning (_("Error in control structure.")); break; } cmdlines = cmdlines->next; @@ -424,7 +424,7 @@ execute_control_command (struct command_line *cmd) } default: - warning ("Invalid control type in command structure."); + warning (_("Invalid control type in command structure.")); break; } @@ -512,7 +512,7 @@ setup_user_args (char *p) if (arg_count >= MAXUSERARGS) { - error ("user defined function may only have %d arguments.\n", + error (_("user defined function may only have %d arguments."), MAXUSERARGS); return old_chain; } @@ -598,7 +598,7 @@ insert_args (char *line) if (i >= user_args->count) { - error ("Missing argument %d in user function.\n", i); + error (_("Missing argument %d in user function."), i); return NULL; } len += user_args->a[i].len; @@ -679,7 +679,7 @@ read_next_line (struct command_line **command) int i = 0; if (control_level >= 254) - error ("Control nesting too deep!\n"); + error (_("Control nesting too deep!")); /* Set a prompt based on the nesting of the control commands. */ if (instream == stdin || (instream == 0 && deprecated_readline_hook != NULL)) @@ -794,16 +794,10 @@ recurse_read_control_structure (struct command_line *current_cmd) /* Sanity checks. */ if (current_cmd->control_type == simple_control) - { - error ("Recursed on a simple control type\n"); - return invalid_control; - } + error (_("Recursed on a simple control type.")); if (current_body > current_cmd->body_count) - { - error ("Allocated body is smaller than this command type needs\n"); - return invalid_control; - } + error (_("Allocated body is smaller than this command type needs.")); /* Read lines from the input stream and build control structures. */ while (1) @@ -1058,7 +1052,7 @@ validate_comname (char *comname) while (*p) { if (!isalnum (*p) && *p != '-' && *p != '_') - error ("Junk in argument list: \"%s\"", p); + error (_("Junk in argument list: \"%s\""), p); p++; } } @@ -1107,7 +1101,7 @@ define_command (char *comname, int from_tty) else q = query ("Really redefine built-in command \"%s\"? ", c->name); if (!q) - error ("Command \"%s\" not redefined.", c->name); + error (_("Command \"%s\" not redefined."), c->name); } /* If this new command is a hook, then mark the command which it @@ -1134,10 +1128,10 @@ define_command (char *comname, int from_tty) hookc = 0; if (!hookc) { - warning ("Your new `%s' command does not hook any existing command.", + warning (_("Your new `%s' command does not hook any existing command."), comname); if (!query ("Proceed? ")) - error ("Not confirmed."); + error (_("Not confirmed.")); } } @@ -1194,7 +1188,7 @@ document_command (char *comname, int from_tty) c = lookup_cmd (&tem, cmdlist, "", 0, 1); if (c->class != class_user) - error ("Command \"%s\" is built-in.", comname); + error (_("Command \"%s\" is built-in."), comname); sprintf (tmpbuf, "Type documentation for \"%s\".", comname); doclines = read_command_lines (tmpbuf, from_tty); diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 8f84345a..d87791e 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -56,7 +56,7 @@ parse_auto_binary_operation (const char *arg) || (strncmp (arg, "-1", length) == 0 && length > 1)) return AUTO_BOOLEAN_AUTO; } - error ("\"on\", \"off\" or \"auto\" expected."); + error (_("\"on\", \"off\" or \"auto\" expected.")); return AUTO_BOOLEAN_AUTO; /* pacify GCC */ } @@ -85,7 +85,7 @@ parse_binary_operation (char *arg) return 0; else { - error ("\"on\" or \"off\" expected."); + error (_("\"on\" or \"off\" expected.")); return 0; } } @@ -183,7 +183,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) if (val == 0) *(int *) c->var = INT_MAX; else if (val >= INT_MAX) - error ("integer %u out of range", val); + error (_("integer %u out of range"), val); else *(int *) c->var = val; break; @@ -213,7 +213,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) strcat (msg, c->enums[i]); } strcat (msg, "."); - error ("%s", msg); + error (("%s"), msg); } p = strchr (arg, ' '); @@ -241,16 +241,16 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) } if (nmatches <= 0) - error ("Undefined item: \"%s\".", arg); + error (_("Undefined item: \"%s\"."), arg); if (nmatches > 1) - error ("Ambiguous item \"%s\".", arg); + error (_("Ambiguous item \"%s\"."), arg); *(const char **) c->var = match; } break; default: - error ("gdb internal error: bad var_type in do_setshow_command"); + error (_("gdb internal error: bad var_type in do_setshow_command")); } } else if (c->type == show_cmd) @@ -326,7 +326,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) break; default: - error ("gdb internal error: bad var_type in do_setshow_command"); + error (_("gdb internal error: bad var_type in do_setshow_command")); } @@ -363,7 +363,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c) do_cleanups (old_chain); } else - error ("gdb internal error: bad cmd_type in do_setshow_command"); + error (_("gdb internal error: bad cmd_type in do_setshow_command")); c->func (c, NULL, from_tty); if (c->type == set_cmd && deprecated_set_hook) deprecated_set_hook (c); diff --git a/gdb/coff-solib.h b/gdb/coff-solib.h index 05f6d92..a400795 100644 --- a/gdb/coff-solib.h +++ b/gdb/coff-solib.h @@ -62,7 +62,7 @@ extern void coff_solib_create_inferior_hook (void); /* solib.c */ Presently, this functionality is not implemented. */ #define SOLIB_CREATE_CATCH_LOAD_HOOK(pid, tempflag, filename, cond_string) \ - error("catch of library loads/unloads not yet implemented on this platform") + error (_("catch of library loads/unloads not yet implemented on this platform")) /* This function is called by the "catch unload" command. It allows the debugger to be notified by the dynamic linker when a specified @@ -71,7 +71,7 @@ extern void coff_solib_create_inferior_hook (void); /* solib.c */ Presently, this functionality is not implemented. */ #define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) \ - error("catch of library loads/unloads not yet implemented on this platform") + error (_("catch of library loads/unloads not yet implemented on this platform")) /* This function returns TRUE if the dynamic linker has just reported a load of a library. diff --git a/gdb/coffread.c b/gdb/coffread.c index 3f73169..205b733 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -576,7 +576,7 @@ coff_symfile_read (struct objfile *objfile, int mainline) val = init_lineno (abfd, info->min_lineno_offset, info->max_lineno_offset - info->min_lineno_offset); if (val < 0) - error (_("\"%s\": error reading line numbers\n"), name); + error (_("\"%s\": error reading line numbers."), name); } /* Now read the string table, all at once. */ @@ -969,7 +969,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, else if (DEPRECATED_STREQ (cs->c_name, ".ef")) { if (!within_function) - error (_("Bad coff function information\n")); + error (_("Bad coff function information.")); /* the value of .ef is the address of epilogue code; not useful for gdb. */ /* { main_aux.x_sym.x_misc.x_lnsz.x_lnno diff --git a/gdb/core-aout.c b/gdb/core-aout.c index 659c818..7e59650 100644 --- a/gdb/core-aout.c +++ b/gdb/core-aout.c @@ -101,7 +101,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, } 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)); } @@ -116,7 +116,7 @@ register_addr (int regno, CORE_ADDR blockend) CORE_ADDR addr; if (regno < 0 || regno >= NUM_REGS) - error ("Invalid register number %d.", regno); + error (_("Invalid register number %d."), regno); REGISTER_U_ADDR (addr, blockend, regno); diff --git a/gdb/core-regset.c b/gdb/core-regset.c index 529c51f..01afaf6 100644 --- a/gdb/core-regset.c +++ b/gdb/core-regset.c @@ -69,7 +69,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, { case 0: if (core_reg_size != sizeof (gregset)) - warning ("Wrong size gregset in core file."); + warning (_("Wrong size gregset in core file.")); else { memcpy (&gregset, core_reg_sect, sizeof (gregset)); @@ -79,7 +79,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, case 2: if (core_reg_size != sizeof (fpregset)) - warning ("Wrong size fpregset in core file."); + warning (_("Wrong size fpregset in core file.")); else { memcpy (&fpregset, core_reg_sect, sizeof (fpregset)); diff --git a/gdb/corefile.c b/gdb/corefile.c index ff7003a..b4801d0 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -73,7 +73,7 @@ core_file_command (char *filename, int from_tty) t = find_core_target (); if (t == NULL) - error ("GDB can't read core files on this machine."); + error (_("GDB can't read core files on this machine.")); if (!filename) (t->to_detach) (filename, from_tty); @@ -181,9 +181,9 @@ validate_files (void) if (exec_bfd && core_bfd) { if (!core_file_matches_executable_p (core_bfd, exec_bfd)) - warning ("core file may not match specified executable file."); + warning (_("core file may not match specified executable file.")); else if (bfd_get_mtime (exec_bfd) > bfd_get_mtime (core_bfd)) - warning ("exec file is newer than core file."); + warning (_("exec file is newer than core file.")); } } @@ -199,8 +199,8 @@ get_exec_file (int err) if (!err) return NULL; - error ("No executable file specified.\n\ -Use the \"file\" or \"exec-file\" command."); + error (_("No executable file specified.\n\ +Use the \"file\" or \"exec-file\" command.")); return NULL; } diff --git a/gdb/corelow.c b/gdb/corelow.c index 9e052c5..730f14f 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -154,12 +154,12 @@ sniff_core_bfd (bfd *abfd) } if (matches > 1) { - warning ("\"%s\": ambiguous core format, %d handlers match", + warning (_("\"%s\": ambiguous core format, %d handlers match"), bfd_get_filename (abfd), matches); } else if (matches == 0) { - warning ("\"%s\": no core file handler recognizes format, using default", + warning (_("\"%s\": no core file handler recognizes format, using default"), bfd_get_filename (abfd)); } if (yummy == NULL) @@ -216,7 +216,7 @@ core_close (int quitting) name = bfd_get_filename (core_bfd); if (!bfd_close (core_bfd)) - warning ("cannot close \"%s\": %s", + warning (_("cannot close \"%s\": %s"), name, bfd_errmsg (bfd_get_error ())); xfree (name); core_bfd = NULL; @@ -290,9 +290,10 @@ core_open (char *filename, int from_tty) target_preopen (from_tty); if (!filename) { - error (core_bfd ? - "No core file specified. (Use `detach' to stop debugging a core file.)" - : "No core file specified."); + if (core_bfd) + error (_("No core file specified. (Use `detach' to stop debugging a core file.)")); + else + error (_("No core file specified.")); } filename = tilde_expand (filename); @@ -326,7 +327,7 @@ core_open (char *filename, int from_tty) on error it does not free all the storage associated with the bfd). */ make_cleanup_bfd_close (temp_bfd); - error ("\"%s\" is not a core dump: %s", + error (_("\"%s\" is not a core dump: %s"), filename, bfd_errmsg (bfd_get_error ())); } @@ -353,7 +354,7 @@ core_open (char *filename, int from_tty) /* Find the data section */ if (build_section_table (core_bfd, &core_ops.to_sections, &core_ops.to_sections_end)) - error ("\"%s\": Can't find sections: %s", + error (_("\"%s\": Can't find sections: %s"), bfd_get_filename (core_bfd), bfd_errmsg (bfd_get_error ())); /* If we have no exec file, try to set the architecture from the @@ -417,7 +418,7 @@ static void core_detach (char *args, int from_tty) { if (args) - error ("Too many arguments"); + error (_("Too many arguments")); unpush_target (&core_ops); reinit_frame_cache (); if (from_tty) @@ -460,7 +461,7 @@ get_core_register_section (char *name, if (! section) { if (required) - warning ("Couldn't find %s registers in core file.\n", human_name); + warning (_("Couldn't find %s registers in core file."), human_name); return; } @@ -469,7 +470,7 @@ get_core_register_section (char *name, if (! bfd_get_section_contents (core_bfd, section, contents, (file_ptr) 0, size)) { - warning ("Couldn't read %s registers from `%s' section in core file.\n", + warning (_("Couldn't read %s registers from `%s' section in core file."), human_name, name); return; } @@ -482,7 +483,7 @@ get_core_register_section (char *name, if (regset == NULL) { if (required) - warning ("Couldn't recognize %s registers in core file.\n", + warning (_("Couldn't recognize %s registers in core file."), human_name); return; } @@ -570,7 +571,7 @@ core_xfer_partial (struct target_ops *ops, enum target_object object, && !bfd_get_section_contents (core_bfd, section, readbuf, (file_ptr) offset, size)) { - warning ("Couldn't read NT_AUXV note in core file."); + warning (_("Couldn't read NT_AUXV note in core file.")); return -1; } @@ -602,7 +603,7 @@ core_xfer_partial (struct target_ops *ops, enum target_object object, && !bfd_get_section_contents (core_bfd, section, readbuf, (file_ptr) offset, size)) { - warning ("Couldn't read StackGhost cookie in core file."); + warning (_("Couldn't read StackGhost cookie in core file.")); return -1; } diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c index e347d5e..b751363 100644 --- a/gdb/cp-abi.c +++ b/gdb/cp-abi.c @@ -41,7 +41,7 @@ enum ctor_kinds is_constructor_name (const char *name) { if ((current_cp_abi.is_constructor_name) == NULL) - error ("ABI doesn't define required function is_constructor_name"); + error (_("ABI doesn't define required function is_constructor_name")); return (*current_cp_abi.is_constructor_name) (name); } @@ -49,7 +49,7 @@ enum dtor_kinds is_destructor_name (const char *name) { if ((current_cp_abi.is_destructor_name) == NULL) - error ("ABI doesn't define required function is_destructor_name"); + error (_("ABI doesn't define required function is_destructor_name")); return (*current_cp_abi.is_destructor_name) (name); } @@ -57,7 +57,7 @@ int is_vtable_name (const char *name) { if ((current_cp_abi.is_vtable_name) == NULL) - error ("ABI doesn't define required function is_vtable_name"); + error (_("ABI doesn't define required function is_vtable_name")); return (*current_cp_abi.is_vtable_name) (name); } @@ -65,7 +65,7 @@ int is_operator_name (const char *name) { if ((current_cp_abi.is_operator_name) == NULL) - error ("ABI doesn't define required function is_operator_name"); + error (_("ABI doesn't define required function is_operator_name")); return (*current_cp_abi.is_operator_name) (name); } @@ -74,7 +74,7 @@ baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, CORE_ADDR address) { if (current_cp_abi.baseclass_offset == NULL) - error ("ABI doesn't define required function baseclass_offset"); + error (_("ABI doesn't define required function baseclass_offset")); return (*current_cp_abi.baseclass_offset) (type, index, valaddr, address); } @@ -219,7 +219,7 @@ set_cp_abi_cmd (char *args, int from_tty) } if (!switch_to_cp_abi (args)) - error ("Could not find \"%s\" in ABI list", args); + error (_("Could not find \"%s\" in ABI list"), args); } /* Show the currently selected C++ ABI. */ diff --git a/gdb/cp-support.c b/gdb/cp-support.c index a182dd9..ad5e169 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -684,13 +684,13 @@ cp_lookup_rtti_type (const char *name, struct block *block) if (rtti_sym == NULL) { - warning ("RTTI symbol not found for class '%s'", name); + warning (_("RTTI symbol not found for class '%s'"), name); return NULL; } if (SYMBOL_CLASS (rtti_sym) != LOC_TYPEDEF) { - warning ("RTTI symbol for class '%s' is not a type", name); + warning (_("RTTI symbol for class '%s' is not a type"), name); return NULL; } @@ -705,10 +705,10 @@ cp_lookup_rtti_type (const char *name, struct block *block) symbols for namespaces with the same name as the struct. This warning is an indication of a bug in the lookup order or a bug in the way that the symbol tables are populated. */ - warning ("RTTI symbol for class '%s' is a namespace", name); + warning (_("RTTI symbol for class '%s' is a namespace"), name); return NULL; default: - warning ("RTTI symbol for class '%s' has bad type", name); + warning (_("RTTI symbol for class '%s' has bad type"), name); return NULL; } diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 9fdf869..959d2e0 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -118,7 +118,7 @@ cp_print_class_method (const bfd_byte *valaddr, fputs_filtered ("?? <not supported with HP aCC>", stream); return; } - error ("invalid pointer to member function"); + error (_("invalid pointer to member function")); } len = TYPE_NFN_FIELDS (domain); for (i = 0; i < len; i++) @@ -545,8 +545,8 @@ cp_print_value (struct type *type, struct type *real_type, find_rt_vbase_offset (type, TYPE_BASECLASS (type, i), valaddr, offset, &boffset, &skip); if (skip >= 0) - error ("Virtual base class offset not found from vtable while" - " printing"); + error (_("Virtual base class offset not found from vtable while" + " printing")); base_valaddr = valaddr; } else diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 15407cf..ef315a6 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -283,7 +283,7 @@ cris_sigcontext_addr (struct frame_info *next_frame) return (sp + 156); } - error ("Couldn't recognize signal trampoline."); + error (_("Couldn't recognize signal trampoline.")); return 0; } @@ -1607,7 +1607,7 @@ crisv32_register_type (struct gdbarch *gdbarch, int regno) { /* Invalid (unimplemented) register. Should not happen as there are no unimplemented CRISv32 registers. */ - warning ("crisv32_register_type: unknown regno %d", regno); + warning (_("crisv32_register_type: unknown regno %d"), regno); return builtin_type_int0; } } @@ -1639,7 +1639,7 @@ cris_store_return_value (struct type *type, struct regcache *regcache, regcache_cooked_write_unsigned (regcache, ARG2_REGNUM, val); } else - error ("cris_store_return_value: type length too large."); + error (_("cris_store_return_value: type length too large.")); } /* Return the name of register regno as a string. Return NULL for an invalid or @@ -1759,7 +1759,7 @@ cris_dwarf2_reg_to_regnum (int reg) regnum = cris_dwarf_regmap[reg]; if (regnum == -1) - warning ("Unmapped DWARF Register #%d encountered\n", reg); + warning (_("Unmapped DWARF Register #%d encountered."), reg); return regnum; } @@ -1807,7 +1807,7 @@ cris_extract_return_value (struct type *type, struct regcache *regcache, store_unsigned_integer ((char *)valbuf + 4, len - 4, val); } else - error ("cris_extract_return_value: type length too large"); + error (_("cris_extract_return_value: type length too large")); } /* Handle the CRIS return value convention. */ @@ -2055,7 +2055,7 @@ cris_software_single_step (enum target_signal ignore, int insert_breakpoints) { /* Could not find a target. Things are likely to go downhill from here. */ - warning ("CRIS software single step could not find a step target."); + warning (_("CRIS software single step could not find a step target.")); } else { @@ -3832,7 +3832,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, if (core_reg_size != sizeof (elf_gregset_t) && core_reg_size != sizeof (crisv32_elf_gregset_t)) { - warning ("wrong size gregset struct in core file"); + warning (_("wrong size gregset struct in core file")); } else { diff --git a/gdb/dbxread.c b/gdb/dbxread.c index fbbd078..f4dd407 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -221,7 +221,7 @@ find_text_range (bfd * sym_bfd, struct objfile *objfile) } if (!found_any) - error ("Can't find any code sections in symbol file"); + error (_("Can't find any code sections in symbol file")); DBX_TEXT_ADDR (objfile) = start; DBX_TEXT_SIZE (objfile) = end - start; @@ -643,7 +643,7 @@ dbx_symfile_init (struct objfile *objfile) text_sect = bfd_get_section_by_name (sym_bfd, ".text"); if (!text_sect) - error ("Can't find .text section in symbol file"); + error (_("Can't find .text section in symbol file")); DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect); DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect); @@ -705,7 +705,7 @@ dbx_symfile_init (struct objfile *objfile) if (DBX_STRINGTAB_SIZE (objfile) < sizeof (size_temp) || DBX_STRINGTAB_SIZE (objfile) > bfd_get_size (sym_bfd)) - error ("ridiculous string table size (%d bytes).", + error (_("ridiculous string table size (%d bytes)."), DBX_STRINGTAB_SIZE (objfile)); DBX_STRINGTAB (objfile) = @@ -829,7 +829,7 @@ fill_symbuf (bfd *sym_bfd) if (nbytes < 0) perror_with_name (bfd_get_filename (sym_bfd)); else if (nbytes == 0) - error ("Premature end of file reading symbol table"); + error (_("Premature end of file reading symbol table")); symbuf_end = nbytes / symbol_size; symbuf_idx = 0; symbuf_left -= nbytes; @@ -1417,7 +1417,7 @@ read_dbx_symtab (struct objfile *objfile) next_file_string_table_offset = file_string_table_offset + nlist.n_value; if (next_file_string_table_offset < file_string_table_offset) - error ("string table offset backs up at %d", symnum); + error (_("string table offset backs up at %d"), symnum); /* FIXME -- replace error() with complaint. */ continue; } @@ -2543,7 +2543,7 @@ read_ofile_symtab (struct partial_symtab *pst) fill_symbuf (abfd); bufp = &symbuf[symbuf_idx]; if (bfd_h_get_8 (abfd, bufp->e_type) != N_SO) - error ("First symbol in segment of executable not a source symbol"); + error (_("First symbol in segment of executable not a source symbol")); max_symnum = sym_size / symbol_size; @@ -3279,7 +3279,7 @@ coffstab_build_psymtabs (struct objfile *objfile, int mainline, DBX_STRINGTAB_SIZE (objfile) = stabstrsize; if (stabstrsize > bfd_get_size (sym_bfd)) - error ("ridiculous string table size: %d bytes", stabstrsize); + error (_("ridiculous string table size: %d bytes"), stabstrsize); DBX_STRINGTAB (objfile) = (char *) obstack_alloc (&objfile->objfile_obstack, stabstrsize + 1); OBJSTAT (objfile, sz_strtab += stabstrsize + 1); @@ -3376,7 +3376,7 @@ elfstab_build_psymtabs (struct objfile *objfile, int mainline, DBX_STAB_SECTION (objfile) = stabsect; if (stabstrsize > bfd_get_size (sym_bfd)) - error ("ridiculous string table size: %d bytes", stabstrsize); + error (_("ridiculous string table size: %d bytes"), stabstrsize); DBX_STRINGTAB (objfile) = (char *) obstack_alloc (&objfile->objfile_obstack, stabstrsize + 1); OBJSTAT (objfile, sz_strtab += stabstrsize + 1); @@ -3450,7 +3450,7 @@ stabsect_build_psymtabs (struct objfile *objfile, int mainline, char *stab_name, return; if (!stabstrsect) - error ("stabsect_build_psymtabs: Found stabs (%s), but not string section (%s)", + error (_("stabsect_build_psymtabs: Found stabs (%s), but not string section (%s)"), stab_name, stabstr_name); objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *) @@ -3459,7 +3459,7 @@ stabsect_build_psymtabs (struct objfile *objfile, int mainline, char *stab_name, text_sect = bfd_get_section_by_name (sym_bfd, text_name); if (!text_sect) - error ("Can't find %s section in symbol file", text_name); + error (_("Can't find %s section in symbol file"), text_name); DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect); DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect); @@ -3470,7 +3470,7 @@ stabsect_build_psymtabs (struct objfile *objfile, int mainline, char *stab_name, DBX_SYMTAB_OFFSET (objfile) = stabsect->filepos; /* XXX - FIXME: POKING INSIDE BFD DATA STRUCTURES */ if (DBX_STRINGTAB_SIZE (objfile) > bfd_get_size (sym_bfd)) - error ("ridiculous string table size: %d bytes", DBX_STRINGTAB_SIZE (objfile)); + error (_("ridiculous string table size: %d bytes"), DBX_STRINGTAB_SIZE (objfile)); DBX_STRINGTAB (objfile) = (char *) obstack_alloc (&objfile->objfile_obstack, DBX_STRINGTAB_SIZE (objfile) + 1); OBJSTAT (objfile, sz_strtab += DBX_STRINGTAB_SIZE (objfile) + 1); diff --git a/gdb/demangle.c b/gdb/demangle.c index 423ae7c..40cdaba 100644 --- a/gdb/demangle.c +++ b/gdb/demangle.c @@ -133,7 +133,7 @@ set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c) savestring ( libiberty_demanglers[0].demangling_style_name, strlen (libiberty_demanglers[0].demangling_style_name)); - warning ("`%s' style demangling chosen as the default.\n", + warning (_("`%s' style demangling chosen as the default."), current_demangling_style_string); } } diff --git a/gdb/doublest.c b/gdb/doublest.c index 2030838..361b4b2 100644 --- a/gdb/doublest.c +++ b/gdb/doublest.c @@ -699,7 +699,7 @@ floatformat_from_length (int len) else format = NULL; if (format == NULL) - error ("Unrecognized %d-bit floating-point type.", + error (_("Unrecognized %d-bit floating-point type."), len * TARGET_CHAR_BIT); return format; } @@ -833,7 +833,7 @@ convert_typed_floating (const void *from, const struct type *from_type, assumption might be wrong on targets that support floating-point types that only differ in endianness for example. So we warn instead, and zero out the target buffer. */ - warning ("Can't convert floating-point number to desired type."); + warning (_("Can't convert floating-point number to desired type.")); memset (to, 0, TYPE_LENGTH (to_type)); } else if (from_fmt == to_fmt) diff --git a/gdb/dsrec.c b/gdb/dsrec.c index 2ca91fe..367b1a7 100644 --- a/gdb/dsrec.c +++ b/gdb/dsrec.c @@ -127,7 +127,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset, if (deprecated_ui_load_progress_hook) if (deprecated_ui_load_progress_hook (section_name, (unsigned long) i)) - error ("Canceled the download"); + error (_("Canceled the download")); } while (waitack != NULL && !waitack ()); @@ -141,7 +141,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset, if (deprecated_ui_load_progress_hook) if (deprecated_ui_load_progress_hook (section_name, (unsigned long) i)) - error ("Canceled the download"); + error (_("Canceled the download")); putchar_unfiltered ('\n'); } diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c index a7cfb22..91590f5 100644 --- a/gdb/dve3900-rom.c +++ b/gdb/dve3900-rom.c @@ -652,7 +652,7 @@ ignore_packet (void) break; } if (len == 8) - error ("Packet header byte not found; %02x seen instead.", c); + error (_("Packet header byte not found; %02x seen instead."), c); /* Read the packet type and length. */ c = debug_readchar (1); /* type */ @@ -885,9 +885,9 @@ r3900_load (char *filename, int from_tty) filename = get_exec_file (1); abfd = bfd_openr (filename, 0); if (!abfd) - error ("Unable to open file %s\n", filename); + error (_("Unable to open file %s."), filename); if (bfd_check_format (abfd, bfd_object) == 0) - error ("File is not an object file\n"); + error (_("File is not an object file.")); /* Output the "vconsi" command to get the monitor in the communication state where it will accept a load command. This will cause diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index a60e5a9..7b9374a 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -87,7 +87,7 @@ void dwarf_expr_pop (struct dwarf_expr_context *ctx) { if (ctx->stack_len <= 0) - error ("dwarf expression stack underflow"); + error (_("dwarf expression stack underflow")); ctx->stack_len--; } @@ -97,7 +97,7 @@ CORE_ADDR dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n) { if (ctx->stack_len < n) - error ("Asked for position %d of stack, stack only has %d elements on it\n", + error (_("Asked for position %d of stack, stack only has %d elements on it."), n, ctx->stack_len); return ctx->stack[ctx->stack_len - (1 + n)]; @@ -150,7 +150,7 @@ read_uleb128 (unsigned char *buf, unsigned char *buf_end, ULONGEST * r) while (1) { if (buf >= buf_end) - error ("read_uleb128: Corrupted DWARF expression."); + error (_("read_uleb128: Corrupted DWARF expression.")); byte = *buf++; result |= (byte & 0x7f) << shift; @@ -176,7 +176,7 @@ read_sleb128 (unsigned char *buf, unsigned char *buf_end, LONGEST * r) while (1) { if (buf >= buf_end) - error ("read_sleb128: Corrupted DWARF expression."); + error (_("read_sleb128: Corrupted DWARF expression.")); byte = *buf++; result |= (byte & 0x7f) << shift; @@ -201,7 +201,7 @@ dwarf2_read_address (unsigned char *buf, unsigned char *buf_end, int *bytes_read CORE_ADDR result; if (buf_end - buf < TARGET_ADDR_BIT / TARGET_CHAR_BIT) - error ("dwarf2_read_address: Corrupted DWARF expression."); + error (_("dwarf2_read_address: Corrupted DWARF expression.")); *bytes_read = TARGET_ADDR_BIT / TARGET_CHAR_BIT; /* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2 @@ -383,8 +383,8 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, case DW_OP_reg30: case DW_OP_reg31: if (op_ptr != op_end && *op_ptr != DW_OP_piece) - error ("DWARF-2 expression error: DW_OP_reg operations must be " - "used either alone or in conjuction with DW_OP_piece."); + error (_("DWARF-2 expression error: DW_OP_reg operations must be " + "used either alone or in conjuction with DW_OP_piece.")); result = op - DW_OP_reg0; ctx->in_reg = 1; @@ -394,8 +394,8 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, case DW_OP_regx: op_ptr = read_uleb128 (op_ptr, op_end, ®); if (op_ptr != op_end && *op_ptr != DW_OP_piece) - error ("DWARF-2 expression error: DW_OP_reg operations must be " - "used either alone or in conjuction with DW_OP_piece."); + error (_("DWARF-2 expression error: DW_OP_reg operations must be " + "used either alone or in conjuction with DW_OP_piece.")); result = reg; ctx->in_reg = 1; @@ -494,7 +494,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, CORE_ADDR t1, t2, t3; if (ctx->stack_len < 3) - error ("Not enough elements for DW_OP_rot. Need 3, have %d\n", + error (_("Not enough elements for DW_OP_rot. Need 3, have %d."), ctx->stack_len); t1 = ctx->stack[ctx->stack_len - 1]; t2 = ctx->stack[ctx->stack_len - 2]; @@ -704,7 +704,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, goto no_push; default: - error ("Unhandled dwarf expression opcode 0x%x", op); + error (_("Unhandled dwarf expression opcode 0x%x"), op); } /* Most things push a result value. */ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index acdbb1c..203ebdd 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -175,7 +175,7 @@ dwarf_expr_frame_base (void *baton, unsigned char **start, size_t * length) } if (*start == NULL) - error ("Could not find the frame base for \"%s\".", + error (_("Could not find the frame base for \"%s\"."), SYMBOL_NATURAL_NAME (framefunc)); } @@ -194,7 +194,7 @@ dwarf_expr_tls_address (void *baton, CORE_ADDR offset) /* It wouldn't be wrong here to try a gdbarch method, too; finding TLS is an ABI-specific thing. But we don't do that yet. */ else - error ("Cannot find thread-local variables on this target"); + error (_("Cannot find thread-local variables on this target")); return addr; } @@ -234,8 +234,8 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame, { /* We haven't implemented splicing together pieces from arbitrary sources yet. */ - error ("The value of variable '%s' is distributed across several\n" - "locations, and GDB cannot access its value.\n", + error (_("The value of variable '%s' is distributed across several\n" + "locations, and GDB cannot access its value.\n"), SYMBOL_NATURAL_NAME (var)); } else if (ctx->in_reg) @@ -353,7 +353,7 @@ dwarf2_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, int size) { if (size == 0) - error ("Symbol \"%s\" has been optimized out.", + error (_("Symbol \"%s\" has been optimized out."), SYMBOL_PRINT_NAME (symbol)); if (size == 1 @@ -380,7 +380,7 @@ dwarf2_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, buf_end = read_sleb128 (data + 1, data + size, &frame_offset); if (buf_end != data + size) - error ("Unexpected opcode after DW_OP_fbreg for symbol \"%s\".", + error (_("Unexpected opcode after DW_OP_fbreg for symbol \"%s\"."), SYMBOL_PRINT_NAME (symbol)); TARGET_VIRTUAL_FRAME_POINTER (ax->scope, &frame_reg, &frame_offset); @@ -393,7 +393,7 @@ dwarf2_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, value->kind = axs_lvalue_memory; } else - error ("Unsupported DWARF opcode in the location of \"%s\".", + error (_("Unsupported DWARF opcode in the location of \"%s\"."), SYMBOL_PRINT_NAME (symbol)); } @@ -512,7 +512,7 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame) data = find_location_expression (dlbaton, &size, frame ? get_frame_pc (frame) : 0); if (data == NULL) - error ("Variable \"%s\" is not available.", SYMBOL_NATURAL_NAME (symbol)); + error (_("Variable \"%s\" is not available."), SYMBOL_NATURAL_NAME (symbol)); val = dwarf2_evaluate_loc_desc (symbol, frame, data, size, dlbaton->objfile); @@ -553,7 +553,7 @@ loclist_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, data = find_location_expression (dlbaton, &size, ax->scope); if (data == NULL) - error ("Variable \"%s\" is not available.", SYMBOL_NATURAL_NAME (symbol)); + error (_("Variable \"%s\" is not available."), SYMBOL_NATURAL_NAME (symbol)); dwarf2_tracepoint_var_ref (symbol, ax, value, data, size); } diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index cc346ff..564d3ac 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1296,21 +1296,21 @@ partial_read_comp_unit_head (struct comp_unit_head *header, char *info_ptr, info_ptr = read_comp_unit_head (header, info_ptr, abfd); if (header->version != 2) - error ("Dwarf Error: wrong version in compilation unit header " - "(is %d, should be %d) [in module %s]", header->version, + error (_("Dwarf Error: wrong version in compilation unit header " + "(is %d, should be %d) [in module %s]"), header->version, 2, bfd_get_filename (abfd)); if (header->abbrev_offset >= dwarf2_per_objfile->abbrev_size) - error ("Dwarf Error: bad offset (0x%lx) in compilation unit header " - "(offset 0x%lx + 6) [in module %s]", + error (_("Dwarf Error: bad offset (0x%lx) in compilation unit header " + "(offset 0x%lx + 6) [in module %s]"), (long) header->abbrev_offset, (long) (beg_of_comp_unit - dwarf2_per_objfile->info_buffer), bfd_get_filename (abfd)); if (beg_of_comp_unit + header->length + header->initial_length_size > dwarf2_per_objfile->info_buffer + dwarf2_per_objfile->info_size) - error ("Dwarf Error: bad length (0x%lx) in compilation unit header " - "(offset 0x%lx + 0) [in module %s]", + error (_("Dwarf Error: bad length (0x%lx) in compilation unit header " + "(offset 0x%lx + 0) [in module %s]"), (long) header->length, (long) (beg_of_comp_unit - dwarf2_per_objfile->info_buffer), bfd_get_filename (abfd)); @@ -2150,7 +2150,7 @@ peek_die_abbrev (char *info_ptr, int *bytes_read, struct dwarf2_cu *cu) abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); if (!abbrev) { - error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number, + error (_("Dwarf Error: Could not find abbrev number %d [in module %s]"), abbrev_number, bfd_get_filename (abfd)); } @@ -2265,7 +2265,7 @@ skip_one_die (char *info_ptr, struct abbrev_info *abbrev, goto skip_attribute; default: - error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + error (_("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]"), dwarf_form_name (form), bfd_get_filename (abfd)); } @@ -2309,7 +2309,7 @@ dwarf2_psymtab_to_symtab (struct partial_symtab *pst) { if (pst->readin) { - warning ("bug: psymtab for %s is already read in.", pst->filename); + warning (_("bug: psymtab for %s is already read in."), pst->filename); } else { @@ -4932,7 +4932,7 @@ dwarf2_read_section (struct objfile *objfile, asection *sectp) if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 || bfd_bread (buf, size, abfd) != size) - error ("Dwarf Error: Can't read DWARF data from '%s'", + error (_("Dwarf Error: Can't read DWARF data from '%s'"), bfd_get_filename (abfd)); return buf; @@ -5543,7 +5543,7 @@ read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr, abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); if (!abbrev) { - error ("Dwarf Error: could not find abbrev number %d [in module %s]", + error (_("Dwarf Error: could not find abbrev number %d [in module %s]"), abbrev_number, bfd_get_filename (abfd)); } @@ -5715,7 +5715,7 @@ read_attribute_value (struct attribute *attr, unsigned form, info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu); break; default: - error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + error (_("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]"), dwarf_form_name (form), bfd_get_filename (abfd)); } @@ -5975,13 +5975,13 @@ read_indirect_string (bfd *abfd, char *buf, if (dwarf2_per_objfile->str_buffer == NULL) { - error ("DW_FORM_strp used without .debug_str section [in module %s]", + error (_("DW_FORM_strp used without .debug_str section [in module %s]"), bfd_get_filename (abfd)); return NULL; } if (str_offset >= dwarf2_per_objfile->str_size) { - error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]", + error (_("DW_FORM_strp pointing outside of .debug_str section [in module %s]"), bfd_get_filename (abfd)); return NULL; } @@ -7115,7 +7115,7 @@ die_type (struct die_info *die, struct dwarf2_cu *cu) if (!type) { dump_die (type_die); - error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]", + error (_("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]"), cu->objfile->name); } return type; @@ -7141,7 +7141,7 @@ die_containing_type (struct die_info *die, struct dwarf2_cu *cu) { if (type_die) dump_die (type_die); - error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]", + error (_("Dwarf Error: Problem turning containing type into gdb type [in module %s]"), cu->objfile->name); } return type; @@ -7160,7 +7160,7 @@ tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) if (!die->type) { dump_die (die); - error ("Dwarf Error: Cannot find type of die [in module %s]", + error (_("Dwarf Error: Cannot find type of die [in module %s]"), cu->objfile->name); } return die->type; @@ -8484,8 +8484,8 @@ follow_die_ref (struct die_info *src_die, struct attribute *attr, die = die->next_ref; } - error ("Dwarf Error: Cannot find DIE at 0x%lx referenced from DIE " - "at 0x%lx [in module %s]", + error (_("Dwarf Error: Cannot find DIE at 0x%lx referenced from DIE " + "at 0x%lx [in module %s]"), (long) src_die->offset, (long) offset, cu->objfile->name); return NULL; @@ -8497,7 +8497,7 @@ dwarf2_fundamental_type (struct objfile *objfile, int typeid, { if (typeid < 0 || typeid >= FT_NUM_MEMBERS) { - error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]", + error (_("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]"), typeid, objfile->name); } @@ -9240,8 +9240,8 @@ dwarf2_find_containing_comp_unit (unsigned long offset, if (dwarf2_per_objfile->all_comp_units[low]->offset > offset) { if (low == 0) - error ("Dwarf Error: could not find partial DIE containing " - "offset 0x%lx [in module %s]", + error (_("Dwarf Error: could not find partial DIE containing " + "offset 0x%lx [in module %s]"), (long) offset, bfd_get_filename (objfile->obfd)); gdb_assert (dwarf2_per_objfile->all_comp_units[low-1]->offset <= offset); @@ -9252,7 +9252,7 @@ dwarf2_find_containing_comp_unit (unsigned long offset, this_cu = dwarf2_per_objfile->all_comp_units[low]; if (low == dwarf2_per_objfile->n_comp_units - 1 && offset >= this_cu->offset + this_cu->length) - error ("invalid dwarf2 offset %ld", offset); + error (_("invalid dwarf2 offset %ld"), offset); gdb_assert (offset < this_cu->offset + this_cu->length); return this_cu; } @@ -9267,7 +9267,7 @@ dwarf2_find_comp_unit (unsigned long offset, struct objfile *objfile) struct dwarf2_per_cu_data *this_cu; this_cu = dwarf2_find_containing_comp_unit (offset, objfile); if (this_cu->offset != offset) - error ("no compilation unit with offset %ld\n", offset); + error (_("no compilation unit with offset %ld."), offset); return this_cu; } diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index f8aa4a8..f36fb1f 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -558,7 +558,7 @@ dwarf_fundamental_type (struct objfile *objfile, int typeid) { if (typeid < 0 || typeid >= FT_NUM_MEMBERS) { - error ("internal error - invalid fundamental type id %d", typeid); + error (_("internal error - invalid fundamental type id %d"), typeid); } /* Look for this particular type in the fundamental type vector. If one is @@ -677,7 +677,7 @@ dwarf_build_psymtabs (struct objfile *objfile, int mainline, file_ptr dbfoff, (bfd_bread (dbbase, dbsize, abfd) != dbsize)) { xfree (dbbase); - error ("can't read DWARF data from '%s'", bfd_get_filename (abfd)); + error (_("can't read DWARF data from '%s'"), bfd_get_filename (abfd)); } back_to = make_cleanup (xfree, dbbase); @@ -2272,7 +2272,7 @@ read_ofile_symtab (struct partial_symtab *pst) (bfd_bread (dbbase, dbsize, abfd) != dbsize)) { xfree (dbbase); - error ("can't read DWARF data"); + error (_("can't read DWARF data")); } back_to = make_cleanup (xfree, dbbase); @@ -2288,7 +2288,7 @@ read_ofile_symtab (struct partial_symtab *pst) (bfd_bread (lnsizedata, sizeof (lnsizedata), abfd) != sizeof (lnsizedata))) { - error ("can't read DWARF line number table size"); + error (_("can't read DWARF line number table size")); } lnsize = target_to_host (lnsizedata, SIZEOF_LINETBL_LENGTH, GET_UNSIGNED, pst->objfile); @@ -2297,7 +2297,7 @@ read_ofile_symtab (struct partial_symtab *pst) (bfd_bread (lnbase, lnsize, abfd) != lnsize)) { xfree (lnbase); - error ("can't read DWARF line numbers"); + error (_("can't read DWARF line numbers")); } make_cleanup (xfree, lnbase); } @@ -2335,7 +2335,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst) { if (pst->readin) { - warning ("psymtab for %s already read in. Shouldn't happen.", + warning (_("psymtab for %s already read in. Shouldn't happen."), pst->filename); } else @@ -2404,7 +2404,7 @@ dwarf_psymtab_to_symtab (struct partial_symtab *pst) { if (pst->readin) { - warning ("psymtab for %s already read in. Shouldn't happen.", + warning (_("psymtab for %s already read in. Shouldn't happen."), pst->filename); } else diff --git a/gdb/elfread.c b/gdb/elfread.c index 7b9c3e6..99ae93c 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -177,7 +177,7 @@ elf_symtab_read (struct objfile *objfile, int dynamic) { storage_needed = bfd_get_symtab_upper_bound (objfile->obfd); if (storage_needed < 0) - error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + error (_("Can't read symbols from %s: %s"), bfd_get_filename (objfile->obfd), bfd_errmsg (bfd_get_error ())); } if (storage_needed > 0) @@ -190,7 +190,7 @@ elf_symtab_read (struct objfile *objfile, int dynamic) else number_of_symbols = bfd_canonicalize_symtab (objfile->obfd, symbol_table); if (number_of_symbols < 0) - error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + error (_("Can't read symbols from %s: %s"), bfd_get_filename (objfile->obfd), bfd_errmsg (bfd_get_error ())); for (i = 0; i < number_of_symbols; i++) @@ -264,7 +264,7 @@ evaluate_struct_tuple (struct value *struct_val, } } } - error ("there is no field named %s", label); + error (_("there is no field named %s"), label); found: ; } @@ -285,11 +285,11 @@ evaluate_struct_tuple (struct value *struct_val, fieldno++; subfieldno = fieldno; if (fieldno >= TYPE_NFIELDS (struct_type)) - error ("too many initializers"); + error (_("too many initializers")); field_type = TYPE_FIELD_TYPE (struct_type, fieldno); if (TYPE_CODE (field_type) == TYPE_CODE_UNION && TYPE_FIELD_NAME (struct_type, fieldno)[0] == '0') - error ("don't know which variant you want to set"); + error (_("don't know which variant you want to set")); } } @@ -358,7 +358,7 @@ init_array_element (struct value *array, struct value *element, low = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); high = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); if (low < low_bound || high > high_bound) - error ("tuple range index out of range"); + error (_("tuple range index out of range")); for (index = low; index <= high; index++) { memcpy (value_contents_raw (array) @@ -370,7 +370,7 @@ init_array_element (struct value *array, struct value *element, { index = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); if (index < low_bound || index > high_bound) - error ("tuple index out of range"); + error (_("tuple index out of range")); memcpy (value_contents_raw (array) + (index - low_bound) * element_size, value_contents (element), element_size); } @@ -410,7 +410,7 @@ evaluate_subexp_standard (struct type *expect_type, &exp->elts[pc + 3].string, noside); if (arg1 == NULL) - error ("There is no field named %s", &exp->elts[pc + 3].string); + error (_("There is no field named %s"), &exp->elts[pc + 3].string); return arg1; case OP_LONG: @@ -451,7 +451,7 @@ evaluate_subexp_standard (struct type *expect_type, struct value *val = value_of_register (regno, get_selected_frame (NULL)); (*pos) += 2; if (val == NULL) - error ("Value of register %s not available.", + error (_("Value of register %s not available."), frame_map_regnum_to_name (get_selected_frame (NULL), regno)); else return val; @@ -544,7 +544,7 @@ evaluate_subexp_standard (struct type *expect_type, { if (index > high_bound) /* to avoid memory corruption */ - error ("Too many array elements"); + error (_("Too many array elements")); memcpy (value_contents_raw (array) + (index - low_bound) * element_size, value_contents (element), @@ -570,7 +570,7 @@ evaluate_subexp_standard (struct type *expect_type, check_type = TYPE_TARGET_TYPE (check_type); if (get_discrete_bounds (element_type, &low_bound, &high_bound) < 0) - error ("(power)set type with unknown size"); + error (_("(power)set type with unknown size")); memset (valaddr, '\0', TYPE_LENGTH (type)); for (tem = 0; tem < nargs; tem++) { @@ -604,18 +604,18 @@ evaluate_subexp_standard (struct type *expect_type, (TYPE_CODE (range_low_type) == TYPE_CODE_ENUM && (range_low_type != range_high_type))) /* different element modes */ - error ("POWERSET tuple elements of different mode"); + error (_("POWERSET tuple elements of different mode")); if ((TYPE_CODE (check_type) != TYPE_CODE (range_low_type)) || (TYPE_CODE (check_type) == TYPE_CODE_ENUM && range_low_type != check_type)) - error ("incompatible POWERSET tuple elements"); + error (_("incompatible POWERSET tuple elements")); if (range_low > range_high) { - warning ("empty POWERSET tuple range"); + warning (_("empty POWERSET tuple range")); continue; } if (range_low < low_bound || range_high > high_bound) - error ("POWERSET tuple element out of range"); + error (_("POWERSET tuple element out of range")); range_low -= low_bound; range_high -= low_bound; for (; range_low <= range_high; range_low++) @@ -779,14 +779,14 @@ evaluate_subexp_standard (struct type *expect_type, responds_selector = lookup_child_selector ("respondsTo:"); if (responds_selector == 0) - error ("no 'respondsTo:' or 'respondsToSelector:' method"); + error (_("no 'respondsTo:' or 'respondsToSelector:' method")); method_selector = lookup_child_selector ("methodForSelector:"); if (method_selector == 0) method_selector = lookup_child_selector ("methodFor:"); if (method_selector == 0) - error ("no 'methodFor:' or 'methodForSelector:' method"); + error (_("no 'methodFor:' or 'methodForSelector:' method")); /* Call the verification method, to make sure that the target class implements the desired method. */ @@ -805,7 +805,7 @@ evaluate_subexp_standard (struct type *expect_type, ret = call_function_by_hand (argvec[0], 3, argvec + 1); } if (value_as_long (ret) == 0) - error ("Target does not respond to this message selector."); + error (_("Target does not respond to this message selector.")); /* Call "methodForSelector:" method, to get the address of a function method that implements this selector for this @@ -887,7 +887,7 @@ evaluate_subexp_standard (struct type *expect_type, if (method) { if (TYPE_CODE (value_type (method)) != TYPE_CODE_FUNC) - error ("method address has symbol information with non-function type; skipping"); + error (_("method address has symbol information with non-function type; skipping")); if (struct_return) VALUE_ADDRESS (method) = value_as_address (msg_send_stret); else @@ -928,7 +928,7 @@ evaluate_subexp_standard (struct type *expect_type, return allocate_value (type); } else - error ("Expression of type other than \"method returning ...\" used as a method"); + error (_("Expression of type other than \"method returning ...\" used as a method")); } /* Now depending on whether we found a symbol for the method, @@ -972,7 +972,7 @@ evaluate_subexp_standard (struct type *expect_type, to the function, but possibly to some thunk. */ if (deprecated_hp_som_som_object_present) { - error ("Not implemented: function invocation through pointer to method with HP aCC"); + error (_("Not implemented: function invocation through pointer to method with HP aCC")); } nargs++; @@ -1027,7 +1027,7 @@ evaluate_subexp_standard (struct type *expect_type, } } if (i < 0) - error ("virtual function at index %d not found", fnoffset); + error (_("virtual function at index %d not found"), fnoffset); } else { @@ -1208,7 +1208,7 @@ evaluate_subexp_standard (struct type *expect_type, if (noside == EVAL_SKIP) goto nosideret; if (argvec[0] == NULL) - error ("Cannot evaluate function -- may be inlined"); + error (_("Cannot evaluate function -- may be inlined")); if (noside == EVAL_AVOID_SIDE_EFFECTS) { /* If the return type doesn't look like a function type, call an @@ -1224,7 +1224,7 @@ evaluate_subexp_standard (struct type *expect_type, if (ftype) return allocate_value (TYPE_TARGET_TYPE (value_type (argvec[0]))); else - error ("Expression of type other than \"Function returning ...\" used as function"); + error (_("Expression of type other than \"Function returning ...\" used as function")); } return call_function_by_hand (argvec[0], nargs, argvec + 1); /* pai: FIXME save value from call_function_by_hand, then adjust pc by adjust_fn_pc if +ve */ @@ -1268,7 +1268,7 @@ evaluate_subexp_standard (struct type *expect_type, goto do_call_it; default: - error ("Cannot perform substring on this type"); + error (_("Cannot perform substring on this type")); } op_f77_substr: @@ -1369,7 +1369,7 @@ evaluate_subexp_standard (struct type *expect_type, if (deprecated_hp_som_som_object_present && (TYPE_CODE (value_type (arg2)) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (value_type (arg2))) == TYPE_CODE_METHOD)) - error ("Pointers to methods not supported with HP aCC"); /* 1997-08-19 */ + error (_("Pointers to methods not supported with HP aCC")); /* 1997-08-19 */ mem_offset = value_as_long (arg2); goto handle_pointer_to_member; @@ -1382,7 +1382,7 @@ evaluate_subexp_standard (struct type *expect_type, if (deprecated_hp_som_som_object_present && (TYPE_CODE (value_type (arg2)) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (value_type (arg2))) == TYPE_CODE_METHOD)) - error ("Pointers to methods not supported with HP aCC"); /* 1997-08-19 */ + error (_("Pointers to methods not supported with HP aCC")); /* 1997-08-19 */ mem_offset = value_as_long (arg2); @@ -1392,7 +1392,7 @@ evaluate_subexp_standard (struct type *expect_type, if (deprecated_hp_som_som_object_present) { if (!mem_offset) /* no bias -> really null */ - error ("Attempted dereference of null pointer-to-member"); + error (_("Attempted dereference of null pointer-to-member")); mem_offset &= ~0x20000000; } if (noside == EVAL_SKIP) @@ -1402,7 +1402,7 @@ evaluate_subexp_standard (struct type *expect_type, goto bad_pointer_to_member; type = check_typedef (TYPE_TARGET_TYPE (type)); if (TYPE_CODE (type) == TYPE_CODE_METHOD) - error ("not implemented: pointer-to-method in pointer-to-member construct"); + error (_("not implemented: pointer-to-method in pointer-to-member construct")); if (TYPE_CODE (type) != TYPE_CODE_MEMBER) goto bad_pointer_to_member; /* Now, convert these values to an address. */ @@ -1412,7 +1412,7 @@ evaluate_subexp_standard (struct type *expect_type, value_as_long (arg1) + mem_offset); return value_ind (arg3); bad_pointer_to_member: - error ("non-pointer-to-member value used in pointer-to-member construct"); + error (_("non-pointer-to-member value used in pointer-to-member construct")); case BINOP_CONCAT: arg1 = evaluate_subexp_with_coercion (exp, pos, noside); @@ -1437,7 +1437,7 @@ evaluate_subexp_standard (struct type *expect_type, of the function as it would be in a naive implementation. */ if ((TYPE_CODE (value_type (arg1)) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (value_type (arg1))) == TYPE_CODE_METHOD)) - error ("Assignment to pointers to methods not implemented with HP aCC"); + error (_("Assignment to pointers to methods not implemented with HP aCC")); /* HP aCC pointers to data members require a constant bias */ if ((TYPE_CODE (value_type (arg1)) == TYPE_CODE_PTR) && @@ -1518,7 +1518,7 @@ evaluate_subexp_standard (struct type *expect_type, arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) goto nosideret; - error ("':' operator used in invalid context"); + error (_("':' operator used in invalid context")); case BINOP_SUBSCRIPT: arg1 = evaluate_subexp_with_coercion (exp, pos, noside); @@ -1539,10 +1539,10 @@ evaluate_subexp_standard (struct type *expect_type, && TYPE_CODE (type) != TYPE_CODE_PTR) { if (TYPE_NAME (type)) - error ("cannot subscript something of type `%s'", + error (_("cannot subscript something of type `%s'"), TYPE_NAME (type)); else - error ("cannot subscript requested type"); + error (_("cannot subscript requested type")); } if (noside == EVAL_AVOID_SIDE_EFFECTS) @@ -1593,7 +1593,7 @@ evaluate_subexp_standard (struct type *expect_type, } else { - error ("cannot subscript something of type `%s'", + error (_("cannot subscript something of type `%s'"), TYPE_NAME (value_type (arg1))); } } @@ -1618,13 +1618,13 @@ evaluate_subexp_standard (struct type *expect_type, int offset_item; /* The array offset where the item lives */ if (nargs > MAX_FORTRAN_DIMS) - error ("Too many subscripts for F77 (%d Max)", MAX_FORTRAN_DIMS); + error (_("Too many subscripts for F77 (%d Max)"), MAX_FORTRAN_DIMS); tmp_type = check_typedef (value_type (arg1)); ndimensions = calc_f77_array_dims (type); if (nargs != ndimensions) - error ("Wrong number of subscripts"); + error (_("Wrong number of subscripts")); /* Now that we know we have a legal array subscript expression let us actually find out where this element exists in the array. */ @@ -1646,11 +1646,11 @@ evaluate_subexp_standard (struct type *expect_type, { retcode = f77_get_dynamic_upperbound (tmp_type, &upper); if (retcode == BOUND_FETCH_ERROR) - error ("Cannot obtain dynamic upper bound"); + error (_("Cannot obtain dynamic upper bound")); retcode = f77_get_dynamic_lowerbound (tmp_type, &lower); if (retcode == BOUND_FETCH_ERROR) - error ("Cannot obtain dynamic lower bound"); + error (_("Cannot obtain dynamic lower bound")); array_size_array[nargs - i - 1] = upper - lower + 1; @@ -1842,7 +1842,7 @@ evaluate_subexp_standard (struct type *expect_type, goto nosideret; type = check_typedef (value_type (arg2)); if (TYPE_CODE (type) != TYPE_CODE_INT) - error ("Non-integral right operand for \"@\" operator."); + error (_("Non-integral right operand for \"@\" operator.")); if (noside == EVAL_AVOID_SIDE_EFFECTS) { return allocate_repeat_value (value_type (arg1), @@ -1893,7 +1893,7 @@ evaluate_subexp_standard (struct type *expect_type, if ((TYPE_TARGET_TYPE (value_type (arg1))) && ((TYPE_CODE (TYPE_TARGET_TYPE (value_type (arg1))) == TYPE_CODE_METHOD) || (TYPE_CODE (TYPE_TARGET_TYPE (value_type (arg1))) == TYPE_CODE_MEMBER))) - error ("Attempt to dereference pointer to member without an object"); + error (_("Attempt to dereference pointer to member without an object")); if (noside == EVAL_SKIP) goto nosideret; if (unop_user_defined_p (op, arg1)) @@ -1912,7 +1912,7 @@ evaluate_subexp_standard (struct type *expect_type, /* GDB allows dereferencing an int. */ return value_zero (builtin_type_int, lval_memory); else - error ("Attempt to take contents of a non-pointer value."); + error (_("Attempt to take contents of a non-pointer value.")); } return value_ind (arg1); @@ -2046,7 +2046,7 @@ evaluate_subexp_standard (struct type *expect_type, return value_of_local ("self", 1); case OP_TYPE: - error ("Attempt to use a type name as an expression"); + error (_("Attempt to use a type name as an expression")); default: /* Removing this case and compiling with gcc -Wall reveals that @@ -2058,8 +2058,8 @@ evaluate_subexp_standard (struct type *expect_type, then they should be separate cases, with more descriptive error messages. */ - error ("\ -GDB does not (yet) know how to evaluate that kind of expression"); + error (_("\ +GDB does not (yet) know how to evaluate that kind of expression")); } nosideret: @@ -2114,7 +2114,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos, || sym_class == LOC_CONST_BYTES || sym_class == LOC_REGISTER || sym_class == LOC_REGPARM) - error ("Attempt to take address of register or constant."); + error (_("Attempt to take address of register or constant.")); return value_zero (type, not_lval); @@ -2134,7 +2134,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos, return value_zero (lookup_pointer_type (value_type (x)), not_lval); else - error ("Attempt to take address of non-lval"); + error (_("Attempt to take address of non-lval")); } return value_addr (evaluate_subexp (NULL_TYPE, exp, pos, noside)); } @@ -2214,7 +2214,7 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos) if (TYPE_CODE (type) != TYPE_CODE_PTR && TYPE_CODE (type) != TYPE_CODE_REF && TYPE_CODE (type) != TYPE_CODE_ARRAY) - error ("Attempt to take contents of a non-pointer value."); + error (_("Attempt to take contents of a non-pointer value.")); type = check_typedef (TYPE_TARGET_TYPE (type)); return value_from_longest (builtin_type_int, (LONGEST) TYPE_LENGTH (type)); @@ -2252,7 +2252,7 @@ parse_and_eval_type (char *p, int length) tmp[length + 3] = '\0'; expr = parse_expression (tmp); if (expr->elts[0].opcode != UNOP_CAST) - error ("Internal error in eval_type."); + error (_("Internal error in eval_type.")); return expr->elts[1].type; } @@ -2263,7 +2263,7 @@ calc_f77_array_dims (struct type *array_type) struct type *tmp_type; if ((TYPE_CODE (array_type) != TYPE_CODE_ARRAY)) - error ("Can't get dimensions for a non-array type"); + error (_("Can't get dimensions for a non-array type")); tmp_type = array_type; diff --git a/gdb/event-top.c b/gdb/event-top.c index 1d961c2..3540343 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -325,7 +325,7 @@ change_annotation_level (void) { /* The prompt stack has not been initialized to "", we are using gdb w/o the --async switch */ - warning ("Command has same effect as set annotate"); + warning (_("Command has same effect as set annotate")); return; } @@ -1056,7 +1056,7 @@ async_float_handler (gdb_client_data arg) { /* This message is based on ANSI C, section 4.7. Note that integer divide by zero causes this, so "float" is a misnomer. */ - error ("Erroneous arithmetic operation."); + error (_("Erroneous arithmetic operation.")); } /* Tell the event loop what to do if SIGWINCH is received. @@ -110,7 +110,7 @@ exec_close (int quitting) else if (vp->bfd != exec_bfd) /* FIXME-leak: We should be freeing vp->name too, I think. */ if (!bfd_close (vp->bfd)) - warning ("cannot close \"%s\": %s", + warning (_("cannot close \"%s\": %s"), vp->name, bfd_errmsg (bfd_get_error ())); /* FIXME: This routine is #if 0'd in symfile.c. What should we @@ -129,7 +129,7 @@ exec_close (int quitting) char *name = bfd_get_filename (exec_bfd); if (!bfd_close (exec_bfd)) - warning ("cannot close \"%s\": %s", + warning (_("cannot close \"%s\": %s"), name, bfd_errmsg (bfd_get_error ())); xfree (name); exec_bfd = NULL; @@ -208,7 +208,7 @@ exec_file_attach (char *filename, int from_tty) exec_bfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan); if (!exec_bfd) - error ("\"%s\": could not open as an executable file: %s", + error (_("\"%s\": could not open as an executable file: %s"), scratch_pathname, bfd_errmsg (bfd_get_error ())); /* At this point, scratch_pathname and exec_bfd->name both point to the @@ -223,7 +223,7 @@ exec_file_attach (char *filename, int from_tty) /* Make sure to close exec_bfd, or else "run" might try to use it. */ exec_close (0); - error ("\"%s\": not in executable format: %s", + error (_("\"%s\": not in executable format: %s"), scratch_pathname, bfd_errmsg (bfd_get_error ())); } @@ -238,7 +238,7 @@ exec_file_attach (char *filename, int from_tty) /* Make sure to close exec_bfd, or else "run" might try to use it. */ exec_close (0); - error ("\"%s\": can't find the file sections: %s", + error (_("\"%s\": can't find the file sections: %s"), scratch_pathname, bfd_errmsg (bfd_get_error ())); } #endif /* DEPRECATED_IBM6000_TARGET */ @@ -249,7 +249,7 @@ exec_file_attach (char *filename, int from_tty) /* Make sure to close exec_bfd, or else "run" might try to use it. */ exec_close (0); - error ("\"%s\": can't find the file sections: %s", + error (_("\"%s\": can't find the file sections: %s"), scratch_pathname, bfd_errmsg (bfd_get_error ())); } @@ -301,7 +301,7 @@ exec_file_command (char *args, int from_tty) {; } if (*argv == NULL) - error ("No executable file name was specified"); + error (_("No executable file name was specified")); filename = tilde_expand (*argv); make_cleanup (xfree, filename); @@ -633,7 +633,7 @@ set_section_command (char *args, int from_tty) long offset; if (args == 0) - error ("Must specify section name and its virtual address"); + error (_("Must specify section name and its virtual address")); /* Parse out section name */ for (secname = args; !isspace (*args); args++); @@ -659,7 +659,7 @@ set_section_command (char *args, int from_tty) seclen = sizeof (secprint) - 1; strncpy (secprint, secname, seclen); secprint[seclen] = '\0'; - error ("Section %s not found", secprint); + error (_("Section %s not found"), secprint); } /* If mourn is being called in all the right places, this could be say @@ -755,5 +755,5 @@ file itself are wrong. Each section must be changed separately. The\n\ static char * exec_make_note_section (bfd *obfd, int *note_size) { - error ("Can't create a corefile"); + error (_("Can't create a corefile")); } diff --git a/gdb/expprint.c b/gdb/expprint.c index 3131044..13f7c8c 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -205,7 +205,7 @@ print_subexp_standard (struct expression *exp, int *pos, if (0 == target_read_string (exp->elts[pc + 1].longconst, &selector, 1024, NULL)) { - error ("bad selector"); + error (_("bad selector")); return; } if (nargs) @@ -418,7 +418,7 @@ print_subexp_standard (struct expression *exp, int *pos, if (op_print_tab[tem].opcode != opcode) /* Not found; don't try to keep going because we don't know how to interpret further elements. */ - error ("Invalid expression"); + error (_("Invalid expression")); break; /* C++ ops */ @@ -462,7 +462,7 @@ print_subexp_standard (struct expression *exp, int *pos, case BINOP_INCL: case BINOP_EXCL: - error ("print_subexp: Not implemented."); + error (_("print_subexp: Not implemented.")); /* Default ops */ @@ -480,7 +480,7 @@ print_subexp_standard (struct expression *exp, int *pos, /* Not found; don't try to keep going because we don't know how to interpret further elements. For example, this happens if opcode is OP_TYPE. */ - error ("Invalid expression"); + error (_("Invalid expression")); } /* Note that PREC_BUILTIN will always emit parentheses. */ diff --git a/gdb/f-lang.c b/gdb/f-lang.c index 811ac54..2d779d7 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -394,7 +394,7 @@ f_create_fundamental_type (struct objfile *objfile, int typeid) type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "<?type?>", objfile); - warning ("internal error: no F77 fundamental type %d", typeid); + warning (_("internal error: no F77 fundamental type %d"), typeid); break; } return (type); @@ -685,7 +685,7 @@ add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab) if (c) *c = '\0'; else - error ("Malformed function STAB found in add_common_block()"); + error (_("Malformed function STAB found in add_common_block()")); tmp->owning_function = xmalloc (strlen (local_copy_func_stab) + 1); @@ -733,7 +733,7 @@ add_common_entry (struct symbol *entry_sym_ptr) tmp->symbol = entry_sym_ptr; if (current_common == NULL) - error ("Attempt to add COMMON entry with no block open!"); + error (_("Attempt to add COMMON entry with no block open!")); else { if (current_common->entries == NULL) diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index 9e148fb..2923bff 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c @@ -400,7 +400,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show, if (TYPE_NAME (type) != NULL) fputs_filtered (TYPE_NAME (type), stream); else - error ("Invalid type code (%d) in symbol table.", TYPE_CODE (type)); + error (_("Invalid type code (%d) in symbol table."), TYPE_CODE (type)); break; } } diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 6196628..69e7da0 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -91,7 +91,7 @@ f77_get_dynamic_lowerbound (struct type *type, int *lower_bound) break; case BOUND_CANNOT_BE_DETERMINED: - error ("Lower bound may not be '*' in F77"); + error (_("Lower bound may not be '*' in F77")); break; case BOUND_BY_REF_ON_STACK: @@ -114,7 +114,7 @@ f77_get_dynamic_lowerbound (struct type *type, int *lower_bound) case BOUND_BY_REF_IN_REG: case BOUND_BY_VALUE_IN_REG: default: - error ("??? unhandled dynamic array bound type ???"); + error (_("??? unhandled dynamic array bound type ???")); break; } return BOUND_FETCH_OK; @@ -177,7 +177,7 @@ f77_get_dynamic_upperbound (struct type *type, int *upper_bound) case BOUND_BY_REF_IN_REG: case BOUND_BY_VALUE_IN_REG: default: - error ("??? unhandled dynamic array bound type ???"); + error (_("??? unhandled dynamic array bound type ???")); break; } return BOUND_FETCH_OK; @@ -208,11 +208,11 @@ f77_get_dynamic_length_of_aggregate (struct type *type) /* Recursion ends here, start setting up lengths. */ retcode = f77_get_dynamic_lowerbound (type, &lower_bound); if (retcode == BOUND_FETCH_ERROR) - error ("Cannot obtain valid array lower bound"); + error (_("Cannot obtain valid array lower bound")); retcode = f77_get_dynamic_upperbound (type, &upper_bound); if (retcode == BOUND_FETCH_ERROR) - error ("Cannot obtain valid array upper bound"); + error (_("Cannot obtain valid array upper bound")); /* Patch in a valid length value. */ @@ -240,11 +240,11 @@ f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream) retcode = f77_get_dynamic_upperbound (tmp_type, &upper); if (retcode == BOUND_FETCH_ERROR) - error ("Cannot obtain dynamic upper bound"); + error (_("Cannot obtain dynamic upper bound")); retcode = f77_get_dynamic_lowerbound (tmp_type, &lower); if (retcode == BOUND_FETCH_ERROR) - error ("Cannot obtain dynamic lower bound"); + error (_("Cannot obtain dynamic lower bound")); F77_DIM_SIZE (ndimen) = upper - lower + 1; @@ -330,7 +330,7 @@ f77_print_array (struct type *type, const bfd_byte *valaddr, ndimensions = calc_f77_array_dims (type); if (ndimensions > MAX_FORTRAN_DIMS || ndimensions < 0) - error ("Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)", + error (_("Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"), ndimensions, MAX_FORTRAN_DIMS); /* Since F77 arrays are stored column-major, we set up an @@ -532,7 +532,7 @@ f_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset, break; default: - error ("Logicals of length %d bytes not supported", + error (_("Logicals of length %d bytes not supported"), TYPE_LENGTH (type)); } @@ -567,7 +567,7 @@ f_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset, type = builtin_type_f_real_s16; break; default: - error ("Cannot print out complex*%d variables", TYPE_LENGTH (type)); + error (_("Cannot print out complex*%d variables"), TYPE_LENGTH (type)); } fputs_filtered ("(", stream); print_floating (valaddr, type, stream); @@ -584,7 +584,7 @@ f_val_print (struct type *type, const bfd_byte *valaddr, int embedded_offset, break; default: - error ("Invalid F77 type code %d in symbol table.", TYPE_CODE (type)); + error (_("Invalid F77 type code %d in symbol table."), TYPE_CODE (type)); } gdb_flush (stream); return 0; @@ -629,7 +629,7 @@ info_common_command (char *comname, int from_tty) fi = deprecated_selected_frame; if (fi == NULL) - error ("No frame selected"); + error (_("No frame selected")); /* The following is generally ripped off from stack.c's routine print_frame_info() */ @@ -716,12 +716,12 @@ there_is_a_visible_common_named (char *comname) struct symbol *func; if (comname == NULL) - error ("Cannot deal with NULL common name!"); + error (_("Cannot deal with NULL common name!")); fi = deprecated_selected_frame; if (fi == NULL) - error ("No frame selected"); + error (_("No frame selected")); /* The following is generally ripped off from stack.c's routine print_frame_info() */ diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index b7045d4..2b19f70 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -93,7 +93,7 @@ fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long, mapfilename = xstrprintf ("/proc/%ld/map", (long) pid); mapfile = fopen (mapfilename, "r"); if (mapfile == NULL) - error ("Couldn't open %s\n", mapfilename); + error (_("Couldn't open %s."), mapfilename); if (info_verbose) fprintf_filtered (gdb_stdout, diff --git a/gdb/findvar.c b/gdb/findvar.c index 9675fc5..fb9217d 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -57,8 +57,8 @@ extract_signed_integer (const void *addr, int len) const unsigned char *endaddr = startaddr + len; if (len > (int) sizeof (LONGEST)) - error ("\ -That operation is not available on integers of more than %d bytes.", + error (_("\ +That operation is not available on integers of more than %d bytes."), (int) sizeof (LONGEST)); /* Start at the most significant end of the integer, and work towards @@ -91,8 +91,8 @@ extract_unsigned_integer (const void *addr, int len) const unsigned char *endaddr = startaddr + len; if (len > (int) sizeof (ULONGEST)) - error ("\ -That operation is not available on integers of more than %d bytes.", + error (_("\ +That operation is not available on integers of more than %d bytes."), (int) sizeof (ULONGEST)); /* Start at the most significant end of the integer, and work towards @@ -445,9 +445,9 @@ read_var_value (struct symbol *var, struct frame_info *frame) CORE_ADDR locaddr; struct value *loc; if (!target_has_execution) - error ("\ + error (_("\ Attempt to access variable defined in different shared object or load module when\n\ -addresses have not been bound by the dynamic loader. Try again when executable is running."); +addresses have not been bound by the dynamic loader. Try again when executable is running.")); locaddr = SYMBOL_VALUE_ADDRESS (var); loc = value_at (lookup_pointer_type (type), locaddr); @@ -495,14 +495,14 @@ addresses have not been bound by the dynamic loader. Try again when executable i regval = value_from_register (lookup_pointer_type (type), SYMBOL_BASEREG (var), frame); if (regval == NULL) - error ("Value of base register not available."); + error (_("Value of base register not available.")); addr = value_as_address (regval); addr += SYMBOL_VALUE (var); break; } case LOC_TYPEDEF: - error ("Cannot look up value of a typedef"); + error (_("Cannot look up value of a typedef")); break; case LOC_BLOCK: @@ -532,7 +532,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i frame); if (regval == NULL) - error ("Value of register variable not available."); + error (_("Value of register variable not available.")); addr = value_as_address (regval); VALUE_LVAL (v) = lval_memory; @@ -542,7 +542,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i regval = value_from_register (type, regno, frame); if (regval == NULL) - error ("Value of register variable not available."); + error (_("Value of register variable not available.")); return regval; } } @@ -580,7 +580,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i return v; default: - error ("Cannot look up value of a botched symbol."); + error (_("Cannot look up value of a botched symbol.")); break; } @@ -736,7 +736,7 @@ locate_var_value (struct symbol *var, struct frame_info *frame) lazy_value = read_var_value (var, frame); if (lazy_value == 0) - error ("Address of \"%s\" is unknown.", SYMBOL_PRINT_NAME (var)); + error (_("Address of \"%s\" is unknown."), SYMBOL_PRINT_NAME (var)); if (value_lazy (lazy_value) || TYPE_CODE (type) == TYPE_CODE_FUNC) @@ -754,14 +754,14 @@ locate_var_value (struct symbol *var, struct frame_info *frame) case lval_register: gdb_assert (REGISTER_NAME (VALUE_REGNUM (lazy_value)) != NULL && *REGISTER_NAME (VALUE_REGNUM (lazy_value)) != '\0'); - error("Address requested for identifier " - "\"%s\" which is in register $%s", + error (_("Address requested for identifier " + "\"%s\" which is in register $%s"), SYMBOL_PRINT_NAME (var), REGISTER_NAME (VALUE_REGNUM (lazy_value))); break; default: - error ("Can't take address of \"%s\" which isn't an lvalue.", + error (_("Can't take address of \"%s\" which isn't an lvalue."), SYMBOL_PRINT_NAME (var)); break; } diff --git a/gdb/frame.c b/gdb/frame.c index bcc5516..bfa9380 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -654,7 +654,7 @@ put_frame_register (struct frame_info *frame, int regnum, const void *buf) CORE_ADDR addr; frame_register (frame, regnum, &optim, &lval, &addr, &realnum, NULL); if (optim) - error ("Attempt to assign to a value that was optimized out."); + error (_("Attempt to assign to a value that was optimized out.")); switch (lval) { case lval_memory: @@ -670,7 +670,7 @@ put_frame_register (struct frame_info *frame, int regnum, const void *buf) regcache_cooked_write (current_regcache, realnum, buf); break; default: - error ("Attempt to assign to an unmodifiable value."); + error (_("Attempt to assign to an unmodifiable value.")); } } @@ -793,11 +793,11 @@ get_current_frame (void) explicitly checks that ``print $pc'' with no registers prints "No registers". */ if (!target_has_registers) - error ("No registers."); + error (_("No registers.")); if (!target_has_stack) - error ("No stack."); + error (_("No stack.")); if (!target_has_memory) - error ("No memory."); + error (_("No memory.")); if (current_frame == NULL) { struct frame_info *sentinel_frame = @@ -830,7 +830,7 @@ get_selected_frame (const char *message) if (message != NULL && (!target_has_registers || !target_has_stack || !target_has_memory)) - error ("%s", message); + error (("%s"), message); /* Hey! Don't trust this. It should really be re-finding the last selected frame of the currently selected thread. This, though, is better than nothing. */ @@ -1043,14 +1043,14 @@ get_prev_frame_1 (struct frame_info *this_frame) if (this_frame->next->level >= 0 && this_frame->next->unwind->type != SIGTRAMP_FRAME && frame_id_inner (this_id, get_frame_id (this_frame->next))) - error ("Previous frame inner to this frame (corrupt stack?)"); + error (_("Previous frame inner to this frame (corrupt stack?)")); /* Check that this and the next frame are not identical. If they are, there is most likely a stack cycle. As with the inner-than test above, avoid comparing the inner-most and sentinel frames. */ if (this_frame->level > 0 && frame_id_eq (this_id, get_frame_id (this_frame->next))) - error ("Previous frame identical to this frame (corrupt stack?)"); + error (_("Previous frame identical to this frame (corrupt stack?)")); /* Allocate the new frame but do not wire it in to the frame chain. Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along @@ -1225,7 +1225,7 @@ get_prev_frame (struct frame_info *this_frame) if (this_frame->level > backtrace_limit) { - error ("Backtrace limit of %d exceeded", backtrace_limit); + error (_("Backtrace limit of %d exceeded"), backtrace_limit); } /* If we're already inside the entry function for the main objfile, diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c index b365915..850c143 100644 --- a/gdb/frv-linux-tdep.c +++ b/gdb/frv-linux-tdep.c @@ -188,7 +188,7 @@ frv_linux_sigcontext_reg_addr (struct frame_info *next_frame, int regno, a sigcontext struct starting 12 bytes in. */ if (target_read_memory (sp + 12, buf, sizeof buf) != 0) { - warning ("Can't read realtime sigtramp frame."); + warning (_("Can't read realtime sigtramp frame.")); return 0; } sc_addr = extract_unsigned_integer (buf, sizeof buf); diff --git a/gdb/gcore.c b/gdb/gcore.c index 3b3a259..943dea9 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -68,7 +68,7 @@ gcore_command (char *args, int from_tty) /* Open the output file. */ obfd = bfd_openw (corefilename, default_gcore_target ()); if (!obfd) - error ("Failed to open '%s' for output.", corefilename); + error (_("Failed to open '%s' for output."), corefilename); /* Need a cleanup that will close the file (FIXME: delete it?). */ old_chain = make_cleanup_bfd_close (obfd); @@ -84,7 +84,7 @@ gcore_command (char *args, int from_tty) { note_sec = bfd_make_section_anyway (obfd, "note0"); if (note_sec == NULL) - error ("Failed to create 'note' section for corefile: %s", + error (_("Failed to create 'note' section for corefile: %s"), bfd_errmsg (bfd_get_error ())); bfd_set_section_vma (obfd, note_sec, 0); @@ -96,13 +96,13 @@ gcore_command (char *args, int from_tty) /* Now create the memory/load sections. */ if (gcore_memory_sections (obfd) == 0) - error ("gcore: failed to get corefile memory sections from target."); + error (_("gcore: failed to get corefile memory sections from target.")); /* Write out the contents of the note section. */ if (note_data != NULL && note_size != 0) { if (!bfd_set_section_contents (obfd, note_sec, note_data, 0, note_size)) - warning ("writing note section (%s)", bfd_errmsg (bfd_get_error ())); + warning (_("writing note section (%s)"), bfd_errmsg (bfd_get_error ())); } /* Succeeded. */ @@ -126,7 +126,7 @@ default_gcore_mach (void) return bfdarch->mach; #endif /* TARGET_ARCHITECTURE */ if (exec_bfd == NULL) - error ("Can't find default bfd machine type (need execfile)."); + error (_("Can't find default bfd machine type (need execfile).")); return bfd_get_mach (exec_bfd); #endif /* 1 */ @@ -142,7 +142,7 @@ default_gcore_arch (void) return bfdarch->arch; #endif if (exec_bfd == NULL) - error ("Can't find bfd architecture for corefile (need execfile)."); + error (_("Can't find bfd architecture for corefile (need execfile).")); return bfd_get_arch (exec_bfd); } @@ -371,7 +371,7 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, osec = bfd_make_section_anyway (obfd, "load"); if (osec == NULL) { - warning ("Couldn't make gcore segment: %s", + warning (_("Couldn't make gcore segment: %s"), bfd_errmsg (bfd_get_error ())); return 1; } @@ -459,15 +459,15 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored) memhunk = xmalloc (size); /* ??? This is crap since xmalloc should never return NULL. */ if (memhunk == NULL) - error ("Not enough memory to create corefile."); + error (_("Not enough memory to create corefile.")); old_chain = make_cleanup (xfree, memhunk); if (target_read_memory (bfd_section_vma (obfd, osec), memhunk, size) != 0) - warning ("Memory read failed for corefile section, %s bytes at 0x%s\n", + warning (_("Memory read failed for corefile section, %s bytes at 0x%s."), paddr_d (size), paddr (bfd_section_vma (obfd, osec))); if (!bfd_set_section_contents (obfd, osec, memhunk, 0, size)) - warning ("Failed to write corefile contents (%s).", + warning (_("Failed to write corefile contents (%s)."), bfd_errmsg (bfd_get_error ())); do_cleanups (old_chain); /* Frees MEMHUNK. */ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 3b0c48a..06be9b5 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -411,7 +411,7 @@ address_space_name_to_int (char *space_identifier) &type_flags)) return type_flags; else - error ("Unknown address space specifier: \"%s\"", space_identifier); + error (_("Unknown address space specifier: \"%s\""), space_identifier); } /* Identify address space identifier by integer flag as defined in @@ -1075,7 +1075,7 @@ lookup_typename (char *name, struct block *block, int noerr) } else { - error ("No type named %s.", name); + error (_("No type named %s."), name); } } return (SYMBOL_TYPE (sym)); @@ -1119,11 +1119,11 @@ lookup_struct (char *name, struct block *block) if (sym == NULL) { - error ("No struct type named %s.", name); + error (_("No struct type named %s."), name); } if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_STRUCT) { - error ("This context has class, union or enum %s, not a struct.", name); + error (_("This context has class, union or enum %s, not a struct."), name); } return (SYMBOL_TYPE (sym)); } @@ -1141,7 +1141,7 @@ lookup_union (char *name, struct block *block) (struct symtab **) NULL); if (sym == NULL) - error ("No union type named %s.", name); + error (_("No union type named %s."), name); t = SYMBOL_TYPE (sym); @@ -1156,7 +1156,7 @@ lookup_union (char *name, struct block *block) return (t); /* If we get here, it's not a union */ - error ("This context has class, struct or enum %s, not a union.", name); + error (_("This context has class, struct or enum %s, not a union."), name); } @@ -1172,11 +1172,11 @@ lookup_enum (char *name, struct block *block) (struct symtab **) NULL); if (sym == NULL) { - error ("No enum type named %s.", name); + error (_("No enum type named %s."), name); } if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_ENUM) { - error ("This context has class, struct or union %s, not an enum.", name); + error (_("This context has class, struct or union %s, not an enum."), name); } return (SYMBOL_TYPE (sym)); } @@ -1198,11 +1198,11 @@ lookup_template_type (char *name, struct type *type, struct block *block) if (sym == NULL) { - error ("No template type named %s.", name); + error (_("No template type named %s."), name); } if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_STRUCT) { - error ("This context has class, union or enum %s, not a struct.", name); + error (_("This context has class, union or enum %s, not a struct."), name); } return (SYMBOL_TYPE (sym)); } @@ -1238,7 +1238,7 @@ lookup_struct_elt_type (struct type *type, char *name, int noerr) gdb_flush (gdb_stdout); fprintf_unfiltered (gdb_stderr, "Type "); type_print (type, "", gdb_stderr, -1); - error (" is not a structure or union type."); + error (_(" is not a structure or union type.")); } #if 0 @@ -1288,7 +1288,7 @@ lookup_struct_elt_type (struct type *type, char *name, int noerr) type_print (type, "", gdb_stderr, -1); fprintf_unfiltered (gdb_stderr, " has no component named "); fputs_filtered (name, gdb_stderr); - error ("."); + error ((".")); return (struct type *) -1; /* For lint */ } @@ -1554,7 +1554,7 @@ check_stub_method (struct type *type, int method_id, int signature_id) p = NULL; if (demangled_name == NULL || p == NULL) - error ("Internal: Cannot demangle mangled name `%s'.", mangled_name); + error (_("Internal: Cannot demangle mangled name `%s'."), mangled_name); /* Now, read in the parameters that define this type. */ p += 1; @@ -1811,7 +1811,7 @@ lookup_fundamental_type (struct objfile *objfile, int typeid) if (typeid < 0 || typeid >= FT_NUM_MEMBERS) { - error ("internal error - invalid fundamental type id %d", typeid); + error (_("internal error - invalid fundamental type id %d"), typeid); } /* If this is the first time we need a fundamental type for this objfile diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index c10e6e6..4527ba9 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -332,7 +332,7 @@ proc_abort (struct proc *proc, int force) proc->sc = 1; inf_update_suspends (proc->inf); running = 0; - warning ("Stopped %s.", proc_string (proc)); + warning (_("Stopped %s."), proc_string (proc)); } else if (proc == inf->wait.thread && inf->wait.exc.reply && !force) /* An exception is pending on PROC, which don't mess with. */ @@ -468,7 +468,7 @@ proc_steal_exc_port (struct proc *proc, mach_port_t exc_port) if (!err) proc->exc_port = exc_port; else - warning ("Error setting exception port for %s: %s", + warning (_("Error setting exception port for %s: %s"), proc_string (proc), safe_strerror (err)); } } @@ -498,7 +498,7 @@ proc_restore_exc_port (struct proc *proc) if (!err) proc->exc_port = MACH_PORT_NULL; else - warning ("Error setting exception port for %s: %s", + warning (_("Error setting exception port for %s: %s"), proc_string (proc), safe_strerror (err)); } } @@ -575,7 +575,7 @@ make_proc (struct inf *inf, mach_port_t port, int tid) MACH_MSG_TYPE_MAKE_SEND_ONCE, &prev_port); if (err) - warning ("Couldn't request notification for port %d: %s", + warning (_("Couldn't request notification for port %d: %s"), port, safe_strerror (err)); else { @@ -725,7 +725,7 @@ inf_startup (struct inf *inf, int pid) err = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &inf->event_port); if (err) - error ("Error allocating event port: %s", safe_strerror (err)); + error (_("Error allocating event port: %s"), safe_strerror (err)); /* Make a send right for it, so we can easily copy it for other people. */ mach_port_insert_right (mach_task_self (), inf->event_port, @@ -749,7 +749,7 @@ inf_set_pid (struct inf *inf, pid_t pid) { error_t err = proc_pid2task (proc_server, pid, &task_port); if (err) - error ("Error getting task for pid %d: %s", pid, safe_strerror (err)); + error (_("Error getting task for pid %d: %s"), pid, safe_strerror (err)); } inf_debug (inf, "setting task: %d", task_port); @@ -859,7 +859,7 @@ inf_validate_task_sc (struct inf *inf) target_terminal_inferior (); /* Give it back to the child. */ if (abort) - error ("Additional task suspend count left untouched."); + error (_("Additional task suspend count left untouched.")); inf->task->cur_sc = suspend_count; } @@ -885,12 +885,12 @@ inf_set_traced (struct inf *inf, int on) if (err == EIEIO) { if (on) - warning ("Can't modify tracing state for pid %d: %s", + warning (_("Can't modify tracing state for pid %d: %s"), inf->pid, "No signal thread"); inf->traced = on; } else if (err) - warning ("Can't modify tracing state for pid %d: %s", + warning (_("Can't modify tracing state for pid %d: %s"), inf->pid, safe_strerror (err)); else inf->traced = on; @@ -1325,7 +1325,7 @@ inf_signal (struct inf *inf, enum target_signal sig) e->exception, e->code, e->subcode); } else - error ("Can't forward spontaneous exception (%s).", NAME); + error (_("Can't forward spontaneous exception (%s)."), NAME); } else /* A Unix signal. */ @@ -1365,9 +1365,9 @@ inf_signal (struct inf *inf, enum target_signal sig) if (err == EIEIO) /* Can't do too much... */ - warning ("Can't deliver signal %s: No signal thread.", NAME); + warning (_("Can't deliver signal %s: No signal thread."), NAME); else if (err) - warning ("Delivering signal %s: %s", NAME, safe_strerror (err)); + warning (_("Delivering signal %s: %s"), NAME, safe_strerror (err)); #undef NAME } @@ -1398,7 +1398,7 @@ inf_continue (struct inf *inf) } if (err) - warning ("Can't continue process: %s", safe_strerror (err)); + warning (_("Can't continue process: %s"), safe_strerror (err)); } @@ -1437,7 +1437,7 @@ gnu_wait (ptid_t tid, struct target_waitstatus *status) { inf_validate_procs (inf); if (!inf->threads && !inf->task->dead) - error ("There are no threads; try again later."); + error (_("There are no threads; try again later.")); } waiting_inf = inf; @@ -1461,7 +1461,7 @@ rewait: err = proc_wait_request (proc_server, inf->event_port, inf->pid, WUNTRACED); if (err) - warning ("wait request failed: %s", safe_strerror (err)); + warning (_("wait request failed: %s"), safe_strerror (err)); else { inf_debug (inf, "waits pending: %d", proc_waits_pending); @@ -1497,7 +1497,7 @@ rewait: if (err == EMACH_RCV_INTERRUPTED) inf_debug (inf, "interrupted"); else if (err) - error ("Couldn't wait for an event: %s", safe_strerror (err)); + error (_("Couldn't wait for an event: %s"), safe_strerror (err)); else { struct @@ -1517,10 +1517,10 @@ rewait: && !process_reply_server (&msg.hdr, &reply.hdr) && !msg_reply_server (&msg.hdr, &reply.hdr)) /* Whatever it is, it's something strange. */ - error ("Got a strange event, msg id = %d.", msg.hdr.msgh_id); + error (_("Got a strange event, msg id = %d."), msg.hdr.msgh_id); if (reply.err) - error ("Handling event, msgid = %d: %s", + error (_("Handling event, msgid = %d: %s"), msg.hdr.msgh_id, safe_strerror (reply.err)); } @@ -1703,7 +1703,7 @@ S_exception_raise_request (mach_port_t port, mach_port_t reply_port, void inf_task_died_status (struct inf *inf) { - warning ("Pid %d died with unknown exit status, using SIGKILL.", inf->pid); + warning (_("Pid %d died with unknown exit status, using SIGKILL."), inf->pid); inf->wait.status.kind = TARGET_WAITKIND_SIGNALLED; inf->wait.status.value.sig = TARGET_SIGNAL_KILL; } @@ -1753,7 +1753,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port) static error_t ill_rpc (char *fun) { - warning ("illegal rpc: %s", fun); + warning (_("illegal rpc: %s"), fun); return 0; } @@ -1818,7 +1818,7 @@ S_proc_wait_reply (mach_port_t reply, error_t err, { if (err != EINTR) { - warning ("Can't wait for pid %d: %s", inf->pid, safe_strerror (err)); + warning (_("Can't wait for pid %d: %s"), inf->pid, safe_strerror (err)); inf->no_wait = 1; /* Since we can't see the inferior's signals, don't trap them. */ @@ -1874,7 +1874,7 @@ S_msg_sig_post_untraced_reply (mach_port_t reply, error_t err) inf->wait.status.value.sig = TARGET_SIGNAL_0; } else if (err) - warning ("Signal delivery failed: %s", safe_strerror (err)); + warning (_("Signal delivery failed: %s"), safe_strerror (err)); if (err) /* We only get this reply when we've posted a signal to a process which we @@ -1948,7 +1948,7 @@ gnu_resume (ptid_t tid, int step, enum target_signal sig) abort the faulting thread, which will perhaps retake it. */ { proc_abort (inf->wait.thread, 1); - warning ("Aborting %s with unforwarded exception %s.", + warning (_("Aborting %s with unforwarded exception %s."), proc_string (inf->wait.thread), target_signal_to_name (inf->wait.status.value.sig)); } @@ -1972,7 +1972,7 @@ gnu_resume (ptid_t tid, int step, enum target_signal sig) { struct proc *thread = inf_tid_to_thread (inf, PIDGET (tid)); if (!thread) - error ("Can't run single thread id %d: no such thread!"); + error (_("Can't run single thread id %d: no such thread!")); inf_debug (inf, "running one thread: %d/%d", inf->pid, thread->tid); inf_set_threads_resume_sc (inf, thread, 0); } @@ -1981,7 +1981,7 @@ gnu_resume (ptid_t tid, int step, enum target_signal sig) { step_thread = inf_tid_to_thread (inf, PIDGET (tid)); if (!step_thread) - warning ("Can't step thread id %d: no such thread.", PIDGET (tid)); + warning (_("Can't step thread id %d: no such thread."), PIDGET (tid)); else inf_debug (inf, "stepping thread: %d/%d", inf->pid, step_thread->tid); } @@ -2050,7 +2050,7 @@ gnu_create_inferior (char *exec_file, char *allargs, char **env, /* We're in the child; make this process stop as soon as it execs. */ inf_debug (inf, "tracing self"); if (ptrace (PTRACE_TRACEME) != 0) - error ("ptrace (PTRACE_TRACEME) failed!"); + error (_("ptrace (PTRACE_TRACEME) failed!")); } void attach_to_child (int pid) { @@ -2118,7 +2118,7 @@ gnu_attach (char *args, int from_tty) pid = atoi (args); if (pid == getpid ()) /* Trying to masturbate? */ - error ("I refuse to debug myself!"); + error (_("I refuse to debug myself!")); if (from_tty) { @@ -2211,19 +2211,19 @@ gnu_prepare_to_store (void) static void gnu_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } static void gnu_stop (void) { - error ("to_stop target function not implemented"); + error (_("to_stop target function not implemented")); } static char * gnu_pid_to_exec_file (int pid) { - error ("to_pid_to_exec_file target function not implemented"); + error (_("to_pid_to_exec_file target function not implemented")); return NULL; } @@ -2257,13 +2257,13 @@ gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length) err = hurd_safe_copyin (myaddr, (void *) addr - low_address + copied, length); if (err) { - warning ("Read from inferior faulted: %s", safe_strerror (err)); + warning (_("Read from inferior faulted: %s"), safe_strerror (err)); length = 0; } err = vm_deallocate (mach_task_self (), copied, copy_count); if (err) - warning ("gnu_read_inferior vm_deallocate failed: %s", safe_strerror (err)); + warning (_("gnu_read_inferior vm_deallocate failed: %s"), safe_strerror (err)); return length; } @@ -2348,7 +2348,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length) /* Check for holes in memory */ if (old_address != region_address) { - warning ("No memory at 0x%x. Nothing written", + warning (_("No memory at 0x%x. Nothing written"), old_address); err = KERN_SUCCESS; length = 0; @@ -2357,7 +2357,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length) if (!(max_protection & VM_PROT_WRITE)) { - warning ("Memory at address 0x%x is unwritable. Nothing written", + warning (_("Memory at address 0x%x is unwritable. Nothing written"), old_address); err = KERN_SUCCESS; length = 0; @@ -2431,7 +2431,7 @@ out: if (err != KERN_SUCCESS) { - warning ("%s: %s", errstr, mach_error_string (err)); + warning (_("%s: %s"), errstr, mach_error_string (err)); return 0; } @@ -2510,7 +2510,7 @@ gnu_find_memory_regions (int (*func) (CORE_ADDR, break; if (err != KERN_SUCCESS) { - warning ("vm_region failed: %s", mach_error_string (err)); + warning (_("vm_region failed: %s"), mach_error_string (err)); return -1; } @@ -2674,7 +2674,7 @@ parse_int_arg (char *args, char *cmd_prefix) if (*args && *arg_end == '\0') return val; } - error ("Illegal argument for \"%s\" command, should be an integer.", cmd_prefix); + error (_("Illegal argument for \"%s\" command, should be an integer."), cmd_prefix); } static int @@ -2685,7 +2685,7 @@ _parse_bool_arg (char *args, char *t_val, char *f_val, char *cmd_prefix) else if (strcmp (args, f_val) == 0) return 0; else - error ("Illegal argument for \"%s\" command, should be \"%s\" or \"%s\".", + error (_("Illegal argument for \"%s\" command, should be \"%s\" or \"%s\"."), cmd_prefix, t_val, f_val); } @@ -2696,7 +2696,7 @@ static void check_empty (char *args, char *cmd_prefix) { if (args) - error ("Garbage after \"%s\" command: `%s'", cmd_prefix, args); + error (_("Garbage after \"%s\" command: `%s'"), cmd_prefix, args); } /* Returns the alive thread named by INFERIOR_PID, or signals an error. */ @@ -2706,7 +2706,7 @@ cur_thread (void) struct inf *inf = cur_inf (); struct proc *thread = inf_tid_to_thread (inf, PIDGET (inferior_ptid)); if (!thread) - error ("No current thread."); + error (_("No current thread.")); return thread; } @@ -2716,7 +2716,7 @@ active_inf (void) { struct inf *inf = cur_inf (); if (!inf->task) - error ("No current process."); + error (_("No current process.")); return inf; } @@ -2823,13 +2823,13 @@ steal_exc_port (struct proc *proc, mach_port_t name) mach_msg_type_name_t port_type; if (!proc || !proc->inf->task) - error ("No inferior task."); + error (_("No inferior task.")); err = mach_port_extract_right (proc->inf->task->port, name, MACH_MSG_TYPE_COPY_SEND, &port, &port_type); if (err) - error ("Couldn't extract send right %d from inferior: %s", + error (_("Couldn't extract send right %d from inferior: %s"), name, safe_strerror (err)); if (proc->saved_exc_port) @@ -2844,7 +2844,7 @@ steal_exc_port (struct proc *proc, mach_port_t name) { proc->exc_port = proc->inf->event_port; err = proc_set_exception_port (proc, proc->exc_port); - error ("Can't set exception port for %s: %s", + error (_("Can't set exception port for %s: %s"), proc_string (proc), safe_strerror (err)); } } @@ -2854,7 +2854,7 @@ set_task_exc_port_cmd (char *args, int from_tty) { struct inf *inf = cur_inf (); if (!args) - error ("No argument to \"set task exception-port\" command."); + error (_("No argument to \"set task exception-port\" command.")); steal_exc_port (inf->task, parse_and_eval_address (args)); } @@ -2879,8 +2879,8 @@ set_sig_thread_cmd (char *args, int from_tty) struct inf *inf = cur_inf (); if (!args || (!isdigit (*args) && strcmp (args, "none") != 0)) - error ("Illegal argument to \"set signal-thread\" command.\n" - "Should be an integer thread ID, or `none'."); + error (_("Illegal argument to \"set signal-thread\" command.\n" + "Should be an integer thread ID, or `none'.")); if (strcmp (args, "none") == 0) inf->signal_thread = 0; @@ -2888,8 +2888,8 @@ set_sig_thread_cmd (char *args, int from_tty) { int tid = PIDGET (thread_id_to_pid (atoi (args))); if (tid < 0) - error ("Thread ID %s not known. Use the \"info threads\" command to\n" - "see the IDs of currently known threads.", args); + error (_("Thread ID %s not known. Use the \"info threads\" command to\n" + "see the IDs of currently known threads."), args); inf->signal_thread = inf_tid_to_thread (inf, tid); } } @@ -3019,7 +3019,7 @@ info_port_rights (char *args, mach_port_type_t only) print_port_info (right, 0, inf->task->port, PORTINFO_DETAILS, stdout); if (err) - error ("%ld: %s.", right, safe_strerror (err)); + error (_("%ld: %s."), right, safe_strerror (err)); } } else @@ -3029,7 +3029,7 @@ info_port_rights (char *args, mach_port_type_t only) print_task_ports_info (inf->task->port, only, PORTINFO_DETAILS, stdout); if (err) - error ("%s.", safe_strerror (err)); + error (_("%s."), safe_strerror (err)); } value_free_to_mark (vmark); @@ -3263,7 +3263,7 @@ set_thread_exc_port_cmd (char *args, int from_tty) { struct proc *thread = cur_thread (); if (!args) - error ("No argument to \"set thread exception-port\" command."); + error (_("No argument to \"set thread exception-port\" command.")); steal_exc_port (thread, parse_and_eval_address (args)); } @@ -3290,7 +3290,7 @@ thread_takeover_sc_cmd (char *args, int from_tty) error_t err = thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len); if (err) - error ("%s.", safe_strerror (err)); + error (("%s."), safe_strerror (err)); thread->sc = info->suspend_count; if (from_tty) printf_unfiltered ("Suspend count was %d.\n", thread->sc); @@ -3401,6 +3401,6 @@ flush_inferior_icache (CORE_ADDR pc, int amount) MATTR_CACHE, &flush); if (ret != KERN_SUCCESS) - warning ("Error flushing inferior's cache : %s", safe_strerror (ret)); + warning (_("Error flushing inferior's cache : %s"), safe_strerror (ret)); } #endif /* FLUSH_INFERIOR_CACHE */ diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index 57bc0d8..80e6b65 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -175,7 +175,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, else if (TYPE_CODE (entry_type) == TYPE_CODE_PTR) vfn = entry; else - error ("I'm confused: virtual function table has bad type"); + error (_("I'm confused: virtual function table has bad type")); /* Reinstantiate the function pointer with the correct type. */ deprecated_set_value_type (vfn, lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j))); diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index f03ecba..b497347 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -245,10 +245,10 @@ gnuv3_rtti_type (struct value *value, if (vtable_symbol_name == NULL || strncmp (vtable_symbol_name, "vtable for ", 11)) { - warning ("can't find linker symbol for virtual table for `%s' value", + warning (_("can't find linker symbol for virtual table for `%s' value"), TYPE_NAME (values_type)); if (vtable_symbol_name) - warning (" found `%s' instead", vtable_symbol_name); + warning (_(" found `%s' instead"), vtable_symbol_name); return NULL; } class_name = vtable_symbol_name + 11; @@ -291,7 +291,7 @@ gnuv3_virtual_fn_field (struct value **value_p, /* Some simple sanity checks. */ if (TYPE_CODE (values_type) != TYPE_CODE_CLASS) - error ("Only classes can have virtual functions."); + error (_("Only classes can have virtual functions.")); /* Find the base class that defines this virtual function. */ vfn_base = TYPE_FN_FIELD_FCONTEXT (f, j); @@ -308,7 +308,7 @@ gnuv3_virtual_fn_field (struct value **value_p, if (TYPE_VPTR_FIELDNO (vfn_base) < 0) fill_in_vptr_fieldno (vfn_base); if (TYPE_VPTR_FIELDNO (vfn_base) < 0) - error ("Could not find virtual table pointer for class \"%s\".", + error (_("Could not find virtual table pointer for class \"%s\"."), TYPE_TAG_NAME (vfn_base) ? TYPE_TAG_NAME (vfn_base) : "<unknown>"); /* Now that we know which base class is defining our virtual @@ -378,11 +378,11 @@ gnuv3_baseclass_offset (struct type *type, int index, char *valaddr, worthwhile. */ cur_base_offset = TYPE_BASECLASS_BITPOS (type, index) / 8; if (cur_base_offset >= - vtable_address_point_offset ()) - error ("Expected a negative vbase offset (old compiler?)"); + error (_("Expected a negative vbase offset (old compiler?)")); cur_base_offset = cur_base_offset + vtable_address_point_offset (); if ((- cur_base_offset) % TYPE_LENGTH (builtin_type_void_data_ptr) != 0) - error ("Misaligned vbase offset."); + error (_("Misaligned vbase offset.")); cur_base_offset = cur_base_offset / ((int) TYPE_LENGTH (builtin_type_void_data_ptr)); @@ -403,7 +403,7 @@ gnuv3_baseclass_offset (struct type *type, int index, char *valaddr, if (TYPE_VPTR_FIELDNO (vbasetype) >= 0 && TYPE_FIELD_BITPOS (vbasetype, TYPE_VPTR_FIELDNO (vbasetype)) != 0) - error ("Illegal vptr offset in class %s", + error (_("Illegal vptr offset in class %s"), TYPE_NAME (vbasetype) ? TYPE_NAME (vbasetype) : "<unknown>"); vtable_address = value_as_address (value_at_lazy (builtin_type_void_data_ptr, diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index c34db89..e0223f4 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -307,9 +307,9 @@ go32_close (int quitting) static void go32_attach (char *args, int from_tty) { - error ("\ + error (_("\ You cannot attach to a running program on this platform.\n\ -Use the `run' command to run DJGPP programs."); +Use the `run' command to run DJGPP programs.")); } static void @@ -612,7 +612,7 @@ go32_create_inferior (char *exec_file, char *args, char **env, int from_tty) if (redir_cmdline_parse (args, &child_cmd) == 0) args = child_cmd.command; else - error ("Syntax error in command line."); + error (_("Syntax error in command line.")); } else child_cmd.command = xstrdup (args); @@ -621,7 +621,7 @@ go32_create_inferior (char *exec_file, char *args, char **env, int from_tty) /* v2loadimage passes command lines via DOS memory, so it cannot possibly handle commands longer than 1MB. */ if (cmdlen > 1024*1024) - error ("Command line too long."); + error (_("Command line too long.")); cmdline = xmalloc (cmdlen + 4); strcpy (cmdline + 1, args); @@ -805,7 +805,7 @@ go32_terminal_inferior (void) if (redir_to_child (&child_cmd) == -1) { redir_to_debugger (&child_cmd); - error ("Cannot redirect standard handles for program: %s.", + error (_("Cannot redirect standard handles for program: %s."), safe_strerror (errno)); } /* set the console device of the inferior to whatever mode @@ -839,7 +839,7 @@ go32_terminal_ours (void) if (redir_to_debugger (&child_cmd) == -1) { redir_to_child (&child_cmd); - error ("Cannot redirect standard handles for debugger: %s.", + error (_("Cannot redirect standard handles for debugger: %s."), safe_strerror (errno)); } } @@ -1517,7 +1517,7 @@ go32_sldt (char *arg, int from_tty) if (ldt_entry < 0 || (ldt_entry & 4) == 0 || (ldt_entry & 3) != (cpl & 3)) - error ("Invalid LDT entry 0x%03lx.", (unsigned long)ldt_entry); + error (_("Invalid LDT entry 0x%03lx."), (unsigned long)ldt_entry); } } @@ -1555,7 +1555,7 @@ go32_sldt (char *arg, int from_tty) if (ldt_entry >= 0) { if (ldt_entry > limit) - error ("Invalid LDT entry %#lx: outside valid limits [0..%#x]", + error (_("Invalid LDT entry %#lx: outside valid limits [0..%#x]"), (unsigned long)ldt_entry, limit); display_descriptor (ldt_descr.stype, base, ldt_entry / 8, 1); @@ -1586,7 +1586,7 @@ go32_sgdt (char *arg, int from_tty) { gdt_entry = parse_and_eval_long (arg); if (gdt_entry < 0 || (gdt_entry & 7) != 0) - error ("Invalid GDT entry 0x%03lx: not an integral multiple of 8.", + error (_("Invalid GDT entry 0x%03lx: not an integral multiple of 8."), (unsigned long)gdt_entry); } } @@ -1597,7 +1597,7 @@ go32_sgdt (char *arg, int from_tty) if (gdt_entry >= 0) { if (gdt_entry > gdtr.limit) - error ("Invalid GDT entry %#lx: outside valid limits [0..%#x]", + error (_("Invalid GDT entry %#lx: outside valid limits [0..%#x]"), (unsigned long)gdt_entry, gdtr.limit); display_descriptor (0, gdtr.base, gdt_entry / 8, 1); @@ -1627,7 +1627,7 @@ go32_sidt (char *arg, int from_tty) { idt_entry = parse_and_eval_long (arg); if (idt_entry < 0) - error ("Invalid (negative) IDT entry %ld.", idt_entry); + error (_("Invalid (negative) IDT entry %ld."), idt_entry); } } @@ -1639,7 +1639,7 @@ go32_sidt (char *arg, int from_tty) if (idt_entry >= 0) { if (idt_entry > idtr.limit) - error ("Invalid IDT entry %#lx: outside valid limits [0..%#x]", + error (_("Invalid IDT entry %#lx: outside valid limits [0..%#x]"), (unsigned long)idt_entry, idtr.limit); display_descriptor (1, idtr.base, idt_entry, 1); @@ -1798,7 +1798,7 @@ go32_pde (char *arg, int from_tty) { pde_idx = parse_and_eval_long (arg); if (pde_idx < 0 || pde_idx >= 1024) - error ("Entry %ld is outside valid limits [0..1023].", pde_idx); + error (_("Entry %ld is outside valid limits [0..1023]."), pde_idx); } } @@ -1847,7 +1847,7 @@ go32_pte (char *arg, int from_tty) { pde_idx = parse_and_eval_long (arg); if (pde_idx < 0 || pde_idx >= 1024) - error ("Entry %ld is outside valid limits [0..1023].", pde_idx); + error (_("Entry %ld is outside valid limits [0..1023]."), pde_idx); } } diff --git a/gdb/hpacc-abi.c b/gdb/hpacc-abi.c index a0836e0..85b57bd 100644 --- a/gdb/hpacc-abi.c +++ b/gdb/hpacc-abi.c @@ -99,7 +99,7 @@ hpacc_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, argp = value_cast (type, *arg1p); if (VALUE_ADDRESS (argp) == 0) - error ("Address of object is null; object may not have been created."); + error (_("Address of object is null; object may not have been created.")); /* pai: FIXME -- 32x64 possible problem? */ /* First word (4 bytes) in object layout is the vtable pointer */ @@ -164,7 +164,7 @@ hpacc_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, } if (!coreptr) - error ("Address of virtual function is null; error in virtual table?"); + error (_("Address of virtual function is null; error in virtual table?")); /* Wrap this addr in a value and return pointer */ vp = allocate_value (ftype); @@ -243,8 +243,8 @@ hpacc_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) * to the string name */ coreptr = *(CORE_ADDR *) (value_contents (vp)); if (!coreptr) - error ("Retrieved null typeinfo pointer in trying to determine " - "run-time type"); + error (_("Retrieved null typeinfo pointer in trying to determine " + "run-time type")); /* 4 -> offset of name field */ vp = value_at (builtin_type_int, coreptr + 4); /* FIXME possible 32x64 problem */ @@ -254,13 +254,13 @@ hpacc_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) read_memory_string (coreptr, rtti_type_name, 256); if (strlen (rtti_type_name) == 0) - error ("Retrieved null type name from typeinfo"); + error (_("Retrieved null type name from typeinfo")); /* search for type */ rtti_type = lookup_typename (rtti_type_name, (struct block *) 0, 1); if (!rtti_type) - error ("Could not find run-time type: invalid type name %s in typeinfo??", + error (_("Could not find run-time type: invalid type name %s in typeinfo??"), rtti_type_name); CHECK_TYPEDEF (rtti_type); #if 0 diff --git a/gdb/hppa-hpux-nat.c b/gdb/hppa-hpux-nat.c index db05072..5338ae2 100644 --- a/gdb/hppa-hpux-nat.c +++ b/gdb/hppa-hpux-nat.c @@ -109,7 +109,7 @@ hppa_hpux_fetch_register (int regnum) lwpid_t lwp = ptid_get_lwp (inferior_ptid); if (ttrace (TT_LWP_RUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1) - error ("Couldn't read register %s (#%d): %s", + error (_("Couldn't read register %s (#%d): %s"), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); } #else @@ -122,7 +122,7 @@ hppa_hpux_fetch_register (int regnum) errno = 0; buf[i] = ptrace (PT_RUREGS, pid, (PTRACE_TYPE_ARG3) addr, 0, 0); if (errno != 0) - error ("Couldn't read register %s (#%d): %s", + error (_("Couldn't read register %s (#%d): %s"), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); addr += sizeof (PTRACE_TYPE_RET); @@ -186,7 +186,7 @@ hppa_hpux_store_register (int regnum) lwpid_t lwp = ptid_get_lwp (inferior_ptid); if (ttrace (TT_LWP_WUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1) - error ("Couldn't write register %s (#%d): %s", + error (_("Couldn't write register %s (#%d): %s"), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); } #else @@ -199,7 +199,7 @@ hppa_hpux_store_register (int regnum) errno = 0; ptrace (PT_WUREGS, pid, (PTRACE_TYPE_ARG3) addr, buf[i], 0); if (errno != 0) - error ("Couldn't write register %s (#%d): %s", + error (_("Couldn't write register %s (#%d): %s"), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); addr += sizeof (PTRACE_TYPE_RET); diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index 044cb56..da43b52 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -140,7 +140,7 @@ hppa32_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name) } /* Should never happen. */ - warning ("Unable to find branch in parameter relocation stub.\n"); + warning (_("Unable to find branch in parameter relocation stub.")); return 0; } @@ -266,7 +266,7 @@ hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name) } /* Should never happen. */ - warning ("Unable to find branch in parameter relocation stub.\n"); + warning (_("Unable to find branch in parameter relocation stub.")); return 0; } @@ -406,7 +406,7 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc) /* Make sure we haven't walked outside the range of this stub. */ if (u != find_unwind_entry (loc)) { - warning ("Unable to find branch in linker stub"); + warning (_("Unable to find branch in linker stub")); return orig_pc == pc ? 0 : pc & ~0x3; } @@ -423,7 +423,7 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc) return (hppa_extract_21 (prev_inst) + hppa_extract_17 (curr_inst)) & ~0x3; else { - warning ("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1)."); + warning (_("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1).")); return orig_pc == pc ? 0 : pc & ~0x3; } } @@ -459,14 +459,14 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc) stubsym = lookup_minimal_symbol_by_pc (loc); if (stubsym == NULL) { - warning ("Unable to find symbol for 0x%lx", loc); + warning (_("Unable to find symbol for 0x%lx"), loc); return orig_pc == pc ? 0 : pc & ~0x3; } libsym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (stubsym), NULL, NULL); if (libsym == NULL) { - warning ("Unable to find library symbol for %s\n", + warning (_("Unable to find library symbol for %s."), DEPRECATED_SYMBOL_NAME (stubsym)); return orig_pc == pc ? 0 : pc & ~0x3; } @@ -496,7 +496,7 @@ hppa_hpux_skip_trampoline_code (CORE_ADDR pc) (read_register (HPPA_SP_REGNUM) - 8, 4)) & ~0x3; else { - warning ("Unable to find restore of %%rp before bv (%%rp)."); + warning (_("Unable to find restore of %%rp before bv (%%rp).")); return orig_pc == pc ? 0 : pc & ~0x3; } } @@ -611,8 +611,8 @@ setup_d_pid_in_inferior (void) msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find __d_pid symbol in object file."); - warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o)."); + warning (_("Unable to find __d_pid symbol in object file.\n" + "Suggest linking executable with -g (links in /opt/langtools/lib/end.o).")); return 1; } @@ -620,8 +620,8 @@ setup_d_pid_in_inferior (void) store_unsigned_integer (buf, 4, PIDGET (inferior_ptid)); /* FIXME 32x64? */ if (target_write_memory (anaddr, buf, 4)) /* FIXME 32x64? */ { - warning ("Unable to write __d_pid"); - warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o)."); + warning (_("Unable to write __d_pid.\n" + "Suggest linking executable with -g (links in /opt/langtools/lib/end.o).")); return 1; } return 0; @@ -709,7 +709,7 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle) target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr)); if (stub_addr <= 0) - error ("call to __d_shl_get failed, error code is %d", err_value); + error (_("call to __d_shl_get failed, error code is %d"), err_value); return (stub_addr); } @@ -794,10 +794,11 @@ initialize_hp_cxx_exception_support (void) } else { - warning ("Unable to find exception callback hook (%s).", + warning (_("\ +Unable to find exception callback hook (%s).\n\ +Executable may not have been compiled debuggable with HP aCC.\n\ +GDB will be unable to intercept exception events."), HP_ACC_EH_notify_hook); - warning ("Executable may not have been compiled debuggable with HP aCC."); - warning ("GDB will be unable to intercept exception events."); eh_notify_hook_addr = 0; hp_cxx_exception_support = 0; return 0; @@ -814,10 +815,11 @@ initialize_hp_cxx_exception_support (void) } else { - warning ("Unable to find exception callback routine (%s).", + warning (_("\ +Unable to find exception callback routine (%s).\n\ +Suggest linking executable with -g (links in /opt/langtools/lib/end.o).\n\ +GDB will be unable to intercept exception events."), HP_ACC_EH_notify_callback); - warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o)."); - warning ("GDB will be unable to intercept exception events."); eh_notify_callback_addr = 0; return 0; } @@ -859,8 +861,9 @@ initialize_hp_cxx_exception_support (void) { /* We can get here either if there is no plabel in the export list for the main image, or if something strange happened (?) */ - warning ("Couldn't find a plabel (indirect function label) for the exception callback."); - warning ("GDB will not be able to intercept exception events."); + warning (_("\ +Couldn't find a plabel (indirect function label) for the exception callback.\n\ +GDB will not be able to intercept exception events.")); return 0; } } @@ -878,9 +881,11 @@ initialize_hp_cxx_exception_support (void) } else { - warning ("Unable to find exception callback routine to set breakpoint (%s).", HP_ACC_EH_break); - warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o)."); - warning ("GDB will be unable to intercept exception events."); + warning (_("\ +Unable to find exception callback routine to set breakpoint (%s).\n\ +Suggest linking executable with -g (link in /opt/langtools/lib/end.o).\n\ +GDB will be unable to intercept exception events."), + HP_ACC_EH_break); eh_break_addr = 0; return 0; } @@ -904,9 +909,10 @@ initialize_hp_cxx_exception_support (void) } else { - warning ("Unable to enable interception of exception catches."); - warning ("Executable may not have been compiled debuggable with HP aCC."); - warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o)."); + warning (_("\ +Unable to enable interception of exception catches.\n\ +Executable may not have been compiled debuggable with HP aCC.\n\ +Suggest linking executable with -g (link in /opt/langtools/lib/end.o).")); return 0; } } @@ -930,9 +936,10 @@ initialize_hp_cxx_exception_support (void) } else { - warning ("Unable to enable interception of exception throws."); - warning ("Executable may not have been compiled debuggable with HP aCC."); - warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o)."); + warning (_("\ +Unable to enable interception of exception throws.\n\ +Executable may not have been compiled debuggable with HP aCC.\n\ +Suggest linking executable with -g (link in /opt/langtools/lib/end.o).")); return 0; } } @@ -980,8 +987,9 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable) /* pai: (temp) FIXME should there be a pack operation first? */ if (target_write_memory (eh_notify_hook_addr, buf, 4)) /* FIXME 32x64 problem */ { - warning ("Could not write to target memory for exception event callback."); - warning ("Interception of exception events may not work."); + warning (_("\ +Could not write to target memory for exception event callback.\n\ +Interception of exception events may not work.")); return (struct symtab_and_line *) -1; } if (enable) @@ -994,7 +1002,7 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable) } else { - warning ("Internal error: Invalid inferior pid? Cannot intercept exception events."); + warning (_("Internal error: Invalid inferior pid? Cannot intercept exception events.")); return (struct symtab_and_line *) -1; } } @@ -1005,7 +1013,7 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable) store_unsigned_integer (buf, 4, enable ? 1 : 0); if (target_write_memory (eh_catch_throw_addr, buf, 4)) /* FIXME 32x64? */ { - warning ("Couldn't enable exception throw interception."); + warning (_("Couldn't enable exception throw interception.")); return (struct symtab_and_line *) -1; } break; @@ -1013,12 +1021,12 @@ child_enable_exception_callback (enum exception_event_kind kind, int enable) store_unsigned_integer (buf, 4, enable ? 1 : 0); if (target_write_memory (eh_catch_catch_addr, buf, 4)) /* FIXME 32x64? */ { - warning ("Couldn't enable exception catch interception."); + warning (_("Couldn't enable exception catch interception.")); return (struct symtab_and_line *) -1; } break; default: - error ("Request to enable unknown or unsupported exception event."); + error (_("Request to enable unknown or unsupported exception event.")); } /* Copy break address into new sal struct, malloc'ing if needed. */ @@ -1351,7 +1359,7 @@ hppa32_hpux_search_dummy_call_sequence (struct gdbarch *gdbarch, CORE_ADDR pc, if (!priv) priv = hppa_init_objfile_priv_data (obj); if (!priv) - error ("Internal error creating objfile private data.\n"); + error (_("Internal error creating objfile private data.")); /* Use the cached value if we have one. */ if (priv->dummy_call_sequence_addr != 0) @@ -1446,7 +1454,7 @@ hppa64_hpux_search_dummy_call_sequence (struct gdbarch *gdbarch, CORE_ADDR pc, if (!priv) priv = hppa_init_objfile_priv_data (obj); if (!priv) - error ("Internal error creating objfile private data.\n"); + error (_("Internal error creating objfile private data.")); /* Use the cached value if we have one. */ if (priv->dummy_call_sequence_addr != 0) @@ -1598,8 +1606,8 @@ hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr) } } - warning ("Cannot find suitable address to place dummy breakpoint; nested " - "calls may fail.\n"); + warning (_("Cannot find suitable address to place dummy breakpoint; nested " + "calls may fail.")); return addr - 4; } @@ -1702,8 +1710,8 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, return it can return to the space of our trampoline. */ stubaddr = hppa_hpux_find_import_stub_for_addr (funcaddr); if (stubaddr == 0) - error ("Cannot call external function not referenced by application " - "(no import stub).\n"); + error (_("Cannot call external function not referenced by application " + "(no import stub).\n")); regcache_cooked_write_unsigned (current_regcache, 22, stubaddr); write_memory (sp, (char *)&hppa32_tramp, sizeof (hppa32_tramp)); @@ -1713,7 +1721,7 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, *real_pc = hppa32_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg); if (*real_pc == 0) - error ("Cannot make interspace call from here.\n"); + error (_("Cannot make interspace call from here.")); regcache_cooked_write_unsigned (current_regcache, argreg, sp); @@ -1739,7 +1747,7 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, *real_pc = hppa64_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg); if (*real_pc == 0) - error ("Cannot make interspace call from here.\n"); + error (_("Cannot make interspace call from here.")); regcache_cooked_write_unsigned (current_regcache, argreg, sp); @@ -1865,7 +1873,7 @@ hppa_hpux_supply_save_state (const struct regset *regset, /* If the SS_WIDEREGS flag is set, we really do need the full `struct save_state'. */ if (flags & HPPA_HPUX_SS_WIDEREGS && len < HPPA_HPUX_SAVE_STATE_SIZE) - error ("Register set contents too small"); + error (_("Register set contents too small")); if (flags & HPPA_HPUX_SS_WIDEREGS) hppa_hpux_supply_ss_wide (regcache, regnum, save_state); diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c index b6a4f20..9a1abba 100644 --- a/gdb/hppa-linux-nat.c +++ b/gdb/hppa-linux-nat.c @@ -157,7 +157,7 @@ register_addr (int regno, CORE_ADDR blockend) CORE_ADDR addr; if ((unsigned) regno >= NUM_REGS) - error ("Invalid register number %d.", regno); + error (_("Invalid register number %d."), regno); if (u_offsets[regno] == -1) addr = 0; @@ -233,7 +233,7 @@ fetch_register (int regno) errno = 0; val = ptrace (PTRACE_PEEKUSER, tid, register_addr (regno, 0), 0); if (errno != 0) - error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno), + error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regno), regno, safe_strerror (errno)); regcache_raw_supply (current_regcache, regno, &val); @@ -259,7 +259,7 @@ store_register (int regno) regcache_raw_collect (current_regcache, regno, &val); ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val); if (errno != 0) - error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regno), + error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regno), regno, safe_strerror (errno)); } diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c index 4a7657a..48cdab9 100644 --- a/gdb/hppa-linux-tdep.c +++ b/gdb/hppa-linux-tdep.c @@ -47,7 +47,7 @@ hppa_dwarf_reg_to_regnum (int reg) if (reg >= 32 && reg <= 85) return HPPA_FP4_REGNUM + (reg - 32); - warning ("Unmapped DWARF Register #%d encountered\n", reg); + warning (_("Unmapped DWARF Register #%d encountered."), reg); return -1; } #endif @@ -278,7 +278,7 @@ hppa_linux_skip_trampoline_code (CORE_ADDR pc) } else { - error ("Cannot resolve plt stub at 0x%s\n", + error (_("Cannot resolve plt stub at 0x%s."), paddr_nz (pc)); pc = 0; } diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 4f63d29..66ea2e3 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -489,7 +489,7 @@ find_unwind_entry (CORE_ADDR pc) read_unwind_info (objfile); priv = objfile_data (objfile, hppa_objfile_priv_data); if (priv == NULL) - error ("Internal error reading unwind information."); + error (_("Internal error reading unwind information.")); ui = ((struct hppa_objfile_private *) priv)->unwind_info; } @@ -1830,7 +1830,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache) if (!safe_frame_unwind_memory (next_frame, pc, buf4, sizeof buf4)) { - error ("Cannot read instruction at 0x%s\n", paddr_nz (pc)); + error (_("Cannot read instruction at 0x%s."), paddr_nz (pc)); return (*this_cache); } @@ -2167,8 +2167,8 @@ hppa_fallback_frame_cache (struct frame_info *next_frame, void **this_cache) if (start_pc == 0 || end_pc == 0) { - error ("Cannot find bounds of current function (@0x%s), unwinding will " - "fail.", paddr_nz (pc)); + error (_("Cannot find bounds of current function (@0x%s), unwinding will " + "fail."), paddr_nz (pc)); return cache; } @@ -2327,7 +2327,7 @@ hppa_stub_frame_prev_register (struct frame_info *next_frame, optimizedp, lvalp, addrp, realnump, valuep); else - error ("Requesting registers from null frame.\n"); + error (_("Requesting registers from null frame.")); } static const struct frame_unwind hppa_stub_frame_unwind = { diff --git a/gdb/hpread.c b/gdb/hpread.c index 1103b36..77a10db 100644 --- a/gdb/hpread.c +++ b/gdb/hpread.c @@ -334,14 +334,14 @@ hpread_call_pxdb (const char *file_name) strcat (p, " "); strcat (p, file_name); - warning ("File not processed by pxdb--about to process now.\n"); + warning (_("File not processed by pxdb--about to process now.")); status = system (p); retval = (status == 0); } else { - warning ("pxdb not found at standard location: /opt/langtools/bin\ngdb will not be able to debug %s.\nPlease install pxdb at the above location and then restart gdb.\nYou can also run pxdb on %s with the command\n\"pxdb %s\" and then restart gdb.", file_name, file_name, file_name); + warning (_("pxdb not found at standard location: /opt/langtools/bin\ngdb will not be able to debug %s.\nPlease install pxdb at the above location and then restart gdb.\nYou can also run pxdb on %s with the command\n\"pxdb %s\" and then restart gdb."), file_name, file_name, file_name); retval = 0; } @@ -389,18 +389,18 @@ hpread_pxdb_needed (bfd *sym_bfd) header_section, buf, 0, header_section_size)) - error ("bfd_get_section_contents\n"); + error (_("bfd_get_section_contents.")); tmp = bfd_get_32 (sym_bfd, (bfd_byte *) (buf + sizeof (int) * 4)); pxdbed = (tmp >> 31) & 0x1; if (!pxdbed) - error ("file debug header info invalid\n"); + error (_("file debug header info invalid.")); do_pxdb = 0; } else - error ("invalid $HEADER$ size in executable \n"); + error (_("invalid $HEADER$ size in executable.")); } else @@ -456,7 +456,7 @@ hpread_pxdb_needed (bfd *sym_bfd) header_section, buf, 0, header_section_size)) - error ("bfd_get_section_contents\n"); + error (_("bfd_get_section_contents.")); tmp = bfd_get_32 (sym_bfd, (bfd_byte *) (buf + sizeof (int) * 3)); pxdbed = (tmp >> 31) & 0x1; @@ -464,7 +464,7 @@ hpread_pxdb_needed (bfd *sym_bfd) if (pxdbed) do_pxdb = 0; else - error ("file debug header invalid\n"); + error (_("file debug header invalid.")); } else /*not pxdbed and doc OR not pxdbed and non doc */ do_pxdb = 1; @@ -554,7 +554,7 @@ do_pxdb (bfd *sym_bfd) do { \ if( !told_objfile ) { \ told_objfile = 1; \ - warning ("\nIn object file \"%s\":\n", \ + warning (_("\nIn object file \"%s\":"), \ objfile->name); \ } \ } while (0) @@ -773,7 +773,7 @@ scan_procs (int *curr_pd_p, quick_procedure_entry *qPD, int max_procs, if (CURR_PROC_END > end_adr) { TELL_OBJFILE; - warning ("Procedure \"%s\" [0x%x] spans file or module boundaries.", rtn_name, curr_pd); + warning (_("Procedure \"%s\" [0x%x] spans file or module boundaries."), rtn_name, curr_pd); } /* Add this routine symbol to the list in the objfile. @@ -1078,7 +1078,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, (CURR_MODULE_END == 0) || (CURR_MODULE_END == -1))) { TELL_OBJFILE; - warning ("Module \"%s\" [0x%s] has non-standard addresses. It starts at 0x%s, ends at 0x%s, and will be skipped.", + warning (_("Module \"%s\" [0x%s] has non-standard addresses. It starts at 0x%s, ends at 0x%s, and will be skipped."), mod_name_string, paddr_nz (curr_md), paddr_nz (start_adr), paddr_nz (end_adr)); /* On to next module */ curr_md++; @@ -1107,7 +1107,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, if (CURR_PROC_START < start_adr) { TELL_OBJFILE; - warning ("Found procedure \"%s\" [0x%x] that is not in any file or module.", + warning (_("Found procedure \"%s\" [0x%x] that is not in any file or module."), &vt_bits[(long) qPD[curr_pd].sbProc], curr_pd); start_adr = CURR_PROC_START; if (CURR_PROC_ISYM < start_sym) @@ -1121,14 +1121,14 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, if (VALID_FILE (curr_fd + 1) && (FILE_START (curr_fd + 1) <= end_adr)) { TELL_OBJFILE; - warning ("File \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down.", + warning (_("File \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down."), full_name_string, curr_fd); end_adr = FILE_START (curr_fd + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */ } if (VALID_MODULE (curr_md) && (CURR_MODULE_START <= end_adr)) { TELL_OBJFILE; - warning ("File \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down.", + warning (_("File \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down."), full_name_string, curr_fd); end_adr = CURR_MODULE_START - 1; /* Is -4 (or -8 for 64-bit) better? */ } @@ -1226,7 +1226,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, record_pst_syms (start_sym, end_sym); if (NULL == pst) - warning ("No symbols in psymtab for file \"%s\" [0x%x].", full_name_string, curr_fd); + warning (_("No symbols in psymtab for file \"%s\" [0x%x]."), full_name_string, curr_fd); #ifdef DUMPING if (dumping) @@ -1258,7 +1258,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, if (CURR_FILE_START < CURR_MODULE_START) { TELL_OBJFILE; - warning ("File \"%s\" [0x%x] crosses beginning of module \"%s\".", + warning (_("File \"%s\" [0x%x] crosses beginning of module \"%s\"."), &vt_bits[(long) qFD[curr_fd].sbFile], curr_fd, mod_name_string); @@ -1293,7 +1293,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, if (CURR_FILE_END > end_adr) { TELL_OBJFILE; - warning ("File \"%s\" [0x%x] crosses end of module \"%s\".", + warning (_("File \"%s\" [0x%x] crosses end of module \"%s\"."), &vt_bits[(long) qFD[curr_fd].sbFile], curr_fd, mod_name_string); end_adr = CURR_FILE_END; @@ -1310,14 +1310,14 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, if (VALID_MODULE (curr_md + 1) && (MODULE_START (curr_md + 1) <= end_adr)) { TELL_OBJFILE; - warning ("Module \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down.", + warning (_("Module \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down."), mod_name_string, curr_md); end_adr = MODULE_START (curr_md + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */ } if (VALID_FILE (curr_fd + 1) && (FILE_START (curr_fd + 1) <= end_adr)) { TELL_OBJFILE; - warning ("Module \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down.", + warning (_("Module \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down."), mod_name_string, curr_md); end_adr = FILE_START (curr_fd + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */ } @@ -1355,7 +1355,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, if (CURR_PROC_START < start_adr) { TELL_OBJFILE; - warning ("Found procedure \"%s\" [0x%x] that is not in any file or module.", + warning (_("Found procedure \"%s\" [0x%x] that is not in any file or module."), &vt_bits[(long) qPD[curr_pd].sbProc], curr_pd); start_adr = CURR_PROC_START; if (CURR_PROC_ISYM < start_sym) @@ -1454,7 +1454,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, record_pst_syms (start_sym, end_sym); if (NULL == pst) - warning ("No symbols in psymtab for module \"%s\" [0x%x].", mod_name_string, curr_md); + warning (_("No symbols in psymtab for module \"%s\" [0x%x]."), mod_name_string, curr_md); #ifdef DUMPING if (dumping) @@ -1482,7 +1482,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits, start_adr = CURR_PROC_START; end_adr = qPD[pxdb_header_p->pd_entries - 1].adrEnd; TELL_OBJFILE; - warning ("Found functions beyond end of all files and modules [0x%x].", curr_pd); + warning (_("Found functions beyond end of all files and modules [0x%x]."), curr_pd); #ifdef DUMPING if (dumping) { @@ -1609,7 +1609,7 @@ hpread_get_header (struct objfile *objfile, PXDB_header_ptr pxdb_header_p) if (!doc_header.pxdbed) { /* This shouldn't happen if we check in "symfile.c". */ - warning ("File \"%s\" not processed by pxdb!", objfile->name); + warning (_("File \"%s\" not processed by pxdb!"), objfile->name); return 0; } @@ -2890,7 +2890,7 @@ hpread_type_translate (dnttpointer typep) { if (!typep.dntti.immediate) { - error ("error in hpread_type_translate\n."); + error (_("error in hpread_type_translate\n.")); return FT_VOID; } @@ -2966,7 +2966,7 @@ hpread_type_translate (dnttpointer typep) case HP_TYPE_GLOBAL_ANYPOINTER: case HP_TYPE_LOCAL_ANYPOINTER: default: - warning ("hpread_type_translate: unhandled type code.\n"); + warning (_("hpread_type_translate: unhandled type code.")); return FT_VOID; } } @@ -3759,7 +3759,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, fieldp = hpread_get_lntt (field.dnttp.index, objfile); if (fieldp->dblock.kind != DNTT_TYPE_TEMPLATE_ARG) { - warning ("Invalid debug info: Template argument entry is of wrong kind"); + warning (_("Invalid debug info: Template argument entry is of wrong kind")); break; } /* Bump the count */ @@ -3867,9 +3867,9 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, { TYPE_FLAGS (type) |= TYPE_FLAG_INCOMPLETE; if (fixup_class) - warning ("Two classes to fix up for method?? Type information may be incorrect for some classes."); + warning (_("Two classes to fix up for method?? Type information may be incorrect for some classes.")); if (fixup_method) - warning ("Two methods to be fixed up at once?? Type information may be incorrect for some classes."); + warning (_("Two methods to be fixed up at once?? Type information may be incorrect for some classes.")); fixup_class = type; /* remember this class has to be fixed up */ fixup_method = memtype; /* remember the method type to be used in fixup */ } @@ -4053,7 +4053,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, Code below is replicated from the case for FIELDs further below, except that fieldp is replaced by fn_fieldp */ if (!fn_fieldp->dfield.a_union) - warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set"); + warning (_("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set")); /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); memset (new, 0, sizeof (struct nextfield)); @@ -4085,7 +4085,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, { /* Field of anonymous union; union is not inside a class */ if (!fn_fieldp->dsvar.a_union) - warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set"); + warning (_("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set")); /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); memset (new, 0, sizeof (struct nextfield)); @@ -4106,7 +4106,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, { /* Field of anonymous union; union is not inside a class */ if (!fn_fieldp->ddvar.a_union) - warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set"); + warning (_("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set")); /* Get space to record the next field/data-member. */ new = (struct nextfield *) alloca (sizeof (struct nextfield)); memset (new, 0, sizeof (struct nextfield)); @@ -4143,7 +4143,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, if ((fn_fieldp->dblock.kind != DNTT_TYPE_MEMACCESS) && (fn_fieldp->dblock.kind != DNTT_TYPE_MEMENUM) && (fn_fieldp->dblock.kind != DNTT_TYPE_FUNC_TEMPLATE)) - warning ("Internal error: Unexpected debug record kind %d found following DNTT_GENFIELD", + warning (_("Internal error: Unexpected debug record kind %d found following DNTT_GENFIELD"), fn_fieldp->dblock.kind); } /* walk to the next FIELD or GENFIELD */ @@ -4221,9 +4221,9 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, { /* neither field nor genfield ?? is this possible?? */ /* pai:: FIXME walk to the next -- how? */ - warning ("Internal error: unexpected DNTT kind %d encountered as field of struct", + warning (_("Internal error: unexpected DNTT kind %d encountered as field of struct"), fieldp->dblock.kind); - warning ("Skipping remaining fields of struct"); + warning (_("Skipping remaining fields of struct")); break; /* get out of loop of fields */ } } @@ -4540,7 +4540,7 @@ hpread_read_array_type (dnttpointer hp_type, union dnttentry *dn_bufp, if (!((dn_bufp->darray.arrayisbytes && dn_bufp->darray.elemisbytes) || (!dn_bufp->darray.arrayisbytes && !dn_bufp->darray.elemisbytes))) { - warning ("error in hpread_array_type.\n"); + warning (_("error in hpread_array_type.")); return NULL; } else if (dn_bufp->darray.arraylength == 0x7fffffff) @@ -5768,11 +5768,11 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name, priv = (struct hppa_objfile_private *) objfile_data (objfile, hppa_objfile_priv_data); if (priv == NULL) - error ("Internal error in reading shared library information."); + error (_("Internal error in reading shared library information.")); so = ((struct hppa_objfile_private *) priv)->so_info; if (so == NULL) - error ("Internal error in reading shared library information."); + error (_("Internal error in reading shared library information.")); /* Thread-locals in shared libraries do NOT have the * standard offset ("data_offset"), so we re-calculate diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 23b735d..3de9c0b 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -128,7 +128,7 @@ find_tcb (ptid_t ptid) } } - error ("Can't find TCB %d", thread); + error (_("Can't find TCB %d"), thread); return NULL; } @@ -186,7 +186,7 @@ hpux_thread_resume (ptid_t ptid, int step, enum target_signal signo) { pid = thread_to_lwp (pid, -2); if (pid == -2) /* Inactive thread */ - error ("This version of Solaris can't start inactive threads."); + error (_("This version of Solaris can't start inactive threads.")); } #endif diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index d61c999..78394d0 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -180,7 +180,7 @@ fetch_register (int regno) errno = 0; val = ptrace (PTRACE_PEEKUSER, tid, register_addr (regno, 0), 0); if (errno != 0) - error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno), + error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regno), regno, safe_strerror (errno)); regcache_raw_supply (current_regcache, regno, &val); @@ -207,7 +207,7 @@ store_register (int regno) regcache_raw_collect (current_regcache, regno, &val); ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val); if (errno != 0) - error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regno), + error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regno), regno, safe_strerror (errno)); } diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 9574c69..6c349a2 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -308,7 +308,7 @@ i386_linux_sigcontext_addr (struct frame_info *next_frame) return ucontext_addr + I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET; } - error ("Couldn't recognize signal trampoline."); + error (_("Couldn't recognize signal trampoline.")); return 0; } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 1033eaf..6fca2b2 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1289,7 +1289,7 @@ i386_extract_return_value (struct gdbarch *gdbarch, struct type *type, { if (tdep->st0_regnum < 0) { - warning ("Cannot find floating-point return value."); + warning (_("Cannot find floating-point return value.")); memset (valbuf, 0, len); return; } @@ -1345,7 +1345,7 @@ i386_store_return_value (struct gdbarch *gdbarch, struct type *type, if (tdep->st0_regnum < 0) { - warning ("Cannot set floating-point return value."); + warning (_("Cannot set floating-point return value.")); return; } diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c index 97e3304..4456715 100644 --- a/gdb/i386bsd-nat.c +++ b/gdb/i386bsd-nat.c @@ -370,9 +370,9 @@ _initialize_i386bsd_nat (void) if (SC_PC_OFFSET != offset) { - warning ("\ + warning (_("\ offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\ -Please report this to <bug-gdb@gnu.org>.", +Please report this to <bug-gdb@gnu.org>."), offset, SC_PC_OFFSET); } @@ -383,9 +383,9 @@ Please report this to <bug-gdb@gnu.org>.", if (SC_SP_OFFSET != offset) { - warning ("\ + warning (_("\ offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\ -Please report this to <bug-gdb@gnu.org>.", +Please report this to <bug-gdb@gnu.org>."), offset, SC_SP_OFFSET); } @@ -396,9 +396,9 @@ Please report this to <bug-gdb@gnu.org>.", if (SC_FP_OFFSET != offset) { - warning ("\ + warning (_("\ offsetof (struct sigcontext, sc_fp) yields %d instead of %d.\n\ -Please report this to <bug-gdb@gnu.org>.", +Please report this to <bug-gdb@gnu.org>."), offset, SC_FP_OFFSET); } diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c index 023fbb7..195d985 100644 --- a/gdb/i386gnu-nat.c +++ b/gdb/i386gnu-nat.c @@ -75,7 +75,7 @@ fetch_fpregs (struct proc *thread) (thread_state_t) &state, &count); if (err) { - warning ("Couldn't fetch floating-point state from %s", + warning (_("Couldn't fetch floating-point state from %s"), proc_string (thread)); return; } @@ -121,7 +121,7 @@ gnu_fetch_registers (int regno) thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid)); if (!thread) - error ("Can't fetch registers from thread %d: No such thread", + error (_("Can't fetch registers from thread %d: No such thread"), PIDGET (inferior_ptid)); if (regno < I386_NUM_GREGS || regno == -1) @@ -132,7 +132,7 @@ gnu_fetch_registers (int regno) state = proc_get_state (thread, 0); if (!state) { - warning ("Couldn't fetch registers from %s", + warning (_("Couldn't fetch registers from %s"), proc_string (thread)); return; } @@ -179,7 +179,7 @@ store_fpregs (struct proc *thread, int regno) (thread_state_t) &state, &count); if (err) { - warning ("Couldn't fetch floating-point state from %s", + warning (_("Couldn't fetch floating-point state from %s"), proc_string (thread)); return; } @@ -192,7 +192,7 @@ store_fpregs (struct proc *thread, int regno) (thread_state_t) &state, i386_FLOAT_STATE_COUNT); if (err) { - warning ("Couldn't store floating-point state into %s", + warning (_("Couldn't store floating-point state into %s"), proc_string (thread)); return; } @@ -210,7 +210,7 @@ gnu_store_registers (int regno) thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid)); if (!thread) - error ("Couldn't store registers into thread %d: No such thread", + error (_("Couldn't store registers into thread %d: No such thread"), PIDGET (inferior_ptid)); if (regno < I386_NUM_GREGS || regno == -1) @@ -227,7 +227,7 @@ gnu_store_registers (int regno) state = proc_get_state (thread, 1); if (!state) { - warning ("Couldn't store registers into %s", proc_string (thread)); + warning (_("Couldn't store registers into %s"), proc_string (thread)); return; } @@ -247,14 +247,14 @@ gnu_store_registers (int regno) register_size (current_gdbarch, check_regno))) /* Register CHECK_REGNO has changed! Ack! */ { - warning ("Register %s changed after the thread was aborted", + warning (_("Register %s changed after the thread was aborted"), REGISTER_NAME (check_regno)); if (regno >= 0 && regno != check_regno) /* Update GDB's copy of the register. */ regcache_raw_supply (regcache, check_regno, REG_ADDR (state, check_regno)); else - warning ("... also writing this register! Suspicious..."); + warning (_("... also writing this register! Suspicious...")); } } diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 04b43df..ef4add6 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -304,8 +304,8 @@ i387_register_to_value (struct frame_info *frame, int regnum, /* We only support floating-point values. */ if (TYPE_CODE (type) != TYPE_CODE_FLT) { - warning ("Cannot convert floating-point register value " - "to non-floating-point type."); + warning (_("Cannot convert floating-point register value " + "to non-floating-point type.")); return; } @@ -329,8 +329,8 @@ i387_value_to_register (struct frame_info *frame, int regnum, /* We only support floating-point values. */ if (TYPE_CODE (type) != TYPE_CODE_FLT) { - warning ("Cannot convert non-floating-point type " - "to floating-point register value."); + warning (_("Cannot convert non-floating-point type " + "to floating-point register value.")); return; } diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index bfa177c..cb9a438 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -308,7 +308,7 @@ register_addr (int regno, CORE_ADDR blockend) CORE_ADDR addr; if (regno < 0 || regno >= NUM_REGS) - error ("Invalid register number %d.", regno); + error (_("Invalid register number %d."), regno); if (u_offsets[regno] == -1) addr = 0; diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 48fd0d1..20a56e6 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -474,8 +474,8 @@ fetch_instruction (CORE_ADDR addr, instruction_type *it, long long *instr) at the assembly language level. */ if (slotnum > 2) { - warning ("Can't fetch instructions for slot numbers greater than 2.\n" - "Using slot 0 instead"); + warning (_("Can't fetch instructions for slot numbers greater than 2.\n" + "Using slot 0 instead")); slotnum = 0; } @@ -532,7 +532,7 @@ ia64_memory_insert_breakpoint (CORE_ADDR addr, char *contents_cache) int template; if (slotnum > 2) - error("Can't insert breakpoint for slot numbers greater than 2."); + error (_("Can't insert breakpoint for slot numbers greater than 2.")); addr &= ~0x0f; @@ -1550,7 +1550,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache, gdb_assert (regnum >= 0); if (!target_has_registers) - error ("No registers."); + error (_("No registers.")); *optimizedp = 0; *addrp = 0; @@ -1951,7 +1951,7 @@ ia64_sigtramp_frame_prev_register (struct frame_info *next_frame, gdb_assert (regnum >= 0); if (!target_has_registers) - error ("No registers."); + error (_("No registers.")); *optimizedp = 0; *addrp = 0; @@ -2744,7 +2744,7 @@ ia64_extract_return_value (struct type *type, struct regcache *regcache, void *v CORE_ADDR ia64_extract_struct_value_address (struct regcache *regcache) { - error ("ia64_extract_struct_value_address called and cannot get struct value address"); + error (_("ia64_extract_struct_value_address called and cannot get struct value address")); return 0; } diff --git a/gdb/inf-child.c b/gdb/inf-child.c index b0d9c69..31bdd29 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -73,7 +73,7 @@ inf_child_prepare_to_store (void) static void inf_child_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } static void diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 71afc3a..7733eec 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -192,10 +192,10 @@ inf_ptrace_attach (char *args, int from_tty) pid = strtol (args, &dummy, 0); /* Some targets don't set errno on errors, grrr! */ if (pid == 0 && args == dummy) - error ("Illegal process-id: %s\n", args); + error (_("Illegal process-id: %s."), args); if (pid == getpid ()) /* Trying to masturbate? */ - error ("I refuse to debug myself!"); + error (_("I refuse to debug myself!")); if (from_tty) { @@ -218,7 +218,7 @@ inf_ptrace_attach (char *args, int from_tty) perror_with_name ("ptrace"); attach_flag = 1; #else - error ("This system does not support attaching to a process"); + error (_("This system does not support attaching to a process")); #endif inferior_ptid = pid_to_ptid (pid); @@ -268,7 +268,7 @@ inf_ptrace_detach (char *args, int from_tty) perror_with_name ("ptrace"); attach_flag = 0; #else - error ("This system does not support detaching from a process"); + error (_("This system does not support detaching from a process")); #endif inferior_ptid = null_ptid; @@ -288,7 +288,7 @@ inf_ptrace_files_info (struct target_ops *ignore) static void inf_ptrace_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } /* Stub function which causes the inferior that runs it, to be ptrace-able @@ -593,7 +593,7 @@ inf_ptrace_fetch_register (int regnum) errno = 0; buf[i] = ptrace (PT_READ_U, pid, (PTRACE_TYPE_ARG3) addr, 0); if (errno != 0) - error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regnum), + error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); addr += sizeof (PTRACE_TYPE_RET); @@ -644,7 +644,7 @@ inf_ptrace_store_register (int regnum) errno = 0; ptrace (PT_WRITE_U, pid, (PTRACE_TYPE_ARG3) addr, buf[i]); if (errno != 0) - error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regnum), + error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); addr += sizeof (PTRACE_TYPE_RET); diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c index e560e58..5f83712 100644 --- a/gdb/inf-ttrace.c +++ b/gdb/inf-ttrace.c @@ -573,10 +573,10 @@ inf_ttrace_attach (char *args, int from_tty) dummy = args; pid = strtol (args, &dummy, 0); if (pid == 0 && args == dummy) - error ("Illegal process-id: %s\n", args); + error (_("Illegal process-id: %s."), args); if (pid == getpid ()) /* Trying to masturbate? */ - error ("I refuse to debug myself!"); + error (_("I refuse to debug myself!")); if (from_tty) { diff --git a/gdb/infcall.c b/gdb/infcall.c index 8febf82..67bcb5b 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -204,7 +204,7 @@ find_function_addr (struct value *function, struct type **retval_type) value_type = builtin_type_int; } else - error ("Invalid data type for function to be called."); + error (_("Invalid data type for function to be called.")); if (retval_type != NULL) *retval_type = value_type; @@ -485,7 +485,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) } if (nargs < TYPE_NFIELDS (ftype)) - error ("too few arguments in function call"); + error (_("too few arguments in function call")); { int i; @@ -541,9 +541,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) char *arg_name; /* NOTE: cagney/2005-01-02: THIS IS BOGUS. */ if (find_pc_partial_function ((CORE_ADDR) value_contents (args[i])[0], &arg_name, NULL, NULL)) - error ("\ + error (_("\ You cannot use function <%s> as argument. \n\ -You must use a pointer to function type variable. Command ignored.", arg_name); +You must use a pointer to function type variable. Command ignored."), arg_name); } } } @@ -648,7 +648,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name); sp = DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr); else - error ("This target does not support function calls"); + error (_("This target does not support function calls")); /* Set up a frame ID for the dummy frame so we can pass it to set_momentary_breakpoint. We need to give the breakpoint a frame @@ -770,11 +770,11 @@ You must use a pointer to function type variable. Command ignored.", arg_name); /* FIXME: Insert a bunch of wrap_here; name can be very long if it's a C++ name with arguments and stuff. */ - error ("\ + error (_("\ The program being debugged was signaled while in a function called from GDB.\n\ GDB has restored the context to what it was before the call.\n\ To change this behavior use \"set unwindonsignal off\"\n\ -Evaluation of the expression containing the function (%s) will be abandoned.", +Evaluation of the expression containing the function (%s) will be abandoned."), name); } else @@ -790,11 +790,11 @@ Evaluation of the expression containing the function (%s) will be abandoned.", discard_inferior_status (inf_status); /* FIXME: Insert a bunch of wrap_here; name can be very long if it's a C++ name with arguments and stuff. */ - error ("\ + error (_("\ The program being debugged was signaled while in a function called from GDB.\n\ GDB remains in the frame where the signal was received.\n\ To change this behavior use \"set unwindonsignal on\"\n\ -Evaluation of the expression containing the function (%s) will be abandoned.", +Evaluation of the expression containing the function (%s) will be abandoned."), name); } } @@ -817,11 +817,11 @@ Evaluation of the expression containing the function (%s) will be abandoned.", someday this will be implemented (it would not be easy). */ /* FIXME: Insert a bunch of wrap_here; name can be very long if it's a C++ name with arguments and stuff. */ - error ("\ + error (_("\ The program being debugged stopped while in a function called from GDB.\n\ When the function (%s) is done executing, GDB will silently\n\ stop (instead of continuing to evaluate the expression containing\n\ -the function call).", name); +the function call)."), name); } /* The above code errors out, so ... */ diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 1a7f03e..8e66475 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -120,7 +120,7 @@ void _initialize_infcmd (void); #define GO_USAGE "Usage: go <location>\n" #define ERROR_NO_INFERIOR \ - if (!target_has_execution) error ("The program is not being run."); + if (!target_has_execution) error (_("The program is not being run.")); /* String containing arguments to give to the program, separated by spaces. Empty string (pointer to '\0') means no args. */ @@ -319,7 +319,7 @@ construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) if (cp == NULL) cp = strchr (argv[i], '\n'); if (cp != NULL) - error ("can't handle command-line argument containing whitespace"); + error (_("can't handle command-line argument containing whitespace")); length += strlen (argv[i]) + 1; } @@ -389,7 +389,7 @@ kill_if_already_running (int from_tty) if (from_tty && !query ("The program being debugged has been started already.\n\ Start it from the beginning? ")) - error ("Program not restarted."); + error (_("Program not restarted.")); target_kill (); #if defined(SOLIB_RESTART) SOLIB_RESTART (); @@ -445,7 +445,7 @@ run_command (char *args, int from_tty) /* If we get a request for running in the bg but the target doesn't support it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we don't get a request of running in the bg, then we need to simulate synchronous (fg) execution. */ @@ -502,7 +502,7 @@ start_command (char *args, int from_tty) minimal symbols for the location where to put the temporary breakpoint before starting. */ if (!have_minimal_symbols ()) - error ("No symbol table loaded. Use the \"file\" command."); + error (_("No symbol table loaded. Use the \"file\" command.")); /* If the inferior is already running, we want to ask the user if we should restart it or not before we insert the temporary breakpoint. @@ -528,7 +528,7 @@ continue_command (char *proc_count_exp, int from_tty) /* If we must run in the background, but the target can't do it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we are not asked to run in the bg, then prepare to run in the foreground, synchronously. */ @@ -622,7 +622,7 @@ step_1 (int skip_subroutines, int single_inst, char *count_string) /* If we get a request for running in the bg but the target doesn't support it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we don't get a request of running in the bg, then we need to simulate synchronous (fg) execution. */ @@ -652,7 +652,7 @@ step_1 (int skip_subroutines, int single_inst, char *count_string) frame = get_current_frame (); if (!frame) /* Avoid coredump here. Why tho? */ - error ("No current frame"); + error (_("No current frame")); step_frame_id = get_frame_id (frame); if (!single_inst) @@ -663,7 +663,7 @@ step_1 (int skip_subroutines, int single_inst, char *count_string) char *name; if (find_pc_partial_function (stop_pc, &name, &step_range_start, &step_range_end) == 0) - error ("Cannot find bounds of current function"); + error (_("Cannot find bounds of current function")); target_terminal_ours (); printf_filtered ("\ @@ -751,7 +751,7 @@ step_once (int skip_subroutines, int single_inst, int count) frame = get_current_frame (); if (!frame) /* Avoid coredump here. Why tho? */ - error ("No current frame"); + error (_("No current frame")); step_frame_id = get_frame_id (frame); if (!single_inst) @@ -768,7 +768,7 @@ step_once (int skip_subroutines, int single_inst, int count) char *name; if (find_pc_partial_function (stop_pc, &name, &step_range_start, &step_range_end) == 0) - error ("Cannot find bounds of current function"); + error (_("Cannot find bounds of current function")); target_terminal_ours (); printf_filtered ("\ @@ -830,7 +830,7 @@ jump_command (char *arg, int from_tty) /* If we must run in the background, but the target can't do it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we are not asked to run in the bg, then prepare to run in the foreground, synchronously. */ @@ -846,14 +846,14 @@ jump_command (char *arg, int from_tty) sals = decode_line_spec_1 (arg, 1); if (sals.nelts != 1) { - error ("Unreasonable jump request"); + error (_("Unreasonable jump request")); } sal = sals.sals[0]; xfree (sals.sals); if (sal.symtab == 0 && sal.pc == 0) - error ("No source file has been specified."); + error (_("No source file has been specified.")); resolve_sal_pc (&sal); /* May error out */ @@ -865,7 +865,7 @@ jump_command (char *arg, int from_tty) if (!query ("Line %d is not in `%s'. Jump anyway? ", sal.line, SYMBOL_PRINT_NAME (fn))) { - error ("Not confirmed."); + error (_("Not confirmed.")); /* NOTREACHED */ } } @@ -878,7 +878,7 @@ jump_command (char *arg, int from_tty) { if (!query ("WARNING!!! Destination is in unmapped overlay! Jump anyway? ")) { - error ("Not confirmed."); + error (_("Not confirmed.")); /* NOTREACHED */ } } @@ -990,7 +990,7 @@ until_next_command (int from_tty) struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (pc); if (msymbol == NULL) - error ("Execution is not within a known function."); + error (_("Execution is not within a known function.")); step_range_start = SYMBOL_VALUE_ADDRESS (msymbol); step_range_end = pc; @@ -1017,7 +1017,7 @@ until_command (char *arg, int from_tty) int async_exec = 0; if (!target_has_execution) - error ("The program is not running."); + error (_("The program is not running.")); /* Find out whether we must run in the background. */ if (arg != NULL) @@ -1026,7 +1026,7 @@ until_command (char *arg, int from_tty) /* If we must run in the background, but the target can't do it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we are not asked to run in the bg, then prepare to run in the foreground, synchronously. */ @@ -1048,7 +1048,7 @@ advance_command (char *arg, int from_tty) int async_exec = 0; if (!target_has_execution) - error ("The program is not running."); + error (_("The program is not running.")); if (arg == NULL) error_no_arg ("a location"); @@ -1060,7 +1060,7 @@ advance_command (char *arg, int from_tty) /* If we must run in the background, but the target can't do it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we are not asked to run in the bg, then prepare to run in the foreground, synchronously. */ @@ -1201,7 +1201,7 @@ finish_command (char *arg, int from_tty) /* If we must run in the background, but the target can't do it, error out. */ if (async_exec && !target_can_async_p ()) - error ("Asynchronous execution not supported on this target."); + error (_("Asynchronous execution not supported on this target.")); /* If we are not asked to run in the bg, then prepare to run in the foreground, synchronously. */ @@ -1212,15 +1212,15 @@ finish_command (char *arg, int from_tty) } if (arg) - error ("The \"finish\" command does not take any arguments."); + error (_("The \"finish\" command does not take any arguments.")); if (!target_has_execution) - error ("The program is not running."); + error (_("The program is not running.")); if (deprecated_selected_frame == NULL) - error ("No selected frame."); + error (_("No selected frame.")); frame = get_prev_frame (deprecated_selected_frame); if (frame == 0) - error ("\"finish\" not meaningful in the outermost frame."); + error (_("\"finish\" not meaningful in the outermost frame.")); clear_proceed_status (); @@ -1600,9 +1600,9 @@ registers_info (char *addr_exp, int fpregs) char *end; if (!target_has_registers) - error ("The program has no registers now."); + error (_("The program has no registers now.")); if (deprecated_selected_frame == NULL) - error ("No selected frame."); + error (_("No selected frame.")); if (!addr_exp) { @@ -1628,7 +1628,7 @@ registers_info (char *addr_exp, int fpregs) if (addr_exp[0] == '$') addr_exp++; if (isspace ((*addr_exp)) || (*addr_exp) == '\0') - error ("Missing register name"); + error (_("Missing register name")); /* Find the start/end of this register name/num/group. */ start = addr_exp; @@ -1693,7 +1693,7 @@ registers_info (char *addr_exp, int fpregs) } /* Nothing matched. */ - error ("Invalid register `%.*s'", (int) (end - start), start); + error (_("Invalid register `%.*s'"), (int) (end - start), start); } } @@ -1714,9 +1714,9 @@ print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) { if (!target_has_registers) - error ("The program has no registers now."); + error (_("The program has no registers now.")); if (deprecated_selected_frame == NULL) - error ("No selected frame."); + error (_("No selected frame.")); if (gdbarch_print_vector_info_p (gdbarch)) gdbarch_print_vector_info (gdbarch, file, frame, args); @@ -1774,7 +1774,7 @@ attach_command (char *args, int from_tty) if (query ("A program is being debugged already. Kill it? ")) target_kill (); else - error ("Not killed."); + error (_("Not killed.")); } /* Clear out solib state. Otherwise the solib state of the previous @@ -1930,9 +1930,9 @@ print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) { if (!target_has_registers) - error ("The program has no registers now."); + error (_("The program has no registers now.")); if (deprecated_selected_frame == NULL) - error ("No selected frame."); + error (_("No selected frame.")); if (gdbarch_print_float_info_p (gdbarch)) gdbarch_print_float_info (gdbarch, file, frame, args); diff --git a/gdb/inflow.c b/gdb/inflow.c index fbbbbb1..7ea00e0 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -579,9 +579,9 @@ kill_command (char *arg, int from_tty) some targets don't have processes! */ if (ptid_equal (inferior_ptid, null_ptid)) - error ("The program is not being run."); + error (_("The program is not being run.")); if (!query ("Kill the program being debugged? ")) - error ("Not confirmed."); + error (_("Not confirmed.")); target_kill (); init_thread_list (); /* Destroy thread info */ diff --git a/gdb/infptrace.c b/gdb/infptrace.c index 1a15029..e69c569 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -162,7 +162,7 @@ attach (int pid) attach_flag = 1; return pid; #else - error ("This system does not support attaching to a process"); + error (_("This system does not support attaching to a process")); #endif } @@ -181,7 +181,7 @@ detach (int signal) perror_with_name ("ptrace"); attach_flag = 0; #else - error ("This system does not support detaching from a process"); + error (_("This system does not support detaching from a process")); #endif } @@ -235,7 +235,7 @@ fetch_register (int regnum) errno = 0; buf[i] = ptrace (PT_READ_U, tid, (PTRACE_TYPE_ARG3) addr, 0); if (errno != 0) - error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regnum), + error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regnum), regnum, safe_strerror (errno)); addr += sizeof (PTRACE_TYPE_RET); @@ -288,7 +288,7 @@ store_register (int regnum) errno = 0; ptrace (PT_WRITE_U, tid, (PTRACE_TYPE_ARG3) addr, buf[i]); if (errno != 0) - error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regnum), + error (_("Couldn't write register %s (#%d): %s.")e, REGISTER_NAME (regnum), regnum, safe_strerror (errno)); addr += sizeof (PTRACE_TYPE_RET); @@ -464,7 +464,7 @@ udot_info (char *dummy1, int dummy2) if (!target_has_execution) { - error ("The program is not being run."); + error (_("The program is not being run.")); } #if !defined (KERNEL_U_SIZE) @@ -473,7 +473,7 @@ udot_info (char *dummy1, int dummy2) routine, called "kernel_u_size" that returns the size of the user struct, to the appropriate *-nat.c file and then add to the native config file "#define KERNEL_U_SIZE kernel_u_size()" */ - error ("Don't know how large ``struct user'' is in this version of gdb."); + error (_("Don't know how large ``struct user'' is in this version of gdb.")); #else diff --git a/gdb/infrun.c b/gdb/infrun.c index dd32590..09be710 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -174,10 +174,10 @@ static int debug_infrun = 0; static void default_skip_permanent_breakpoint (void) { - error ("\ + error (_("\ The program is stopped at a permanent breakpoint, but GDB does not know\n\ how to step past a permanent breakpoint on this architecture. Try using\n\ -a command like `return' or `jump' to continue execution."); +a command like `return' or `jump' to continue execution.")); } #endif @@ -399,7 +399,7 @@ follow_exec (int pid, char *execd_pathname) tgt = find_run_target (); /* If we can't find one, things are in a very strange state... */ if (tgt == NULL) - error ("Could find run target to save before following exec"); + error (_("Could find run target to save before following exec")); gdb_flush (gdb_stdout); target_mourn_inferior (); @@ -482,7 +482,7 @@ set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c) if (!target_can_lock_scheduler) { scheduler_mode = schedlock_off; - error ("Target '%s' cannot support this command.", target_shortname); + error (_("Target '%s' cannot support this command."), target_shortname); } } @@ -3289,7 +3289,7 @@ handle_command (char *args, int from_tty) else { /* Not a number and not a recognized flag word => complain. */ - error ("Unrecognized or ambiguous flag word: \"%s\".", *argv); + error (_("Unrecognized or ambiguous flag word: \"%s\"."), *argv); } } @@ -3548,7 +3548,7 @@ restore_selected_frame (void *args) selected frame. */ if (frame == NULL) { - warning ("Unable to restore previously selected frame.\n"); + warning (_("Unable to restore previously selected frame.")); return 0; } diff --git a/gdb/inftarg.c b/gdb/inftarg.c index 2f04365..1d0b286 100644 --- a/gdb/inftarg.c +++ b/gdb/inftarg.c @@ -188,10 +188,10 @@ child_attach (char *args, int from_tty) pid = strtol (args, &dummy, 0); /* Some targets don't set errno on errors, grrr! */ if ((pid == 0) && (args == dummy)) - error ("Illegal process-id: %s\n", args); + error (_("Illegal process-id: %s."), args); if (pid == getpid ()) /* Trying to masturbate? */ - error ("I refuse to debug myself!"); + error (_("I refuse to debug myself!")); if (from_tty) { @@ -284,7 +284,7 @@ child_files_info (struct target_ops *ignore) static void child_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } /* Stub function which causes the inferior that runs it, to be ptrace-able diff --git a/gdb/interps.c b/gdb/interps.c index 4a521ba..669b041 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -144,7 +144,7 @@ interp_set (struct interp *interp) && !current_interpreter->procs->suspend_proc (current_interpreter-> data)) { - error ("Could not suspend interpreter \"%s\"\n", + error (_("Could not suspend interpreter \"%s\"."), current_interpreter->name); } } @@ -368,7 +368,7 @@ interpreter_exec_cmd (char *args, int from_tty) prules = buildargv (args); if (prules == NULL) { - error ("unable to parse arguments"); + error (_("unable to parse arguments")); } nrules = 0; @@ -381,20 +381,20 @@ interpreter_exec_cmd (char *args, int from_tty) } if (nrules < 2) - error ("usage: interpreter-exec <interpreter> [ <command> ... ]"); + error (_("usage: interpreter-exec <interpreter> [ <command> ... ]")); old_interp = current_interpreter; interp_to_use = interp_lookup (prules[0]); if (interp_to_use == NULL) - error ("Could not find interpreter \"%s\".", prules[0]); + error (_("Could not find interpreter \"%s\"."), prules[0]); /* Temporarily set interpreters quiet */ old_quiet = interp_set_quiet (old_interp, 1); use_quiet = interp_set_quiet (interp_to_use, 1); if (!interp_set (interp_to_use)) - error ("Could not switch to interpreter \"%s\".", prules[0]); + error (_("Could not switch to interpreter \"%s\"."), prules[0]); for (i = 1; i < nrules; i++) { @@ -403,7 +403,7 @@ interpreter_exec_cmd (char *args, int from_tty) { interp_set (old_interp); interp_set_quiet (interp_to_use, old_quiet); - error ("error in command: \"%s\".", prules[i]); + error (_("error in command: \"%s\"."), prules[i]); break; } } diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index 9461c0c..6686713 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -252,7 +252,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, } else { - warning ("wrong size gregset struct in core file"); + warning (_("wrong size gregset struct in core file")); return; } } diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index 230ee86..08f736a 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -580,7 +580,7 @@ get_java_object_type (void) sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, (int *) 0, (struct symtab **) NULL); if (sym == NULL) - error ("cannot find java.lang.Object"); + error (_("cannot find java.lang.Object")); java_object_type = SYMBOL_TYPE (sym); } return java_object_type; @@ -646,7 +646,7 @@ java_primitive_type (int signature) case 'V': return java_void_type; } - error ("unknown signature '%c' for primitive type", (char) signature); + error (_("unknown signature '%c' for primitive type"), (char) signature); } /* If name[0 .. namelen-1] is the name of a primitive Java type, @@ -790,7 +790,7 @@ java_array_type (struct type *type, int dims) static struct value * java_value_string (char *ptr, int len) { - error ("not implemented - java_value_string"); /* FIXME */ + error (_("not implemented - java_value_string")); /* FIXME */ } /* Print the character C on STREAM as part of the contents of a literal @@ -903,7 +903,7 @@ evaluate_subexp_java (struct type *expect_type, struct expression *exp, length = (long) extract_signed_integer (buf4, 4); index = (long) value_as_long (arg2); if (index >= length || index < 0) - error ("array index (%ld) out of bounds (length: %ld)", + error (_("array index (%ld) out of bounds (length: %ld)"), index, length); address = (address + 4) + index * TYPE_LENGTH (el_type); return value_at (el_type, address); @@ -916,9 +916,9 @@ evaluate_subexp_java (struct type *expect_type, struct expression *exp, return value_subscript (arg1, arg2); } if (name) - error ("cannot subscript something of type `%s'", name); + error (_("cannot subscript something of type `%s'"), name); else - error ("cannot subscript requested type"); + error (_("cannot subscript requested type")); case OP_STRING: (*pos)++; diff --git a/gdb/kod-cisco.c b/gdb/kod-cisco.c index de2b450..1c53840 100644 --- a/gdb/kod-cisco.c +++ b/gdb/kod-cisco.c @@ -79,9 +79,9 @@ cisco_kod_open (kod_display_callback_ftype *display_func, } if (buffer[i] == '\0') - error ("Remote returned malformed packet\n"); + error (_("Remote returned malformed packet.")); if (strcmp (&buffer[i], "0.0.0")) - error ("Remote returned unknown stub version: %s\n", &buffer[i]); + error (_("Remote returned unknown stub version: %s."), &buffer[i]); /* Return name, version, and description. I hope we have enough space. */ @@ -117,7 +117,7 @@ gdb_kod_query (char *arg, char *result, int *maxsiz) /* See if buffer can hold the query (usually it can, as the query is short). */ if (strlen (arg) >= bufsiz) - error ("kod: query argument too long"); + error (_("kod: query argument too long")); /* Send actual request. */ if (target_read_partial (¤t_target, TARGET_OBJECT_KOD, @@ -225,7 +225,7 @@ load_kod_library (char *lib) gdb_kod_close = cisco_kod_close; } else - error ("Unknown operating system: %s\n", operating_system); + error (_("Unknown operating system: %s."), operating_system); } void diff --git a/gdb/language.c b/gdb/language.c index eb853d1..e10ac60 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -228,7 +228,7 @@ set_language_command (char *ignore, int from_tty) err_lang = savestring (language, strlen (language)); make_cleanup (xfree, err_lang); /* Free it after error */ set_language (current_language->la_language); - error ("Unknown language `%s'.", err_lang); + error (_("Unknown language `%s'."), err_lang); } /* Show command. Display a warning if the type setting does @@ -270,7 +270,7 @@ set_type_command (char *ignore, int from_tty) } else { - warning ("Unrecognized type check setting: \"%s\"", type); + warning (_("Unrecognized type check setting: \"%s\""), type); } set_type_str (); show_type_command ((char *) NULL, from_tty); @@ -316,7 +316,7 @@ set_range_command (char *ignore, int from_tty) } else { - warning ("Unrecognized range check setting: \"%s\"", range); + warning (_("Unrecognized range check setting: \"%s\""), range); } set_range_str (); show_range_command ((char *) 0, from_tty); @@ -356,7 +356,7 @@ set_case_command (char *ignore, int from_tty) } else { - warning ("Unrecognized case-sensitive setting: \"%s\"", case_sensitive); + warning (_("Unrecognized case-sensitive setting: \"%s\""), case_sensitive); } set_case_str(); show_case_command ((char *) NULL, from_tty); @@ -445,7 +445,7 @@ set_type_str (void) tmp = "warn"; break; default: - error ("Unrecognized type check setting."); + error (_("Unrecognized type check setting.")); } type = concat (prefix, tmp, NULL); @@ -471,7 +471,7 @@ set_range_str (void) tmp = "warn"; break; default: - error ("Unrecognized range check setting."); + error (_("Unrecognized range check setting.")); } if (range) @@ -496,7 +496,7 @@ set_case_str (void) tmp = "off"; break; default: - error ("Unrecognized case-sensitive setting."); + error (_("Unrecognized case-sensitive setting.")); } xfree (case_sensitive); @@ -663,7 +663,7 @@ integral_type (struct type *type) case language_pascal: return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1; default: - error ("Language not supported."); + error (_("Language not supported.")); } } @@ -1074,39 +1074,39 @@ unk_lang_parser (void) static void unk_lang_error (char *msg) { - error ("Attempted to parse an expression with unknown language"); + error (_("Attempted to parse an expression with unknown language")); } static void unk_lang_emit_char (int c, struct ui_file *stream, int quoter) { - error ("internal error - unimplemented function unk_lang_emit_char called."); + error (_("internal error - unimplemented function unk_lang_emit_char called.")); } static void unk_lang_printchar (int c, struct ui_file *stream) { - error ("internal error - unimplemented function unk_lang_printchar called."); + error (_("internal error - unimplemented function unk_lang_printchar called.")); } static void unk_lang_printstr (struct ui_file *stream, const bfd_byte *string, unsigned int length, int width, int force_ellipses) { - error ("internal error - unimplemented function unk_lang_printstr called."); + error (_("internal error - unimplemented function unk_lang_printstr called.")); } static struct type * unk_lang_create_fundamental_type (struct objfile *objfile, int typeid) { - error ("internal error - unimplemented function unk_lang_create_fundamental_type called."); + error (_("internal error - unimplemented function unk_lang_create_fundamental_type called.")); } static void unk_lang_print_type (struct type *type, char *varstring, struct ui_file *stream, int show, int level) { - error ("internal error - unimplemented function unk_lang_print_type called."); + error (_("internal error - unimplemented function unk_lang_print_type called.")); } static int @@ -1115,14 +1115,14 @@ unk_lang_val_print (struct type *type, const bfd_byte *valaddr, struct ui_file *stream, int format, int deref_ref, int recurse, enum val_prettyprint pretty) { - error ("internal error - unimplemented function unk_lang_val_print called."); + error (_("internal error - unimplemented function unk_lang_val_print called.")); } static int unk_lang_value_print (struct value *val, struct ui_file *stream, int format, enum val_prettyprint pretty) { - error ("internal error - unimplemented function unk_lang_value_print called."); + error (_("internal error - unimplemented function unk_lang_value_print called.")); } static CORE_ADDR unk_lang_trampoline (CORE_ADDR pc) diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c index fd953d2..4e5d6b5 100644 --- a/gdb/libunwind-frame.c +++ b/gdb/libunwind-frame.c @@ -162,7 +162,7 @@ libunwind_frame_cache (struct frame_info *next_frame, void **this_cache) uw_sp_regnum = descr->gdb2uw (SP_REGNUM); ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp); if (ret < 0) - error ("Can't get libunwind sp register."); + error (_("Can't get libunwind sp register.")); cache->base = (CORE_ADDR)fp; @@ -252,7 +252,7 @@ libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache, gdb_assert (regnum >= 0); if (!target_has_registers) - error ("No registers."); + error (_("No registers.")); *optimizedp = 0; *addrp = 0; diff --git a/gdb/linespec.c b/gdb/linespec.c index 0d853a7..808f061 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -545,12 +545,12 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline, while (*arg1 >= '0' && *arg1 <= '9') arg1++; if (*arg1 && *arg1 != ' ' && *arg1 != '\t') - error ("Arguments must be choice numbers."); + error (_("Arguments must be choice numbers.")); num = atoi (args); if (num == 0) - error ("canceled"); + error (_("canceled")); else if (num == 1) { if (canonical_arr) @@ -807,7 +807,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, { p = skip_quoted (*argptr); if (p[-1] != '\'') - error ("Unmatched single quote."); + error (_("Unmatched single quote.")); } else if (is_objc_method) { @@ -1012,7 +1012,7 @@ locate_first_half (char **argptr, int *is_quote_enclosed) { char *temp_end = find_template_name_end (p); if (!temp_end) - error ("malformed template specification in command"); + error (_("malformed template specification in command")); p = temp_end; } /* Check for a colon and a plus or minus and a [ (which @@ -1119,7 +1119,7 @@ decode_objc (char **argptr, int funfirstline, struct symtab *file_symtab, sym = find_pc_function (SYMBOL_VALUE_ADDRESS (sym_arr[0])); if ((sym != NULL) && strcmp (SYMBOL_LINKAGE_NAME (sym_arr[0]), SYMBOL_LINKAGE_NAME (sym)) != 0) { - warning ("debugging symbol \"%s\" does not match selector; ignoring", SYMBOL_LINKAGE_NAME (sym)); + warning (_("debugging symbol \"%s\" does not match selector; ignoring"), SYMBOL_LINKAGE_NAME (sym)); sym = NULL; } } @@ -1227,7 +1227,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical, { temp_end = find_template_name_end (p); if (!temp_end) - error ("malformed template specification in command"); + error (_("malformed template specification in command")); p = temp_end; } /* Note that, since, at the start of this loop, p would be @@ -1526,7 +1526,7 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed, if (file_symtab == 0) { if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); if (not_found_ptr) *not_found_ptr = 1; throw_error (NOT_FOUND_ERROR, "No source file named %s.", copy); @@ -1656,7 +1656,7 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index); valx = access_value_history ((copy[1] == '$') ? -index : index); if (TYPE_CODE (value_type (valx)) != TYPE_CODE_INT) - error ("History values used in line specs must have integer values."); + error (_("History values used in line specs must have integer values.")); } else { @@ -1682,7 +1682,7 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, need_canonical = (file_symtab == 0) ? 1 : 0; valx = value_of_internalvar (lookup_internalvar (copy + 1)); if (TYPE_CODE (value_type (valx)) != TYPE_CODE_INT) - error ("Convenience variables used in line specs must have integer values."); + error (_("Convenience variables used in line specs must have integer values.")); } init_sal (&val); @@ -1737,7 +1737,7 @@ decode_variable (char *copy, int funfirstline, char ***canonical, if (!have_full_symbols () && !have_partial_symbols () && !have_minimal_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); if (not_found_ptr) *not_found_ptr = 1; @@ -1786,7 +1786,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy, else { if (funfirstline) - error ("\"%s\" is not a function", copy); + error (_("\"%s\" is not a function"), copy); else if (SYMBOL_LINE (sym) != 0) { /* We know its line number. */ @@ -1804,7 +1804,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy, /* FIXME: Shouldn't we just set .line and .symtab to zero and return? For example, "info line foo" could print the address. */ - error ("Line number not known for symbol \"%s\"", copy); + error (_("Line number not known for symbol \"%s\""), copy); } } diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 6cee9c8..8500493 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -202,9 +202,9 @@ linux_test_for_tracefork (int original_pid) if (ret == -1) perror_with_name ("linux_test_for_tracefork: waitpid"); else if (ret != child_pid) - error ("linux_test_for_tracefork: waitpid: unexpected result %d.", ret); + error (_("linux_test_for_tracefork: waitpid: unexpected result %d."), ret); if (! WIFSTOPPED (status)) - error ("linux_test_for_tracefork: waitpid: unexpected status %d.", status); + error (_("linux_test_for_tracefork: waitpid: unexpected status %d."), status); ret = ptrace (PTRACE_SETOPTIONS, child_pid, 0, PTRACE_O_TRACEFORK); if (ret != 0) @@ -212,16 +212,16 @@ linux_test_for_tracefork (int original_pid) ret = ptrace (PTRACE_KILL, child_pid, 0, 0); if (ret != 0) { - warning ("linux_test_for_tracefork: failed to kill child"); + warning (_("linux_test_for_tracefork: failed to kill child")); return; } ret = my_waitpid (child_pid, &status, 0); if (ret != child_pid) - warning ("linux_test_for_tracefork: failed to wait for killed child"); + warning (_("linux_test_for_tracefork: failed to wait for killed child")); else if (!WIFSIGNALED (status)) - warning ("linux_test_for_tracefork: unexpected wait status 0x%x from " - "killed child", status); + warning (_("linux_test_for_tracefork: unexpected wait status 0x%x from " + "killed child"), status); return; } @@ -233,7 +233,7 @@ linux_test_for_tracefork (int original_pid) ret = ptrace (PTRACE_CONT, child_pid, 0, 0); if (ret != 0) - warning ("linux_test_for_tracefork: failed to resume child"); + warning (_("linux_test_for_tracefork: failed to resume child")); ret = my_waitpid (child_pid, &status, 0); @@ -250,16 +250,16 @@ linux_test_for_tracefork (int original_pid) my_waitpid (second_pid, &second_status, 0); ret = ptrace (PTRACE_KILL, second_pid, 0, 0); if (ret != 0) - warning ("linux_test_for_tracefork: failed to kill second child"); + warning (_("linux_test_for_tracefork: failed to kill second child")); } } else - warning ("linux_test_for_tracefork: unexpected result from waitpid " - "(%d, status 0x%x)", ret, status); + warning (_("linux_test_for_tracefork: unexpected result from waitpid " + "(%d, status 0x%x)"), ret, status); ret = ptrace (PTRACE_KILL, child_pid, 0, 0); if (ret != 0) - warning ("linux_test_for_tracefork: failed to kill child"); + warning (_("linux_test_for_tracefork: failed to kill child")); my_waitpid (child_pid, &status, 0); } @@ -363,8 +363,8 @@ child_follow_fork (int follow_child) ptrace (PTRACE_CONT, parent_pid, 0, 0); waitpid (parent_pid, &status, __WALL); if ((status >> 16) != PTRACE_EVENT_VFORK_DONE) - warning ("Unexpected waitpid result %06x when waiting for " - "vfork-done", status); + warning (_("Unexpected waitpid result %06x when waiting for " + "vfork-done"), status); } else { @@ -525,21 +525,21 @@ void child_insert_fork_catchpoint (int pid) { if (! linux_supports_tracefork (pid)) - error ("Your system does not support fork catchpoints."); + error (_("Your system does not support fork catchpoints.")); } void child_insert_vfork_catchpoint (int pid) { if (!linux_supports_tracefork (pid)) - error ("Your system does not support vfork catchpoints."); + error (_("Your system does not support vfork catchpoints.")); } void child_insert_exec_catchpoint (int pid) { if (!linux_supports_tracefork (pid)) - error ("Your system does not support exec catchpoints."); + error (_("Your system does not support exec catchpoints.")); } void @@ -840,7 +840,7 @@ lin_lwp_attach_lwp (ptid_t ptid, int verbose) int status; if (ptrace (PTRACE_ATTACH, GET_LWP (ptid), 0, 0) < 0) - error ("Can't attach %s: %s", target_pid_to_str (ptid), + error (_("Can't attach %s: %s"), target_pid_to_str (ptid), safe_strerror (errno)); if (debug_linux_nat) @@ -903,7 +903,7 @@ linux_nat_attach (char *args, int from_tty) pid = waitpid (GET_PID (inferior_ptid), &status, 0); if (pid == -1 && errno == ECHILD) { - warning ("%s is a cloned process", target_pid_to_str (inferior_ptid)); + warning (_("%s is a cloned process"), target_pid_to_str (inferior_ptid)); /* Try again with __WCLONE to check cloned processes. */ pid = waitpid (GET_PID (inferior_ptid), &status, __WCLONE); @@ -940,7 +940,7 @@ detach_callback (struct lwp_info *lp, void *data) errno = 0; if (ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, WSTOPSIG (lp->status)) < 0) - error ("Can't continue %s: %s", target_pid_to_str (lp->ptid), + error (_("Can't continue %s: %s"), target_pid_to_str (lp->ptid), safe_strerror (errno)); if (debug_linux_nat) @@ -969,7 +969,7 @@ detach_callback (struct lwp_info *lp, void *data) errno = 0; if (ptrace (PTRACE_DETACH, GET_LWP (lp->ptid), 0, WSTOPSIG (lp->status)) < 0) - error ("Can't detach %s: %s", target_pid_to_str (lp->ptid), + error (_("Can't detach %s: %s"), target_pid_to_str (lp->ptid), safe_strerror (errno)); if (debug_linux_nat) @@ -1753,7 +1753,7 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus) if (pid == -1) { - warning ("Child process unexpectedly missing: %s", + warning (_("Child process unexpectedly missing: %s"), safe_strerror (errno)); /* Claim it exited with unknown signal. */ @@ -2471,7 +2471,7 @@ linux_nat_find_memory_regions (int (*func) (CORE_ADDR, /* Compose the filename for the /proc memory map, and open it. */ sprintf (mapsfilename, "/proc/%lld/maps", pid); if ((mapsfile = fopen (mapsfilename, "r")) == NULL) - error ("Could not open %s\n", mapsfilename); + error (_("Could not open %s."), mapsfilename); if (info_verbose) fprintf_filtered (gdb_stdout, @@ -2723,11 +2723,11 @@ linux_nat_info_proc_cmd (char *args, int from_tty) argv++; } if (pid == 0) - error ("No current process: you must name one."); + error (_("No current process: you must name one.")); sprintf (fname1, "/proc/%lld", pid); if (stat (fname1, &dummy) != 0) - error ("No /proc directory: '%s'", fname1); + error (_("No /proc directory: '%s'"), fname1); printf_filtered ("process %lld\n", pid); if (cmdline_f || all) @@ -2740,7 +2740,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty) fclose (procfile); } else - warning ("unable to open /proc file '%s'", fname1); + warning (_("unable to open /proc file '%s'"), fname1); } if (cwd_f || all) { @@ -2749,7 +2749,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty) if (readlink (fname1, fname2, sizeof (fname2)) > 0) printf_filtered ("cwd = '%s'\n", fname2); else - warning ("unable to read link '%s'", fname1); + warning (_("unable to read link '%s'"), fname1); } if (exe_f || all) { @@ -2758,7 +2758,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty) if (readlink (fname1, fname2, sizeof (fname2)) > 0) printf_filtered ("exe = '%s'\n", fname2); else - warning ("unable to read link '%s'", fname1); + warning (_("unable to read link '%s'"), fname1); } if (mappings_f || all) { @@ -2818,7 +2818,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty) fclose (procfile); } else - warning ("unable to open /proc file '%s'", fname1); + warning (_("unable to open /proc file '%s'"), fname1); } if (status_f || all) { @@ -2830,7 +2830,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty) fclose (procfile); } else - warning ("unable to open /proc file '%s'", fname1); + warning (_("unable to open /proc file '%s'"), fname1); } if (stat_f || all) { @@ -2925,7 +2925,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty) fclose (procfile); } else - warning ("unable to open /proc file '%s'", fname1); + warning (_("unable to open /proc file '%s'"), fname1); } } @@ -2977,7 +2977,7 @@ add_line_to_sigset (const char *line, sigset_t *sigs) int signum; if (line[len] != '\n') - error ("Could not parse signal set: %s", line); + error (_("Could not parse signal set: %s"), line); p = line; signum = len * 4; @@ -2990,7 +2990,7 @@ add_line_to_sigset (const char *line, sigset_t *sigs) else if (*p >= 'a' && *p <= 'f') digit = *p - 'a' + 10; else - error ("Could not parse signal set: %s", line); + error (_("Could not parse signal set: %s"), line); signum -= 4; @@ -3023,7 +3023,7 @@ linux_proc_pending_signals (int pid, sigset_t *pending, sigset_t *blocked, sigse sprintf (fname, "/proc/%d/status", pid); procfile = fopen (fname, "r"); if (procfile == NULL) - error ("Could not open %s", fname); + error (_("Could not open %s"), fname); while (fgets (buffer, MAXPATHLEN, procfile) != NULL) { diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index bf8927d..1488c22 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -262,7 +262,7 @@ thread_get_info_callback (const td_thrhandle_t *thp, void *infop) err = td_thr_get_info_p (thp, &ti); if (err != TD_OK) - error ("thread_get_info_callback: cannot get thread info: %s", + error (_("thread_get_info_callback: cannot get thread info: %s"), thread_db_err_str (err)); /* Fill the cache. */ @@ -319,7 +319,7 @@ thread_db_map_id2thr (struct thread_info *thread_info, int fatal) if (err != TD_OK) { if (fatal) - error ("Cannot find thread %ld: %s", + error (_("Cannot find thread %ld: %s"), (long) GET_THREAD (thread_info->ptid), thread_db_err_str (err)); } @@ -341,7 +341,7 @@ thread_db_get_info (struct thread_info *thread_info) err = td_thr_get_info_p (&thread_info->private->th, &thread_info->private->ti); if (err != TD_OK) - error ("thread_db_get_info: cannot get thread info: %s", + error (_("thread_db_get_info: cannot get thread info: %s"), thread_db_err_str (err)); thread_info->private->ti_valid = 1; @@ -365,7 +365,7 @@ thread_from_lwp (ptid_t ptid) err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th); if (err != TD_OK) - error ("Cannot find user-level thread for LWP %ld: %s", + error (_("Cannot find user-level thread for LWP %ld: %s"), GET_LWP (ptid), thread_db_err_str (err)); thread_info = NULL; @@ -406,7 +406,7 @@ verbose_dlsym (void *handle, const char *name) { void *sym = dlsym (handle, name); if (sym == NULL) - warning ("Symbol \"%s\" not found in libthread_db: %s", name, dlerror ()); + warning (_("Symbol \"%s\" not found in libthread_db: %s"), name, dlerror ()); return sym; } @@ -477,7 +477,7 @@ thread_db_load (void) err = td_init_p (); if (err != TD_OK) { - warning ("Cannot initialize libthread_db: %s", thread_db_err_str (err)); + warning (_("Cannot initialize libthread_db: %s"), thread_db_err_str (err)); return 0; } @@ -545,7 +545,7 @@ enable_thread_event_reporting (void) err = td_ta_set_event_p (thread_agent, &events); if (err != TD_OK) { - warning ("Unable to set global thread event mask: %s", + warning (_("Unable to set global thread event mask: %s"), thread_db_err_str (err)); return; } @@ -559,7 +559,7 @@ enable_thread_event_reporting (void) err = enable_thread_event (thread_agent, TD_CREATE, &td_create_bp_addr); if (err != TD_OK) { - warning ("Unable to get location for thread creation breakpoint: %s", + warning (_("Unable to get location for thread creation breakpoint: %s"), thread_db_err_str (err)); return; } @@ -568,7 +568,7 @@ enable_thread_event_reporting (void) err = enable_thread_event (thread_agent, TD_DEATH, &td_death_bp_addr); if (err != TD_OK) { - warning ("Unable to get location for thread death breakpoint: %s", + warning (_("Unable to get location for thread death breakpoint: %s"), thread_db_err_str (err)); return; } @@ -693,7 +693,7 @@ thread_db_new_objfile (struct objfile *objfile) break; default: - warning ("Cannot initialize thread debugging library: %s", + warning (_("Cannot initialize thread debugging library: %s"), thread_db_err_str (err)); break; } @@ -756,7 +756,7 @@ attach_thread (ptid_t ptid, const td_thrhandle_t *th_p, /* Enable thread event reporting for this thread. */ err = td_thr_event_enable_p (th_p, 1); if (err != TD_OK) - error ("Cannot enable thread event reporting for %s: %s", + error (_("Cannot enable thread event reporting for %s: %s"), target_pid_to_str (ptid), thread_db_err_str (err)); } @@ -886,13 +886,13 @@ check_event (ptid_t ptid) if (err == TD_NOMSG) return; - error ("Cannot get thread event message: %s", + error (_("Cannot get thread event message: %s"), thread_db_err_str (err)); } err = td_thr_get_info_p (msg.th_p, &ti); if (err != TD_OK) - error ("Cannot get thread info: %s", thread_db_err_str (err)); + error (_("Cannot get thread info: %s"), thread_db_err_str (err)); ptid = ptid_build (GET_PID (ptid), ti.ti_lid, ti.ti_tid); @@ -908,14 +908,14 @@ check_event (ptid_t ptid) case TD_DEATH: if (!in_thread_list (ptid)) - error ("Spurious thread death event."); + error (_("Spurious thread death event.")); detach_thread (ptid, 1); break; default: - error ("Spurious thread event."); + error (_("Spurious thread event.")); } } while (loop); @@ -1005,12 +1005,12 @@ thread_db_fetch_registers (int regno) err = td_thr_getgregs_p (&thread_info->private->th, gregset); if (err != TD_OK) - error ("Cannot fetch general-purpose registers for thread %ld: %s", + error (_("Cannot fetch general-purpose registers for thread %ld: %s"), (long) GET_THREAD (inferior_ptid), thread_db_err_str (err)); err = td_thr_getfpregs_p (&thread_info->private->th, &fpregset); if (err != TD_OK) - error ("Cannot get floating-point registers for thread %ld: %s", + error (_("Cannot get floating-point registers for thread %ld: %s"), (long) GET_THREAD (inferior_ptid), thread_db_err_str (err)); /* Note that we must call supply_gregset after calling the thread_db @@ -1052,11 +1052,11 @@ thread_db_store_registers (int regno) err = td_thr_setgregs_p (&thread_info->private->th, gregset); if (err != TD_OK) - error ("Cannot store general-purpose registers for thread %ld: %s", + error (_("Cannot store general-purpose registers for thread %ld: %s"), (long) GET_THREAD (inferior_ptid), thread_db_err_str (err)); err = td_thr_setfpregs_p (&thread_info->private->th, &fpregset); if (err != TD_OK) - error ("Cannot store floating-point registers for thread %ld: %s", + error (_("Cannot store floating-point registers for thread %ld: %s"), (long) GET_THREAD (inferior_ptid), thread_db_err_str (err)); } @@ -1160,7 +1160,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) err = td_thr_get_info_p (th_p, &ti); if (err != TD_OK) - error ("find_new_threads_callback: cannot get thread info: %s", + error (_("find_new_threads_callback: cannot get thread info: %s"), thread_db_err_str (err)); if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE) @@ -1184,7 +1184,7 @@ thread_db_find_new_threads (void) TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY, TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS); if (err != TD_OK) - error ("Cannot find new threads: %s", thread_db_err_str (err)); + error (_("Cannot find new threads: %s"), thread_db_err_str (err)); } static char * @@ -1246,7 +1246,7 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile, /* glibc doesn't provide the needed interface. */ if (!td_thr_tls_get_addr_p) - error ("Cannot find thread-local variables in this thread library."); + error (_("Cannot find thread-local variables in this thread library.")); /* Get the address of the link map for this objfile. */ lm = svr4_fetch_objfile_link_map (objfile); @@ -1255,11 +1255,11 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile, if (!lm) { if (objfile_is_library) - error ("Cannot find shared library `%s' link_map in dynamic" - " linker's module list", objfile->name); + error (_("Cannot find shared library `%s' link_map in dynamic" + " linker's module list"), objfile->name); else - error ("Cannot find executable file `%s' link_map in dynamic" - " linker's module list", objfile->name); + error (_("Cannot find executable file `%s' link_map in dynamic" + " linker's module list"), objfile->name); } /* Get info about the thread. */ @@ -1278,16 +1278,16 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile, address, we *could* try to build a non-lvalue value from the initialization image. */ if (objfile_is_library) - error ("The inferior has not yet allocated storage for" + error (_("The inferior has not yet allocated storage for" " thread-local variables in\n" "the shared library `%s'\n" - "for the thread %ld", + "for the thread %ld"), objfile->name, (long) GET_THREAD (ptid)); else - error ("The inferior has not yet allocated storage for" + error (_("The inferior has not yet allocated storage for" " thread-local variables in\n" "the executable `%s'\n" - "for the thread %ld", + "for the thread %ld"), objfile->name, (long) GET_THREAD (ptid)); } #endif @@ -1296,13 +1296,13 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile, if (err != TD_OK) { if (objfile_is_library) - error ("Cannot find thread-local storage for thread %ld, " - "shared library %s:\n%s", + error (_("Cannot find thread-local storage for thread %ld, " + "shared library %s:\n%s"), (long) GET_THREAD (ptid), objfile->name, thread_db_err_str (err)); else - error ("Cannot find thread-local storage for thread %ld, " - "executable file %s:\n%s", + error (_("Cannot find thread-local storage for thread %ld, " + "executable file %s:\n%s"), (long) GET_THREAD (ptid), objfile->name, thread_db_err_str (err)); } @@ -1315,7 +1315,7 @@ thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile, return target_beneath->to_get_thread_local_address (ptid, objfile, offset); - error ("Cannot find thread-local values on this target."); + error (_("Cannot find thread-local values on this target.")); } static void diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index fdad7b4..116e678 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -208,7 +208,7 @@ m2_create_fundamental_type (struct objfile *objfile, int typeid) type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "<?type?>", objfile); - warning ("internal error: no Modula fundamental type %d", typeid); + warning (_("internal error: no Modula fundamental type %d"), typeid); break; case FT_VOID: type = init_type (TYPE_CODE_VOID, diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index 2372e5d..846233ce 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -126,9 +126,9 @@ m32r_load (char *filename, int from_tty) abfd = bfd_openr (filename, 0); if (!abfd) - error ("Unable to open file %s\n", filename); + error (_("Unable to open file %s."), filename); if (bfd_check_format (abfd, bfd_object) == 0) - error ("File is not an object file\n"); + error (_("File is not an object file.")); start_time = time (NULL); #if 0 for (s = abfd->sections; s; s = s->next) @@ -415,7 +415,7 @@ m32r_upload_command (char *args, int from_tty) monitor_printf ("ust\r"); resp_len = monitor_expect_prompt (buf, sizeof (buf)); if (!strchr (buf, ':')) - error ("No ethernet connection!"); + error (_("No ethernet connection!")); if (board_addr == 0) { diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 63af22e..ed4cac0 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -262,10 +262,8 @@ m68hc11_initialize_register_info (void) } if (soft_regs[SOFT_FP_REGNUM].name == 0) - { - warning ("No frame soft register found in the symbol table.\n"); - warning ("Stack backtrace will not work.\n"); - } + warning (_("No frame soft register found in the symbol table.\n" + "Stack backtrace will not work.")); soft_reg_initialized = 1; } @@ -1282,7 +1280,7 @@ m68hc11_store_return_value (struct type *type, struct regcache *regcache, regcache_raw_write (regcache, HARD_D_REGNUM, (char*) valbuf + (len - 2)); } else - error ("return of value > 4 is not supported."); + error (_("return of value > 4 is not supported.")); } @@ -1320,7 +1318,7 @@ m68hc11_extract_return_value (struct type *type, struct regcache *regcache, break; default: - error ("bad size for return value"); + error (_("bad size for return value")); } } diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 0e6ec10..ed62a45 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -151,8 +151,8 @@ m68k_register_to_value (struct frame_info *frame, int regnum, /* We only support floating-point values. */ if (TYPE_CODE (type) != TYPE_CODE_FLT) { - warning ("Cannot convert floating-point register value " - "to non-floating-point type."); + warning (_("Cannot convert floating-point register value " + "to non-floating-point type.")); return; } @@ -174,8 +174,8 @@ m68k_value_to_register (struct frame_info *frame, int regnum, /* We only support floating-point values. */ if (TYPE_CODE (type) != TYPE_CODE_FLT) { - warning ("Cannot convert non-floating-point type " - "to floating-point register value."); + warning (_("Cannot convert non-floating-point type " + "to floating-point register value.")); return; } diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index 30a4c9d..9729d89 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -571,7 +571,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, { case 0: if (core_reg_size != sizeof (gregset)) - warning ("Wrong size gregset in core file."); + warning (_("Wrong size gregset in core file.")); else { memcpy (&gregset, core_reg_sect, sizeof (gregset)); @@ -581,7 +581,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, case 2: if (core_reg_size != sizeof (fpregset)) - warning ("Wrong size fpregset in core file."); + warning (_("Wrong size fpregset in core file.")); else { memcpy (&fpregset, core_reg_sect, sizeof (fpregset)); diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c index 7c2ebbe..c70adb4 100644 --- a/gdb/macrocmd.c +++ b/gdb/macrocmd.c @@ -59,9 +59,9 @@ macro_expand_command (char *exp, int from_tty) at the moment, the `print' commands don't save the last expression evaluated, just its value. */ if (! exp || ! *exp) - error ("You must follow the `macro expand' command with the" + error (_("You must follow the `macro expand' command with the" " expression you\n" - "want to expand."); + "want to expand.")); ms = default_macro_scope (); if (ms) @@ -95,9 +95,9 @@ macro_expand_once_command (char *exp, int from_tty) expression'. That way, you could just hit return over and over and see the expression expanded one level at a time. */ if (! exp || ! *exp) - error ("You must follow the `macro expand-once' command with" + error (_("You must follow the `macro expand-once' command with" " the expression\n" - "you want to expand."); + "you want to expand.")); ms = default_macro_scope (); if (ms) @@ -142,13 +142,13 @@ info_macro_command (char *name, int from_tty) struct macro_definition *d; if (! name || ! *name) - error ("You must follow the `info macro' command with the name" + error (_("You must follow the `info macro' command with the name" " of the macro\n" - "whose definition you want to see."); + "whose definition you want to see.")); ms = default_macro_scope (); if (! ms) - error ("GDB has no preprocessor macro information for that code."); + error (_("GDB has no preprocessor macro information for that code.")); d = macro_lookup_definition (ms->file, ms->line, name); if (d) @@ -201,21 +201,21 @@ static struct macro_table *user_macros; static void macro_define_command (char *exp, int from_tty) { - error ("Command not implemented yet."); + error (_("Command not implemented yet.")); } static void macro_undef_command (char *exp, int from_tty) { - error ("Command not implemented yet."); + error (_("Command not implemented yet.")); } static void macro_list_command (char *exp, int from_tty) { - error ("Command not implemented yet."); + error (_("Command not implemented yet.")); } diff --git a/gdb/macroexp.c b/gdb/macroexp.c index e39f81a..2c7b682 100644 --- a/gdb/macroexp.c +++ b/gdb/macroexp.c @@ -236,7 +236,7 @@ get_comment (struct macro_buffer *tok, char *p, char *end) return 1; } - error ("Unterminated comment in macro expansion."); + error (_("Unterminated comment in macro expansion.")); } else if (p[0] == '/' && p[1] == '/') @@ -339,12 +339,12 @@ get_character_constant (struct macro_buffer *tok, char *p, char *end) for (;;) { if (p >= end) - error ("Unmatched single quote."); + error (_("Unmatched single quote.")); else if (*p == '\'') { if (p == body_start) - error ("A character constant must contain at least one " - "character."); + error (_("A character constant must contain at least one " + "character.")); p++; break; } @@ -390,15 +390,15 @@ get_string_literal (struct macro_buffer *tok, char *p, char *end) for (;;) { if (p >= end) - error ("Unterminated string in expression."); + error (_("Unterminated string in expression.")); else if (*p == '\"') { p++; break; } else if (*p == '\n') - error ("Newline characters may not appear in string " - "constants."); + error (_("Newline characters may not appear in string " + "constants.")); else if (*p == '\\') { p++; @@ -741,7 +741,7 @@ gather_arguments (const char *name, struct macro_buffer *src, int *argc_p) char *start = src->text; if (! get_token (&tok, src)) - error ("Malformed argument list for macro `%s'.", name); + error (_("Malformed argument list for macro `%s'."), name); /* Is tok an opening paren? */ if (tok.len == 1 && tok.text[0] == '(') @@ -841,13 +841,13 @@ substitute_args (struct macro_buffer *dest, /* Is this token the stringification operator? */ if (tok.len == 1 && tok.text[0] == '#') - error ("Stringification is not implemented yet."); + error (_("Stringification is not implemented yet.")); /* Is this token the splicing operator? */ if (tok.len == 2 && tok.text[0] == '#' && tok.text[1] == '#') - error ("Token splicing is not implemented yet."); + error (_("Token splicing is not implemented yet.")); /* Is this token an identifier? */ if (tok.is_identifier) @@ -857,7 +857,7 @@ substitute_args (struct macro_buffer *dest, /* Is it the magic varargs parameter? */ if (tok.len == 11 && ! memcmp (tok.text, "__VA_ARGS__", 11)) - error ("Variable-arity macros not implemented yet."); + error (_("Variable-arity macros not implemented yet.")); /* Is it one of the parameters? */ for (i = 0; i < def->argc; i++) @@ -934,7 +934,7 @@ expand (const char *id, if (def->argc >= 1 && strcmp (def->argv[def->argc - 1], "...") == 0) - error ("Varargs macros not implemented yet."); + error (_("Varargs macros not implemented yet.")); make_cleanup (free_current_contents, &argv); argv = gather_arguments (id, src, &argc); @@ -957,8 +957,8 @@ expand (const char *id, if (! (argc == 1 && argv[0].len == 0 && def->argc == 0)) - error ("Wrong number of arguments to macro `%s' " - "(expected %d, got %d).", + error (_("Wrong number of arguments to macro `%s' " + "(expected %d, got %d)."), id, def->argc, argc); } @@ -1122,7 +1122,7 @@ macro_expand_once (const char *source, macro_lookup_ftype *lookup_func, void *lookup_func_baton) { - error ("Expand-once not implemented yet."); + error (_("Expand-once not implemented yet.")); } @@ -561,7 +561,7 @@ extern int gdbtk_test (char *); /* Find it. */ struct interp *interp = interp_lookup (interpreter_p); if (interp == NULL) - error ("Interpreter `%s' unrecognized", interpreter_p); + error (_("Interpreter `%s' unrecognized"), interpreter_p); /* Install it. */ if (!interp_set (interp)) { diff --git a/gdb/maint.c b/gdb/maint.c index 3d357a4..67caf38 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -445,7 +445,7 @@ maintenance_translate_address (char *arg, int from_tty) struct objfile *objfile; if (arg == NULL || *arg == 0) - error ("requires argument (address or section + address)"); + error (_("requires argument (address or section + address)")); sect = NULL; p = arg; @@ -455,7 +455,7 @@ maintenance_translate_address (char *arg, int from_tty) while (*p && !isspace (*p)) /* Find end of section name */ p++; if (*p == '\000') /* End of command? */ - error ("Need to specify <section-name> and <address>"); + error (_("Need to specify <section-name> and <address>")); *p++ = '\000'; while (isspace (*p)) p++; /* Skip whitespace */ @@ -468,7 +468,7 @@ maintenance_translate_address (char *arg, int from_tty) } if (!sect) - error ("Unknown section %s.", arg); + error (_("Unknown section %s."), arg); } address = parse_and_eval_address (p); @@ -685,7 +685,7 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element * static void maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c) { - error ("Profiling support is not available on this system."); + error (_("Profiling support is not available on this system.")); } #endif diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 2300e3e..41cfec0 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -4689,7 +4689,7 @@ elfmdebug_build_psymtabs (struct objfile *objfile, sizeof (struct ecoff_debug_info))); if (!(*swap->read_debug_info) (abfd, sec, info)) - error ("Error reading ECOFF debugging information: %s", + error (_("Error reading ECOFF debugging information: %s"), bfd_errmsg (bfd_get_error ())); mdebug_build_psymtabs (objfile, swap, info); diff --git a/gdb/mem-break.c b/gdb/mem-break.c index 96750c8..5866881 100644 --- a/gdb/mem-break.c +++ b/gdb/mem-break.c @@ -51,7 +51,7 @@ default_memory_insert_breakpoint (CORE_ADDR addr, char *contents_cache) /* Determine appropriate breakpoint contents and size for this address. */ bp = BREAKPOINT_FROM_PC (&addr, &bplen); if (bp == NULL) - error ("Software breakpoints not implemented for this target."); + error (_("Software breakpoints not implemented for this target.")); /* Save the memory contents. */ val = target_read_memory (addr, contents_cache, bplen); @@ -73,7 +73,7 @@ default_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) /* Determine appropriate breakpoint contents and size for this address. */ bp = BREAKPOINT_FROM_PC (&addr, &bplen); if (bp == NULL) - error ("Software breakpoints not implemented for this target."); + error (_("Software breakpoints not implemented for this target.")); return target_write_memory (addr, contents_cache, bplen); } diff --git a/gdb/memattr.c b/gdb/memattr.c index 6f95e5c..db75c28 100644 --- a/gdb/memattr.c +++ b/gdb/memattr.c @@ -144,12 +144,12 @@ mem_command (char *args, int from_tty) tok = strtok (args, " \t"); if (!tok) - error ("no lo address"); + error (_("no lo address")); lo = parse_and_eval_address (tok); tok = strtok (NULL, " \t"); if (!tok) - error ("no hi address"); + error (_("no hi address")); hi = parse_and_eval_address (tok); attrib = default_mem_attrib; @@ -167,19 +167,19 @@ mem_command (char *args, int from_tty) else if (strcmp (tok, "16") == 0) { if ((lo % 2 != 0) || (hi % 2 != 0)) - error ("region bounds not 16 bit aligned"); + error (_("region bounds not 16 bit aligned")); attrib.width = MEM_WIDTH_16; } else if (strcmp (tok, "32") == 0) { if ((lo % 4 != 0) || (hi % 4 != 0)) - error ("region bounds not 32 bit aligned"); + error (_("region bounds not 32 bit aligned")); attrib.width = MEM_WIDTH_32; } else if (strcmp (tok, "64") == 0) { if ((lo % 8 != 0) || (hi % 8 != 0)) - error ("region bounds not 64 bit aligned"); + error (_("region bounds not 64 bit aligned")); attrib.width = MEM_WIDTH_64; } @@ -203,7 +203,7 @@ mem_command (char *args, int from_tty) #endif else - error ("unknown attribute: %s", tok); + error (_("unknown attribute: %s"), tok); } create_mem_region (lo, hi, &attrib); @@ -371,7 +371,7 @@ mem_enable_command (char *args, int from_tty) while (*p1 >= '0' && *p1 <= '9') p1++; if (*p1 && *p1 != ' ' && *p1 != '\t') - error ("Arguments must be memory region numbers."); + error (_("Arguments must be memory region numbers.")); num = atoi (p); mem_enable (num); @@ -421,7 +421,7 @@ mem_disable_command (char *args, int from_tty) while (*p1 >= '0' && *p1 <= '9') p1++; if (*p1 && *p1 != ' ' && *p1 != '\t') - error ("Arguments must be memory region numbers."); + error (_("Arguments must be memory region numbers.")); num = atoi (p); mem_disable (num); @@ -501,7 +501,7 @@ mem_delete_command (char *args, int from_tty) while (*p1 >= '0' && *p1 <= '9') p1++; if (*p1 && *p1 != ' ' && *p1 != '\t') - error ("Arguments must be memory region numbers."); + error (_("Arguments must be memory region numbers.")); num = atoi (p); mem_delete (num); diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 6406084..4b39625 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -128,9 +128,9 @@ mi_cmd_break_insert (char *command, char **argv, int argc) } if (optind >= argc) - error ("mi_cmd_break_insert: Missing <location>"); + error (_("mi_cmd_break_insert: Missing <location>")); if (optind < argc - 1) - error ("mi_cmd_break_insert: Garbage following <location>"); + error (_("mi_cmd_break_insert: Garbage following <location>")); address = argv[optind]; /* Now we have what we need, let's insert the breakpoint! */ @@ -152,7 +152,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) #if 0 case REGEXP_BP: if (temp_p) - error ("mi_cmd_break_insert: Unsupported tempoary regexp breakpoint"); + error (_("mi_cmd_break_insert: Unsupported tempoary regexp breakpoint")); else rbreak_command_wrapper (address, FROM_TTY); return MI_CMD_DONE; @@ -218,9 +218,9 @@ mi_cmd_break_watch (char *command, char **argv, int argc) } } if (optind >= argc) - error ("mi_cmd_break_watch: Missing <expression>"); + error (_("mi_cmd_break_watch: Missing <expression>")); if (optind < argc - 1) - error ("mi_cmd_break_watch: Garbage following <expression>"); + error (_("mi_cmd_break_watch: Garbage following <expression>")); expr = argv[optind]; /* Now we have what we need, let's insert the watchpoint! */ @@ -236,7 +236,7 @@ mi_cmd_break_watch (char *command, char **argv, int argc) awatch_command_wrapper (expr, FROM_TTY); break; default: - error ("mi_cmd_break_watch: Unknown watchpoint type."); + error (_("mi_cmd_break_watch: Unknown watchpoint type.")); } return MI_CMD_DONE; } diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c index 168ca17..168fa2c 100644 --- a/gdb/mi/mi-cmd-disas.c +++ b/gdb/mi/mi-cmd-disas.c @@ -137,7 +137,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc) mixed_source_and_assembly = atoi (argv[0]); if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1)) - error ("mi_cmd_disassemble: Mixed_mode argument must be 0 or 1."); + error (_("mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.")); /* We must get the function beginning and end where line_num is @@ -147,11 +147,11 @@ mi_cmd_disassemble (char *command, char **argv, int argc) { s = lookup_symtab (file_string); if (s == NULL) - error ("mi_cmd_disassemble: Invalid filename."); + error (_("mi_cmd_disassemble: Invalid filename.")); if (!find_line_pc (s, line_num, &start)) - error ("mi_cmd_disassemble: Invalid line number"); + error (_("mi_cmd_disassemble: Invalid line number")); if (find_pc_partial_function (start, NULL, &low, &high) == 0) - error ("mi_cmd_disassemble: No function contains specified address"); + error (_("mi_cmd_disassemble: No function contains specified address")); } gdb_disassembly (uiout, diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c index 65f7f90..61fa7f8 100644 --- a/gdb/mi/mi-cmd-env.c +++ b/gdb/mi/mi-cmd-env.c @@ -70,7 +70,7 @@ enum mi_cmd_result mi_cmd_env_pwd (char *command, char **argv, int argc) { if (argc > 0) - error ("mi_cmd_env_pwd: No arguments required"); + error (_("mi_cmd_env_pwd: No arguments required")); if (mi_version (uiout) < 2) { @@ -91,7 +91,7 @@ enum mi_cmd_result mi_cmd_env_cd (char *command, char **argv, int argc) { if (argc == 0 || argc > 1) - error ("mi_cmd_env_cd: Usage DIRECTORY"); + error (_("mi_cmd_env_cd: Usage DIRECTORY")); env_execute_cli_command ("cd", argv[0]); diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c index aa20a79..c4f437d 100644 --- a/gdb/mi/mi-cmd-file.c +++ b/gdb/mi/mi-cmd-file.c @@ -38,7 +38,7 @@ mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc) char *optarg; if ( !mi_valid_noargs("mi_cmd_file_list_exec_source_file", argc, argv) ) - error ("mi_cmd_file_list_exec_source_file: Usage: No args"); + error (_("mi_cmd_file_list_exec_source_file: Usage: No args")); /* Set the default file and line, also get them */ set_default_source_symtab_and_line(); @@ -48,7 +48,7 @@ mi_cmd_file_list_exec_source_file(char *command, char **argv, int argc) Apparently, filename does not need to be tested for NULL. The documentation in symtab.h suggests it will always be correct */ if (!st.symtab) - error ("mi_cmd_file_list_exec_source_file: No symtab"); + error (_("mi_cmd_file_list_exec_source_file: No symtab")); /* Extract the fullname if it is not known yet */ symtab_to_fullname (st.symtab); @@ -72,7 +72,7 @@ mi_cmd_file_list_exec_source_files (char *command, char **argv, int argc) struct objfile *objfile; if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_files", argc, argv)) - error ("mi_cmd_file_list_exec_source_files: Usage: No args"); + error (_("mi_cmd_file_list_exec_source_files: Usage: No args")); /* Print the table header */ ui_out_begin (uiout, ui_out_type_list, "files"); diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index cafd45c..d912b17 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -48,10 +48,10 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc) struct frame_info *fi; if (!target_has_stack) - error ("mi_cmd_stack_list_frames: No stack."); + error (_("mi_cmd_stack_list_frames: No stack.")); if (argc > 2 || argc == 1) - error ("mi_cmd_stack_list_frames: Usage: [FRAME_LOW FRAME_HIGH]"); + error (_("mi_cmd_stack_list_frames: Usage: [FRAME_LOW FRAME_HIGH]")); if (argc == 2) { @@ -74,7 +74,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc) i++, fi = get_prev_frame (fi)); if (fi == NULL) - error ("mi_cmd_stack_list_frames: Not enough frames in stack."); + error (_("mi_cmd_stack_list_frames: Not enough frames in stack.")); cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "stack"); @@ -92,7 +92,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc) do_cleanups (cleanup_stack); if (i < frame_high) - error ("mi_cmd_stack_list_frames: Not enough frames in stack."); + error (_("mi_cmd_stack_list_frames: Not enough frames in stack.")); return MI_CMD_DONE; } @@ -105,10 +105,10 @@ mi_cmd_stack_info_depth (char *command, char **argv, int argc) struct frame_info *fi; if (!target_has_stack) - error ("mi_cmd_stack_info_depth: No stack."); + error (_("mi_cmd_stack_info_depth: No stack.")); if (argc > 1) - error ("mi_cmd_stack_info_depth: Usage: [MAX_DEPTH]"); + error (_("mi_cmd_stack_info_depth: Usage: [MAX_DEPTH]")); if (argc == 1) frame_high = atoi (argv[0]); @@ -137,7 +137,7 @@ mi_cmd_stack_list_locals (char *command, char **argv, int argc) enum print_values print_values; if (argc != 1) - error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"); + error (_("mi_cmd_stack_list_locals: Usage: PRINT_VALUES")); frame = get_selected_frame (NULL); @@ -151,7 +151,7 @@ mi_cmd_stack_list_locals (char *command, char **argv, int argc) || strcmp (argv[0], "--simple-values") == 0) print_values = PRINT_SIMPLE_VALUES; else - error ("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\", 2 or \"--simple-values\""); + error (_("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\", 2 or \"--simple-values\"")); list_args_or_locals (1, print_values, frame); return MI_CMD_DONE; } @@ -169,7 +169,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc) struct cleanup *cleanup_stack_args; if (argc < 1 || argc > 3 || argc == 2) - error ("mi_cmd_stack_list_args: Usage: PRINT_VALUES [FRAME_LOW FRAME_HIGH]"); + error (_("mi_cmd_stack_list_args: Usage: PRINT_VALUES [FRAME_LOW FRAME_HIGH]")); if (argc == 3) { @@ -192,7 +192,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc) i++, fi = get_prev_frame (fi)); if (fi == NULL) - error ("mi_cmd_stack_list_args: Not enough frames in stack."); + error (_("mi_cmd_stack_list_args: Not enough frames in stack.")); cleanup_stack_args = make_cleanup_ui_out_list_begin_end (uiout, "stack-args"); @@ -212,7 +212,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc) do_cleanups (cleanup_stack_args); if (i < frame_high) - error ("mi_cmd_stack_list_args: Not enough frames in stack."); + error (_("mi_cmd_stack_list_args: Not enough frames in stack.")); return MI_CMD_DONE; } @@ -330,10 +330,10 @@ enum mi_cmd_result mi_cmd_stack_select_frame (char *command, char **argv, int argc) { if (!target_has_stack) - error ("mi_cmd_stack_select_frame: No stack."); + error (_("mi_cmd_stack_select_frame: No stack.")); if (argc > 1) - error ("mi_cmd_stack_select_frame: Usage: [FRAME_SPEC]"); + error (_("mi_cmd_stack_select_frame: Usage: [FRAME_SPEC]")); /* with no args, don't change frame */ if (argc == 0) diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 6f3a2b7..96e7beb 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -52,7 +52,7 @@ mi_cmd_var_create (char *command, char **argv, int argc) { /* mi_error_message = xstrprintf ("mi_cmd_var_create: Usage: ...."); return MI_CMD_ERROR; */ - error ("mi_cmd_var_create: Usage: NAME FRAME EXPRESSION."); + error (_("mi_cmd_var_create: Usage: NAME FRAME EXPRESSION.")); } name = xstrdup (argv[0]); @@ -71,7 +71,7 @@ mi_cmd_var_create (char *command, char **argv, int argc) name = varobj_gen_name (); } else if (!isalpha (*name)) - error ("mi_cmd_var_create: name of object must begin with a letter"); + error (_("mi_cmd_var_create: name of object must begin with a letter")); if (strcmp (frame, "*") == 0) var_type = USE_CURRENT_FRAME; @@ -91,7 +91,7 @@ mi_cmd_var_create (char *command, char **argv, int argc) var = varobj_create (name, expr, frameaddr, var_type); if (var == NULL) - error ("mi_cmd_var_create: unable to create variable object"); + error (_("mi_cmd_var_create: unable to create variable object")); ui_out_field_string (uiout, "name", name); ui_out_field_int (uiout, "numchild", varobj_get_num_children (var)); @@ -119,7 +119,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc) struct cleanup *old_cleanups; if (argc < 1 || argc > 2) - error ("mi_cmd_var_delete: Usage: [-c] EXPRESSION."); + error (_("mi_cmd_var_delete: Usage: [-c] EXPRESSION.")); name = xstrdup (argv[0]); /* Add cleanup for name. Must be free_current_contents as @@ -131,9 +131,9 @@ mi_cmd_var_delete (char *command, char **argv, int argc) if (argc == 1) { if (strcmp (name, "-c") == 0) - error ("mi_cmd_var_delete: Missing required argument after '-c': variable object name"); + error (_("mi_cmd_var_delete: Missing required argument after '-c': variable object name")); if (*name == '-') - error ("mi_cmd_var_delete: Illegal variable object name"); + error (_("mi_cmd_var_delete: Illegal variable object name")); } /* If we have 2 arguments they must be '-c' followed by a string @@ -142,7 +142,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc) { expr = xstrdup (argv[1]); if (strcmp (name, "-c") != 0) - error ("mi_cmd_var_delete: Invalid option."); + error (_("mi_cmd_var_delete: Invalid option.")); children_only_p = 1; xfree (name); name = xstrdup (expr); @@ -155,7 +155,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc) var = varobj_get_handle (name); if (var == NULL) - error ("mi_cmd_var_delete: Variable object not found."); + error (_("mi_cmd_var_delete: Variable object not found.")); numdel = varobj_delete (var, NULL, children_only_p); @@ -174,17 +174,17 @@ mi_cmd_var_set_format (char *command, char **argv, int argc) char *formspec; if (argc != 2) - error ("mi_cmd_var_set_format: Usage: NAME FORMAT."); + error (_("mi_cmd_var_set_format: Usage: NAME FORMAT.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_set_format: Variable object not found"); + error (_("mi_cmd_var_set_format: Variable object not found")); formspec = xstrdup (argv[1]); if (formspec == NULL) - error ("mi_cmd_var_set_format: Must specify the format as: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\""); + error (_("mi_cmd_var_set_format: Must specify the format as: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\"")); len = strlen (formspec); @@ -199,7 +199,7 @@ mi_cmd_var_set_format (char *command, char **argv, int argc) else if (strncmp (formspec, "octal", len) == 0) format = FORMAT_OCTAL; else - error ("mi_cmd_var_set_format: Unknown display format: must be: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\""); + error (_("mi_cmd_var_set_format: Unknown display format: must be: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\"")); /* Set the format of VAR to given format */ varobj_set_display_format (var, format); @@ -216,12 +216,12 @@ mi_cmd_var_show_format (char *command, char **argv, int argc) struct varobj *var; if (argc != 1) - error ("mi_cmd_var_show_format: Usage: NAME."); + error (_("mi_cmd_var_show_format: Usage: NAME.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_show_format: Variable object not found"); + error (_("mi_cmd_var_show_format: Variable object not found")); format = varobj_get_display_format (var); @@ -236,12 +236,12 @@ mi_cmd_var_info_num_children (char *command, char **argv, int argc) struct varobj *var; if (argc != 1) - error ("mi_cmd_var_info_num_children: Usage: NAME."); + error (_("mi_cmd_var_info_num_children: Usage: NAME.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_info_num_children: Variable object not found"); + error (_("mi_cmd_var_info_num_children: Variable object not found")); ui_out_field_int (uiout, "numchild", varobj_get_num_children (var)); return MI_CMD_DONE; @@ -259,13 +259,13 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) enum print_values print_values; if (argc != 1 && argc != 2) - error ("mi_cmd_var_list_children: Usage: [PRINT_VALUES] NAME"); + error (_("mi_cmd_var_list_children: Usage: [PRINT_VALUES] NAME")); /* Get varobj handle, if a valid var obj name was specified */ if (argc == 1) var = varobj_get_handle (argv[0]); else var = varobj_get_handle (argv[1]); if (var == NULL) - error ("Variable object not found"); + error (_("Variable object not found")); numchild = varobj_list_children (var, &childlist); ui_out_field_int (uiout, "numchild", numchild); @@ -277,7 +277,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) || strcmp (argv[0], "--all-values") == 0) print_values = PRINT_ALL_VALUES; else - error ("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\""); + error (_("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\"")); else print_values = PRINT_NO_VALUES; if (numchild <= 0) @@ -315,12 +315,12 @@ mi_cmd_var_info_type (char *command, char **argv, int argc) struct varobj *var; if (argc != 1) - error ("mi_cmd_var_info_type: Usage: NAME."); + error (_("mi_cmd_var_info_type: Usage: NAME.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_info_type: Variable object not found"); + error (_("mi_cmd_var_info_type: Variable object not found")); ui_out_field_string (uiout, "type", varobj_get_type (var)); return MI_CMD_DONE; @@ -333,12 +333,12 @@ mi_cmd_var_info_expression (char *command, char **argv, int argc) struct varobj *var; if (argc != 1) - error ("mi_cmd_var_info_expression: Usage: NAME."); + error (_("mi_cmd_var_info_expression: Usage: NAME.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_info_expression: Variable object not found"); + error (_("mi_cmd_var_info_expression: Variable object not found")); lang = varobj_get_language (var); @@ -355,12 +355,12 @@ mi_cmd_var_show_attributes (char *command, char **argv, int argc) struct varobj *var; if (argc != 1) - error ("mi_cmd_var_show_attributes: Usage: NAME."); + error (_("mi_cmd_var_show_attributes: Usage: NAME.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_show_attributes: Variable object not found"); + error (_("mi_cmd_var_show_attributes: Variable object not found")); attr = varobj_get_attributes (var); /* FIXME: define masks for attributes */ @@ -379,12 +379,12 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc) struct varobj *var; if (argc != 1) - error ("mi_cmd_var_evaluate_expression: Usage: NAME."); + error (_("mi_cmd_var_evaluate_expression: Usage: NAME.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_evaluate_expression: Variable object not found"); + error (_("mi_cmd_var_evaluate_expression: Variable object not found")); ui_out_field_string (uiout, "value", varobj_get_value (var)); return MI_CMD_DONE; @@ -397,21 +397,21 @@ mi_cmd_var_assign (char *command, char **argv, int argc) char *expression; if (argc != 2) - error ("mi_cmd_var_assign: Usage: NAME EXPRESSION."); + error (_("mi_cmd_var_assign: Usage: NAME EXPRESSION.")); /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (argv[0]); if (var == NULL) - error ("mi_cmd_var_assign: Variable object not found"); + error (_("mi_cmd_var_assign: Variable object not found")); /* FIXME: define masks for attributes */ if (!(varobj_get_attributes (var) & 0x00000001)) - error ("mi_cmd_var_assign: Variable object is not editable"); + error (_("mi_cmd_var_assign: Variable object is not editable")); expression = xstrdup (argv[1]); if (!varobj_set_value (var, expression)) - error ("mi_cmd_var_assign: Could not assign expression to varible object"); + error (_("mi_cmd_var_assign: Could not assign expression to varible object")); ui_out_field_string (uiout, "value", varobj_get_value (var)); return MI_CMD_DONE; @@ -428,7 +428,7 @@ mi_cmd_var_update (char *command, char **argv, int argc) int nv; if (argc != 1) - error ("mi_cmd_var_update: Usage: NAME."); + error (_("mi_cmd_var_update: Usage: NAME.")); name = argv[0]; @@ -461,7 +461,7 @@ mi_cmd_var_update (char *command, char **argv, int argc) /* Get varobj handle, if a valid var obj name was specified */ var = varobj_get_handle (name); if (var == NULL) - error ("mi_cmd_var_update: Variable object not found"); + error (_("mi_cmd_var_update: Variable object not found")); if (mi_version (uiout) <= 1) cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist"); diff --git a/gdb/mi/mi-getopt.c b/gdb/mi/mi-getopt.c index 3f2a902..8d29957 100644 --- a/gdb/mi/mi-getopt.c +++ b/gdb/mi/mi-getopt.c @@ -60,7 +60,7 @@ mi_getopt (const char *prefix, { /* A non-simple optarg option. */ if (argc < *optind + 2) - error ("%s: Option %s requires an argument", prefix, arg); + error (_("%s: Option %s requires an argument"), prefix, arg); *optarg = argv[(*optind) + 1]; *optind = (*optind) + 2; return opt->index; @@ -72,7 +72,7 @@ mi_getopt (const char *prefix, return opt->index; } } - error ("%s: Unknown option ``%s''", prefix, arg + 1); + error (_("%s: Unknown option ``%s''"), prefix, arg + 1); } int diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c index 1d86d21..01ba17e 100644 --- a/gdb/mi/mi-symbol-cmds.c +++ b/gdb/mi/mi-symbol-cmds.c @@ -38,13 +38,13 @@ mi_cmd_symbol_list_lines (char *command, char **argv, int argc) struct cleanup *cleanup_stack, *cleanup_tuple; if (argc != 1) - error ("mi_cmd_symbol_list_lines: Usage: SOURCE_FILENAME"); + error (_("mi_cmd_symbol_list_lines: Usage: SOURCE_FILENAME")); filename = argv[0]; s = lookup_symtab (filename); if (s == NULL) - error ("mi_cmd_symbol_list_lines: Unknown source file name."); + error (_("mi_cmd_symbol_list_lines: Unknown source file name.")); /* Now, dump the associated line table. The pc addresses are already sorted by increasing values in the symbol table, so no need to diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 47aa398..f9497eb 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -253,7 +253,7 @@ mips_linux_register_addr (int regno, CORE_ADDR blockend) int regaddr; if (regno < 0 || regno >= NUM_REGS) - error ("Bogon register number %d.", regno); + error (_("Bogon register number %d."), regno); if (regno < 32) regaddr = regno; @@ -275,7 +275,7 @@ mips_linux_register_addr (int regno, CORE_ADDR blockend) else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) regaddr = FPC_EIR; else - error ("Unknowable register number %d.", regno); + error (_("Unknowable register number %d."), regno); return regaddr; } @@ -544,7 +544,7 @@ mips64_linux_register_addr (int regno, CORE_ADDR blockend) int regaddr; if (regno < 0 || regno >= NUM_REGS) - error ("Bogon register number %d.", regno); + error (_("Bogon register number %d."), regno); if (regno < 32) regaddr = regno; @@ -566,7 +566,7 @@ mips64_linux_register_addr (int regno, CORE_ADDR blockend) else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) regaddr = MIPS64_FPC_EIR; else - error ("Unknowable register number %d.", regno); + error (_("Unknowable register number %d."), regno); return regaddr; } @@ -597,7 +597,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, } else { - warning ("wrong size gregset struct in core file"); + warning (_("wrong size gregset struct in core file")); } } else if (which == 2) @@ -615,7 +615,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, } else { - warning ("wrong size fpregset struct in core file"); + warning (_("wrong size fpregset struct in core file")); } } } diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index a2f5eb6..b225f73 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -636,7 +636,7 @@ set_mips64_transfers_32bit_regs (char *args, int from_tty, if (!gdbarch_update_p (info)) { mips64_transfers_32bit_regs_p = 0; - error ("32-bit compatibility mode not supported"); + error (_("32-bit compatibility mode not supported")); } } @@ -2245,7 +2245,7 @@ heuristic_proc_start (CORE_ADDR pc) { static int blurb_printed = 0; - warning ("GDB can't find the start of the function at 0x%s.", + warning (_("GDB can't find the start of the function at 0x%s."), paddr_nz (pc)); if (!blurb_printed) @@ -3822,7 +3822,7 @@ mips_read_fp_register_single (struct frame_info *frame, int regno, char *raw_buffer = alloca (raw_size); if (!frame_register_read (frame, regno, raw_buffer)) - error ("can't read register %d (%s)", regno, REGISTER_NAME (regno)); + error (_("can't read register %d (%s)"), regno, REGISTER_NAME (regno)); if (raw_size == 8) { /* We have a 64-bit value for this register. Find the low-order @@ -3857,7 +3857,7 @@ mips_read_fp_register_double (struct frame_info *frame, int regno, /* We have a 64-bit value for this register, and we should use all 64 bits. */ if (!frame_register_read (frame, regno, rare_buffer)) - error ("can't read register %d (%s)", regno, REGISTER_NAME (regno)); + error (_("can't read register %d (%s)"), regno, REGISTER_NAME (regno)); } else { @@ -4057,7 +4057,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, break; /* end row: reached FP register */ /* OK: get the data in raw format. */ if (!frame_register_read (frame, regnum, raw_buffer)) - error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum)); + error (_("can't read register %d (%s)"), regnum, REGISTER_NAME (regnum)); /* pad small registers */ for (byte = 0; byte < (mips_abi_regsize (current_gdbarch) @@ -4093,7 +4093,7 @@ mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, { gdb_assert (regnum >= NUM_REGS); if (*(REGISTER_NAME (regnum)) == '\0') - error ("Not a valid register for the current processor type"); + error (_("Not a valid register for the current processor type")); mips_print_register (file, frame, regnum, 0); fprintf_filtered (file, "\n"); @@ -4631,7 +4631,7 @@ mips_find_abi_section (bfd *abfd, asection *sect, void *obj) else if (strcmp (name, ".mdebug.eabi64") == 0) *abip = MIPS_ABI_EABI64; else - warning ("unsupported ABI %s.", name + 8); + warning (_("unsupported ABI %s."), name + 8); } static enum mips_abi diff --git a/gdb/mipsread.c b/gdb/mipsread.c index a0d4805..876befb 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -81,7 +81,7 @@ mipscoff_symfile_read (struct objfile *objfile, int mainline) if (!((*ecoff_backend (abfd)->debug_swap.read_debug_info) (abfd, (asection *) NULL, &ecoff_data (abfd)->debug_info))) - error ("Error reading symbol table: %s", bfd_errmsg (bfd_get_error ())); + error (_("Error reading symbol table: %s"), bfd_errmsg (bfd_get_error ())); mdebug_build_psymtabs (objfile, &ecoff_backend (abfd)->debug_swap, &ecoff_data (abfd)->debug_info); diff --git a/gdb/monitor.c b/gdb/monitor.c index a468e3c..76971d2 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -245,9 +245,9 @@ monitor_error (char *function, char *message, monitor_printable_string (safe_string, string, real_len); if (final_char) - error ("%s (0x%s): %s: %s%c", function, paddr_nz (memaddr), message, safe_string, final_char); + error (_("%s (0x%s): %s: %s%c"), function, paddr_nz (memaddr), message, safe_string, final_char); else - error ("%s (0x%s): %s: %s", function, paddr_nz (memaddr), message, safe_string); + error (_("%s (0x%s): %s: %s"), function, paddr_nz (memaddr), message, safe_string); } /* Convert hex digit A to a number. */ @@ -262,7 +262,7 @@ fromhex (int a) else if (a >= 'A' && a <= 'F') return a - 'A' + 10; else - error ("Invalid hex digit %d", a); + error (_("Invalid hex digit %d"), a); } /* monitor_vsprintf - similar to vsprintf but handles 64-bit addresses @@ -429,7 +429,7 @@ monitor_readchar (void) return c; if (c == SERIAL_TIMEOUT) - error ("Timeout reading from remote system."); + error (_("Timeout reading from remote system.")); perror_with_name ("remote-monitor"); } @@ -500,11 +500,11 @@ readchar (int timeout) if (in_monitor_wait) /* Watchdog went off */ { target_mourn_inferior (); - error ("GDB serial timeout has expired. Target detached.\n"); + error (_("GDB serial timeout has expired. Target detached.")); } else #endif - error ("Timeout reading from remote system."); + error (_("Timeout reading from remote system.")); perror_with_name ("remote-monitor"); } @@ -717,7 +717,7 @@ compile_pattern (char *pattern, struct re_pattern_buffer *compiled_pattern, re_set_syntax (tmp); if (val) - error ("compile_pattern: Can't compile pattern string `%s': %s!", pattern, val); + error (_("compile_pattern: Can't compile pattern string `%s': %s!"), pattern, val); if (fastmap) re_compile_fastmap (compiled_pattern); @@ -733,14 +733,14 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty) char **p; if (mon_ops->magic != MONITOR_OPS_MAGIC) - error ("Magic number of monitor_ops struct wrong."); + error (_("Magic number of monitor_ops struct wrong.")); targ_ops = mon_ops->target; name = targ_ops->to_shortname; if (!args) - error ("Use `target %s DEVICE-NAME' to use a serial port, or \n\ -`target %s HOST-NAME:PORT-NUMBER' to use a network connection.", name, name); + error (_("Use `target %s DEVICE-NAME' to use a serial port, or \n\ +`target %s HOST-NAME:PORT-NUMBER' to use a network connection."), name, name); target_preopen (from_tty); @@ -917,7 +917,7 @@ monitor_supply_register (int regno, char *valstr) monitor_debug ("Supplying Register %d %s\n", regno, valstr); if (val == 0 && valstr == p) - error ("monitor_supply_register (%d): bad value from monitor: %s.", + error (_("monitor_supply_register (%d): bad value from monitor: %s."), regno, valstr); /* supply register stores in target byte order, so swap here */ @@ -1220,7 +1220,7 @@ monitor_fetch_register (int regno) if ((c == '0') && ((c = readchar (timeout)) == 'x')) ; else - error ("Bad value returned from monitor while fetching register %x.", + error (_("Bad value returned from monitor while fetching register %x."), regno); } @@ -1936,7 +1936,7 @@ monitor_read_memory (CORE_ADDR memaddr, char *myaddr, int len) c = *p; } if (fetched == 0) - error ("Failed to read via monitor"); + error (_("Failed to read via monitor")); if (monitor_debug_p || remote_debug) fprintf_unfiltered (gdb_stdlog, "\n"); return fetched; /* Return the number of bytes actually read */ @@ -2016,7 +2016,7 @@ monitor_create_inferior (char *exec_file, char *args, char **env, int from_tty) { if (args && (*args != '\000')) - error ("Args are not supported by the monitor."); + error (_("Args are not supported by the monitor.")); first_time = 1; clear_proceed_status (); @@ -2046,7 +2046,7 @@ monitor_insert_breakpoint (CORE_ADDR addr, char *shadow) monitor_debug ("MON inst bkpt %s\n", paddr (addr)); if (current_monitor->set_break == NULL) - error ("No set_break defined for this monitor"); + error (_("No set_break defined for this monitor")); if (current_monitor->flags & MO_ADDR_BITS_REMOVE) addr = ADDR_BITS_REMOVE (addr); @@ -2066,7 +2066,7 @@ monitor_insert_breakpoint (CORE_ADDR addr, char *shadow) } } - error ("Too many breakpoints (> %d) for monitor.", current_monitor->num_breakpoints); + error (_("Too many breakpoints (> %d) for monitor."), current_monitor->num_breakpoints); } /* Tell the monitor to remove a breakpoint. */ @@ -2078,7 +2078,7 @@ monitor_remove_breakpoint (CORE_ADDR addr, char *shadow) monitor_debug ("MON rmbkpt %s\n", paddr (addr)); if (current_monitor->clr_break == NULL) - error ("No clr_break defined for this monitor"); + error (_("No clr_break defined for this monitor")); if (current_monitor->flags & MO_ADDR_BITS_REMOVE) addr = ADDR_BITS_REMOVE (addr); @@ -2208,7 +2208,7 @@ monitor_rcmd (char *command, char buf[1000]; if (monitor_desc == NULL) - error ("monitor target not open."); + error (_("monitor target not open.")); p = current_monitor->prompt; @@ -2235,7 +2235,7 @@ from_hex (int a) if (a >= 'A' && a <= 'F') return a - 'A' + 10; - error ("Reply contains invalid hex digit 0x%x", a); + error (_("Reply contains invalid hex digit 0x%x"), a); } #endif diff --git a/gdb/nlmread.c b/gdb/nlmread.c index 1aa9a22..1a9ecd3 100644 --- a/gdb/nlmread.c +++ b/gdb/nlmread.c @@ -103,7 +103,7 @@ nlm_symtab_read (bfd *abfd, CORE_ADDR addr, struct objfile *objfile) storage_needed = bfd_get_symtab_upper_bound (abfd); if (storage_needed < 0) - error ("Can't read symbols from %s: %s", bfd_get_filename (abfd), + error (_("Can't read symbols from %s: %s"), bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); if (storage_needed > 0) { @@ -111,7 +111,7 @@ nlm_symtab_read (bfd *abfd, CORE_ADDR addr, struct objfile *objfile) back_to = make_cleanup (xfree, symbol_table); number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table); if (number_of_symbols < 0) - error ("Can't read symbols from %s: %s", bfd_get_filename (abfd), + error (_("Can't read symbols from %s: %s"), bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); for (i = 0; i < number_of_symbols; i++) diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index ad1bea0..0f7b346 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -107,7 +107,7 @@ nto_node (void) node = netmgr_strtond (nto_procfs_path, 0); if (node == -1) - error ("Lost the QNX node. Debug session probably over."); + error (_("Lost the QNX node. Debug session probably over.")); return (node); } @@ -172,7 +172,7 @@ procfs_open (char *arg, int from_tty) { printf_filtered ("Error opening %s : %d (%s)\n", nto_procfs_path, errno, safe_strerror (errno)); - error ("Invalid procfs arg"); + error (_("Invalid procfs arg")); } sysinfo = (void *) buffer; @@ -181,7 +181,7 @@ procfs_open (char *arg, int from_tty) printf_filtered ("Error getting size: %d (%s)\n", errno, safe_strerror (errno)); close (fd); - error ("Devctl failed."); + error (_("Devctl failed.")); } else { @@ -192,7 +192,7 @@ procfs_open (char *arg, int from_tty) printf_filtered ("Memory error: %d (%s)\n", errno, safe_strerror (errno)); close (fd); - error ("alloca failed."); + error (_("alloca failed.")); } else { @@ -201,7 +201,7 @@ procfs_open (char *arg, int from_tty) printf_filtered ("Error getting sysinfo: %d (%s)\n", errno, safe_strerror (errno)); close (fd); - error ("Devctl failed."); + error (_("Devctl failed.")); } else { @@ -209,7 +209,7 @@ procfs_open (char *arg, int from_tty) nto_map_arch_to_cputype (TARGET_ARCHITECTURE->arch_name)) { close (fd); - error ("Invalid target CPU."); + error (_("Invalid target CPU.")); } } } @@ -523,7 +523,7 @@ procfs_attach (char *args, int from_tty) pid = atoi (args); if (pid == getpid ()) - error ("Attaching GDB to itself is not a good idea..."); + error (_("Attaching GDB to itself is not a good idea...")); if (from_tty) { @@ -561,10 +561,10 @@ do_attach (ptid_t ptid) snprintf (path, PATH_MAX - 1, "%s/%d/as", nto_procfs_path, PIDGET (ptid)); ctl_fd = open (path, O_RDWR); if (ctl_fd == -1) - error ("Couldn't open proc file %s, error %d (%s)", path, errno, + error (_("Couldn't open proc file %s, error %d (%s)"), path, errno, safe_strerror (errno)); if (devctl (ctl_fd, DCMD_PROC_STOP, &status, sizeof (status), 0) != EOK) - error ("Couldn't stop process"); + error (_("Couldn't stop process")); /* Define a sigevent for process stopped notification. */ event.sigev_notify = SIGEV_SIGNAL_THREAD; @@ -1066,7 +1066,7 @@ procfs_create_inferior (char *exec_file, char *allargs, char **env, sigprocmask (SIG_BLOCK, &set, NULL); if (pid == -1) - error ("Error spawning %s: %d (%s)", argv[0], errno, + error (_("Error spawning %s: %d (%s)"), argv[0], errno, safe_strerror (errno)); if (fds[0] != STDIN_FILENO) diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 41dd8e8..3179183 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -94,14 +94,14 @@ lookup_struct_typedef (char *name, struct block *block, int noerr) if (noerr) return 0; else - error ("No struct type named %s.", name); + error (_("No struct type named %s."), name); } if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_STRUCT) { if (noerr) return 0; else - error ("This context has class, union or enum %s, not a struct.", + error (_("This context has class, union or enum %s, not a struct."), name); } return sym; @@ -202,7 +202,7 @@ value_nsstring (char *ptr, int len) nsstringValue = call_function_by_hand(function, 3, &stringValue[0]); } else - error ("NSString: internal error -- no way to create new NSString"); + error (_("NSString: internal error -- no way to create new NSString")); deprecated_set_value_type (nsstringValue, type); return nsstringValue; @@ -463,7 +463,7 @@ objc_create_fundamental_type (struct objfile *objfile, int typeid) type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "<?type?>", objfile); - warning ("internal error: no C/C++ fundamental type %d", typeid); + warning (_("internal error: no C/C++ fundamental type %d"), typeid); break; case FT_VOID: type = init_type (TYPE_CODE_VOID, @@ -762,7 +762,7 @@ end_msglist(void) msglist_sel = sel->msglist_sel; selid = lookup_child_selector(p); if (!selid) - error("Can't find selector \"%s\"", p); + error (_("Can't find selector \"%s\""), p); write_exp_elt_longcst (selid); xfree(p); write_exp_elt_longcst (val); /* Number of args */ @@ -809,12 +809,12 @@ compare_selectors (const void *a, const void *b) aname = SYMBOL_PRINT_NAME (*(struct symbol **) a); bname = SYMBOL_PRINT_NAME (*(struct symbol **) b); if (aname == NULL || bname == NULL) - error ("internal: compare_selectors(1)"); + error (_("internal: compare_selectors(1)")); aname = strchr(aname, ' '); bname = strchr(bname, ' '); if (aname == NULL || bname == NULL) - error ("internal: compare_selectors(2)"); + error (_("internal: compare_selectors(2)")); return specialcmp (aname+1, bname+1); } @@ -869,7 +869,7 @@ selectors_info (char *regexp, int from_tty) { val = re_comp (myregexp); if (val != 0) - error ("Invalid regexp (%s): %s", val, regexp); + error (_("Invalid regexp (%s): %s"), val, regexp); } /* First time thru is JUST to get max length and count. */ @@ -964,7 +964,7 @@ compare_classes (const void *a, const void *b) aname = SYMBOL_PRINT_NAME (*(struct symbol **) a); bname = SYMBOL_PRINT_NAME (*(struct symbol **) b); if (aname == NULL || bname == NULL) - error ("internal: compare_classes(1)"); + error (_("internal: compare_classes(1)")); return specialcmp (aname+1, bname+1); } @@ -1009,7 +1009,7 @@ classes_info (char *regexp, int from_tty) { val = re_comp (myregexp); if (val != 0) - error ("Invalid regexp (%s): %s", val, regexp); + error (_("Invalid regexp (%s): %s"), val, regexp); } /* First time thru is JUST to get max length and count. */ @@ -1551,13 +1551,13 @@ print_object_command (char *args, int from_tty) function = find_function_in_inferior ("_NSPrintForDebugger"); if (function == NULL) - error ("Unable to locate _NSPrintForDebugger in child process"); + error (_("Unable to locate _NSPrintForDebugger in child process")); description = call_function_by_hand (function, 1, &object); string_addr = value_as_long (description); if (string_addr == 0) - error ("object returns null description"); + error (_("object returns null description")); read_memory (string_addr + i++, &c, 1); if (c != '\0') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index dce6156..315de9a 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -191,7 +191,7 @@ allocate_objfile (bfd *abfd, int flags) if (build_objfile_section_table (objfile)) { - error ("Can't find the file sections in `%s': %s", + error (_("Can't find the file sections in `%s': %s"), objfile->name, bfd_errmsg (bfd_get_error ())); } } @@ -410,7 +410,7 @@ free_objfile (struct objfile *objfile) { char *name = bfd_get_filename (objfile->obfd); if (!bfd_close (objfile->obfd)) - warning ("cannot close \"%s\": %s", + warning (_("cannot close \"%s\": %s"), name, bfd_errmsg (bfd_get_error ())); xfree (name); } diff --git a/gdb/observer.c b/gdb/observer.c index e78e513..2ec8371 100644 --- a/gdb/observer.c +++ b/gdb/observer.c @@ -146,7 +146,7 @@ generic_observer_detach (struct observer_list **subject, /* We should never reach this point. However, this should not be a very serious error, so simply report a warning to the user. */ - warning ("Failed to detach observer"); + warning (_("Failed to detach observer")); } /* Send a notification to all the observers of SUBJECT. ARGS is passed to @@ -128,7 +128,7 @@ ocd_error (char *s, int error_code) s = buf; } - error ("%s", s); + error (("%s"), s); } /* Return nonzero if the thread TH is still alive on the remote system. */ @@ -177,13 +177,13 @@ ocd_start_remote (void *dummy) p = ocd_get_packet (buf[0], &pktlen, remote_timeout); if (pktlen < 2) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); status = p[1]; error_code = p[2]; if (error_code != 0) - ocd_error ("OCD_INIT:", error_code); + ocd_error (_("OCD_INIT:"), error_code); ocd_do_command (OCD_AYT, &status, &pktlen); @@ -208,7 +208,7 @@ ocd_start_remote (void *dummy) p = ocd_get_packet (buf[0], &pktlen, remote_timeout); if (pktlen < 2) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); status = p[1]; error_code = p[2]; @@ -252,8 +252,8 @@ ocd_open (char *name, int from_tty, enum ocd_target_type target_type, int pktlen; if (name == 0) - error ("To open an OCD connection, you need to specify the\n\ -device the OCD device is attached to (e.g. /dev/ttya)."); + error (_("To open an OCD connection, you need to specify the\n\ +device the OCD device is attached to (e.g. /dev/ttya).")); target_preopen (from_tty); @@ -304,7 +304,7 @@ device the OCD device is attached to (e.g. /dev/ttya)."); RETURN_MASK_ALL)) { pop_target (); - error ("Failed to connect to OCD."); + error (_("Failed to connect to OCD.")); } } @@ -317,7 +317,7 @@ void ocd_detach (char *args, int from_tty) { if (args) - error ("Argument given to \"detach\" when remotely debugging."); + error (_("Argument given to \"detach\" when remotely debugging.")); pop_target (); if (from_tty) @@ -346,7 +346,7 @@ ocd_stop (void) ocd_do_command (OCD_STOP, &status, &pktlen); if (!(status & OCD_FLAG_BDM)) - error ("Can't stop target via BDM"); + error (_("Can't stop target via BDM")); } static volatile int ocd_interrupt_flag; @@ -435,7 +435,7 @@ ocd_wait (void) signal (SIGINT, ofunc); if (pktlen < 2) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); last_run_status = p[1]; error_code = p[2]; @@ -444,9 +444,9 @@ ocd_wait (void) ocd_error ("target_wait:", error_code); if (last_run_status & OCD_FLAG_PWF) - error ("OCD device lost VCC at BDM interface."); + error (_("OCD device lost VCC at BDM interface.")); else if (last_run_status & OCD_FLAG_CABLE_DISC) - error ("OCD device cable appears to have been disconnected."); + error (_("OCD device cable appears to have been disconnected.")); } if (ocd_interrupt_flag) @@ -490,7 +490,7 @@ ocd_read_bdm_registers (int first_bdm_regno, int last_bdm_regno, int *reglen) if (i > pktlen - 4 || ((i & 3) != 0)) - error ("Register block size bad: %d", i); + error (_("Register block size bad: %d"), i); *reglen = i; @@ -534,7 +534,7 @@ ocd_write_bdm_registers (int first_bdm_regno, unsigned char *regptr, int reglen) p = ocd_get_packet (OCD_WRITE_REGS, &pktlen, remote_timeout); if (pktlen < 3) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); status = p[1]; error_code = p[2]; @@ -600,7 +600,7 @@ ocd_write_bytes (CORE_ADDR memaddr, char *myaddr, int len) ocd_put_packet (buf, 8 + numbytes); p = ocd_get_packet (OCD_WRITE_MEM, &pktlen, remote_timeout); if (pktlen < 3) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); status = p[1]; error_code = p[2]; @@ -670,7 +670,7 @@ ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len) ocd_put_packet (buf, 7); p = ocd_get_packet (OCD_READ_MEM, &pktlen, remote_timeout); if (pktlen < 4) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); status = p[1]; error_code = p[2]; @@ -744,7 +744,7 @@ readchar (int timeout) switch (ch) { case SERIAL_EOF: - error ("Remote connection closed"); + error (_("Remote connection closed")); case SERIAL_ERROR: perror_with_name ("Remote communication error"); case SERIAL_TIMEOUT: @@ -807,10 +807,10 @@ ocd_get_packet (int cmd, int *lenp, int timeout) ch = readchar (timeout); if (ch < 0) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); if (ch != 0x55) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); /* Found the start of a packet */ @@ -822,7 +822,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout) ch = readchar (timeout); if (ch < 0) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); *packet_ptr++ = ch; checksum += ch; @@ -832,7 +832,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout) ch = readchar (timeout); if (ch < 0) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); *packet_ptr++ = ch; checksum += ch; @@ -841,7 +841,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout) ch = readchar (timeout); if (ch < 0) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); *packet_ptr++ = ch; checksum += ch; @@ -901,7 +901,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout) len = 257; break; default: - error ("ocd_get_packet: unknown packet type 0x%x\n", ch); + error (_("ocd_get_packet: unknown packet type 0x%x."), ch); } } @@ -910,7 +910,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout) ch = readchar (timeout); if (ch < 0) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); *packet_ptr++ = ch; checksum += ch; len = ch; @@ -923,16 +923,16 @@ ocd_get_packet (int cmd, int *lenp, int timeout) ch = readchar (timeout); if (ch < 0) - error ("ocd_get_packet (readchar): %d", ch); + error (_("ocd_get_packet (readchar): %d"), ch); *packet_ptr++ = ch; checksum += ch; } if (checksum != 0) - error ("ocd_get_packet: bad packet checksum"); + error (_("ocd_get_packet: bad packet checksum")); if (cmd != -1 && cmd != packet[0]) - error ("Response phase error. Got 0x%x, expected 0x%x", packet[0], cmd); + error (_("Response phase error. Got 0x%x, expected 0x%x"), packet[0], cmd); *lenp = packet_ptr - packet - 1; /* Subtract checksum byte */ return packet; @@ -956,7 +956,7 @@ ocd_do_command (int cmd, int *statusp, int *lenp) p = ocd_get_packet (*buf, lenp, remote_timeout); if (*lenp < 3) - error ("Truncated response packet from OCD device"); + error (_("Truncated response packet from OCD device")); status = p[1]; error_code = p[2]; @@ -968,9 +968,9 @@ ocd_do_command (int cmd, int *statusp, int *lenp) } if (status & OCD_FLAG_PWF) - error ("OCD device can't detect VCC at BDM interface."); + error (_("OCD device can't detect VCC at BDM interface.")); else if (status & OCD_FLAG_CABLE_DISC) - error ("BDM cable appears to be disconnected."); + error (_("BDM cable appears to be disconnected.")); *statusp = status; @@ -1018,7 +1018,7 @@ void ocd_create_inferior (char *exec_file, char *args, char **env, int from_tty) { if (args && (*args != '\000')) - error ("Args are not supported by BDM."); + error (_("Args are not supported by BDM.")); clear_proceed_status (); proceed (bfd_get_start_address (exec_bfd), TARGET_SIGNAL_0, 0); @@ -1076,7 +1076,7 @@ ocd_remove_breakpoint (CORE_ADDR addr, char *contents_cache) static void bdm_command (char *args, int from_tty) { - error ("bdm command must be followed by `reset'"); + error (_("bdm command must be followed by `reset'")); } static void @@ -1085,7 +1085,7 @@ bdm_reset_command (char *args, int from_tty) int status, pktlen; if (!ocd_desc) - error ("Not connected to OCD device."); + error (_("Not connected to OCD device.")); ocd_do_command (OCD_RESET, &status, &pktlen); dcache_invalidate (target_dcache); @@ -1098,7 +1098,7 @@ bdm_restart_command (char *args, int from_tty) int status, pktlen; if (!ocd_desc) - error ("Not connected to OCD device."); + error (_("Not connected to OCD device.")); ocd_do_command (OCD_RESET_RUN, &status, &pktlen); last_run_status = status; @@ -1123,10 +1123,10 @@ bdm_update_flash_command (char *args, int from_tty) void (*store_registers_tmp) (int); if (!ocd_desc) - error ("Not connected to OCD device."); + error (_("Not connected to OCD device.")); if (!args) - error ("Must specify file containing new OCD code."); + error (_("Must specify file containing new OCD code.")); /* old_chain = make_cleanup (flash_cleanup, 0); */ diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 8c0b6e5..3c3e645 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -288,7 +288,7 @@ pascal_create_fundamental_type (struct objfile *objfile, int typeid) type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "<?type?>", objfile); - warning ("internal error: no Pascal fundamental type %d", typeid); + warning (_("internal error: no Pascal fundamental type %d"), typeid); break; case FT_VOID: type = init_type (TYPE_CODE_VOID, diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index a8908b1..a134716 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -294,7 +294,7 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream, gcc -Wall will reveal any types that haven't been handled. */ break; default: - error ("type not handled in pascal_type_print_varspec_prefix()"); + error (_("type not handled in pascal_type_print_varspec_prefix()")); break; } } @@ -415,7 +415,7 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream, gcc -Wall will report types that may not have been considered. */ break; default: - error ("type not handled in pascal_type_print_varspec_suffix()"); + error (_("type not handled in pascal_type_print_varspec_suffix()")); break; } } diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index f7a08e3..99f1a12 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -259,7 +259,7 @@ pascal_val_print (struct type *type, const bfd_byte *valaddr, break; case TYPE_CODE_MEMBER: - error ("not implemented: member type in pascal_val_print"); + error (_("not implemented: member type in pascal_val_print")); break; case TYPE_CODE_REF: @@ -529,7 +529,7 @@ pascal_val_print (struct type *type, const bfd_byte *valaddr, break; default: - error ("Invalid pascal type code %d in symbol table.", TYPE_CODE (type)); + error (_("Invalid pascal type code %d in symbol table."), TYPE_CODE (type)); } gdb_flush (stream); return (0); @@ -641,7 +641,7 @@ pascal_object_print_class_method (const bfd_byte *valaddr, struct type *type, sym = find_pc_function (addr); if (sym == 0) { - error ("invalid pointer to member function"); + error (_("invalid pointer to member function")); } len = TYPE_NFN_FIELDS (domain); for (i = 0; i < len; i++) diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c index e8074c6..24df146 100644 --- a/gdb/pa64solib.c +++ b/gdb/pa64solib.c @@ -170,7 +170,7 @@ pa64_solib_sizeof_symbol_table (char *filename) { close (desc); make_cleanup (xfree, filename); - error ("\"%s\": can't open to read symbols: %s.", filename, + error (_("\"%s\": can't open to read symbols: %s."), filename, bfd_errmsg (bfd_get_error ())); } @@ -178,7 +178,7 @@ pa64_solib_sizeof_symbol_table (char *filename) { bfd_close (abfd); make_cleanup (xfree, filename); - error ("\"%s\": can't read symbols: %s.", filename, + error (_("\"%s\": can't read symbols: %s."), filename, bfd_errmsg (bfd_get_error ())); } @@ -237,7 +237,7 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty, if (!bfd_check_format (tmp_bfd, bfd_object)) { bfd_close (tmp_bfd); - error ("\"%s\" is not an object file: %s", name, + error (_("\"%s\" is not an object file: %s"), name, bfd_errmsg (bfd_get_error ())); } @@ -321,7 +321,7 @@ pa64_solib_load_symbols (struct so_list *so, char *name, int from_tty, &so->sections, &so->sections_end)) { - error ("Unable to build section table for shared library\n."); + error (_("Unable to build section table for shared library\n.")); return; } @@ -393,7 +393,7 @@ pa64_solib_add (char *arg_string, int from_tty, struct target_ops *target, int r /* First validate our arguments. */ if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL) { - error ("Invalid regexp: %s", re_err); + error (_("Invalid regexp: %s"), re_err); } /* If we're debugging a core file, or have attached to a running @@ -425,7 +425,9 @@ pa64_solib_add (char *arg_string, int from_tty, struct target_ops *target, int r /* If the libraries were not mapped private, warn the user. */ if ((dld_cache.dld_flags & DT_HP_DEBUG_PRIVATE) == 0) - warning ("The shared libraries were not privately mapped; setting a\nbreakpoint in a shared library will not work until you rerun the program.\n"); + warning (_("\ +The shared libraries were not privately mapped; setting a\n\ +breakpoint in a shared library will not work until you rerun the program.")); /* For each shaerd library, add it to the shared library list. */ for (dll_index = 1; ; dll_index++) @@ -442,7 +444,7 @@ pa64_solib_add (char *arg_string, int from_tty, struct target_ops *target, int r 0, dld_cache.load_map); if (!dll_path) - error ("pa64_solib_add, unable to read shared library path."); + error (_("pa64_solib_add, unable to read shared library path.")); add_to_solist (from_tty, dll_path, readsyms, &dll_desc, 0, target); } @@ -493,7 +495,7 @@ pa64_solib_create_inferior_hook (void) /* Read in the .dynamic section. */ if (! read_dynamic_info (shlib_info, &dld_cache)) - error ("Unable to read the .dynamic section."); + error (_("Unable to read the .dynamic section.")); /* Turn on the flags we care about. */ dld_cache.dld_flags |= DT_HP_DEBUG_PRIVATE; @@ -502,7 +504,7 @@ pa64_solib_create_inferior_hook (void) (char *) &dld_cache.dld_flags, sizeof (dld_cache.dld_flags)); if (status != 0) - error ("Unable to modify dynamic linker flags."); + error (_("Unable to modify dynamic linker flags.")); /* Now we have to create a shared library breakpoint in the dynamic linker. This can be somewhat tricky since the symbol is inside @@ -539,7 +541,7 @@ pa64_solib_create_inferior_hook (void) /* Make sure the dynamic linker's really a useful object. */ if (!bfd_check_format (tmp_bfd, bfd_object)) { - warning ("Unable to grok dynamic linker %s as an object file", buf); + warning (_("Unable to grok dynamic linker %s as an object file"), buf); bfd_close (tmp_bfd); goto get_out; } @@ -946,7 +948,7 @@ read_dld_descriptor (struct target_ops *target, int readsyms) if (!dld_cache.is_valid) { if (symfile_objfile == NULL) - error ("No object file symbols."); + error (_("No object file symbols.")); dyninfo_sect = bfd_get_section_by_name (symfile_objfile->obfd, ".dynamic"); @@ -956,7 +958,7 @@ read_dld_descriptor (struct target_ops *target, int readsyms) } if (!read_dynamic_info (dyninfo_sect, &dld_cache)) - error ("Unable to read in .dynamic section information."); + error (_("Unable to read in .dynamic section information.")); } /* Read the load map pointer. */ @@ -965,7 +967,7 @@ read_dld_descriptor (struct target_ops *target, int readsyms) sizeof(dld_cache.load_map)) != 0) { - error ("Error while reading in load map pointer."); + error (_("Error while reading in load map pointer.")); } /* Read in the dld load module descriptor */ @@ -977,7 +979,7 @@ read_dld_descriptor (struct target_ops *target, int readsyms) dld_cache.load_map) == 0) { - error ("Error trying to get information about dynamic linker."); + error (_("Error trying to get information about dynamic linker.")); } /* Indicate that we have loaded the dld descriptor. */ @@ -1048,7 +1050,7 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p) sizeof(dld_cache_p->dld_flags)) != 0) { - error ("Error while reading in .dynamic section of the program."); + error (_("Error while reading in .dynamic section of the program.")); } } else if (dyn_tag == DT_HP_LOAD_MAP) @@ -1061,7 +1063,7 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p) sizeof(dld_cache_p->load_map_addr)) != 0) { - error ("Error while reading in .dynamic section of the program."); + error (_("Error while reading in .dynamic section of the program.")); } } else @@ -1151,7 +1153,7 @@ add_to_solist (int from_tty, char *dll_path, int readsyms, sizeof(struct load_module_desc)) != 0) { - error ("Error while reading in dynamic library %s", dll_path); + error (_("Error while reading in dynamic library %s"), dll_path); } } diff --git a/gdb/parse.c b/gdb/parse.c index c65d8bc..28e2257 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -817,7 +817,7 @@ operator_length_standard (struct expression *expr, int endpos, int i; if (endpos < 1) - error ("?error in operator_length_standard"); + error (_("?error in operator_length_standard")); i = (int) expr->elts[endpos - 1].opcode; @@ -1087,7 +1087,7 @@ parse_expression (char *string) struct expression *exp; exp = parse_exp_1 (&string, 0, 0); if (*string) - error ("Junk after end of expression."); + error (_("Junk after end of expression.")); return exp; } @@ -1101,7 +1101,7 @@ parse_expression_in_context (char *string, int void_context_p) struct expression *exp; exp = parse_exp_in_context (&string, 0, 0, void_context_p); if (*string != '\000') - error ("Junk after end of expression."); + error (_("Junk after end of expression.")); return exp; } diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 514ff4bd..53e1462 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -465,7 +465,7 @@ ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) /* Determine appropriate breakpoint contents and size for this address. */ bp = BREAKPOINT_FROM_PC (&addr, &bplen); if (bp == NULL) - error ("Software breakpoints not implemented for this target."); + error (_("Software breakpoints not implemented for this target.")); val = target_read_memory (addr, old_contents, bplen); diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 44b3077..f7f9f50b 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -204,14 +204,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 ppcnbsd_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 ppcnbsd_supply_fpreg (core_reg_sect, -1); break; diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 524dd39..9b16331 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -403,7 +403,7 @@ print_scalar_formatted (const void *valaddr, struct type *type, print_longest (stream, size, 1, val_long); break; default: - error ("Undefined output size \"%c\".", size); + error (_("Undefined output size \"%c\"."), size); } break; @@ -473,7 +473,7 @@ print_scalar_formatted (const void *valaddr, struct type *type, width = 64; break; default: - error ("Undefined output size \"%c\".", size); + error (_("Undefined output size \"%c\"."), size); } bits[width] = '\0'; @@ -495,7 +495,7 @@ print_scalar_formatted (const void *valaddr, struct type *type, break; default: - error ("Undefined output format \"%c\".", format); + error (_("Undefined output format \"%c\"."), format); } } @@ -836,12 +836,12 @@ static void validate_format (struct format_data fmt, char *cmdname) { if (fmt.size != 0) - error ("Size letters are meaningless in \"%s\" command.", cmdname); + error (_("Size letters are meaningless in \"%s\" command."), cmdname); if (fmt.count != 1) - error ("Item count other than 1 is meaningless in \"%s\" command.", + error (_("Item count other than 1 is meaningless in \"%s\" command."), cmdname); if (fmt.format == 'i' || fmt.format == 's') - error ("Format letter \"%c\" is meaningless in \"%s\" command.", + error (_("Format letter \"%c\" is meaningless in \"%s\" command."), fmt.format, cmdname); } @@ -1046,7 +1046,7 @@ address_info (char *exp, int from_tty) if exp is a field of `this'. */ if (exp == 0) - error ("Argument required."); + error (_("Argument required.")); sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); @@ -1088,7 +1088,7 @@ address_info (char *exp, int from_tty) printf_filtered (".\n"); } else - error ("No symbol \"%s\" in current context.", exp); + error (_("No symbol \"%s\" in current context."), exp); return; } @@ -1419,7 +1419,7 @@ delete_display (int num) struct display *d1, *d; if (!display_chain) - error ("No display number %d.", num); + error (_("No display number %d."), num); if (display_chain->number == num) { @@ -1431,7 +1431,7 @@ delete_display (int num) for (d = display_chain;; d = d->next) { if (d->next == 0) - error ("No display number %d.", num); + error (_("No display number %d."), num); if (d->next->number == num) { d1 = d->next; @@ -1466,7 +1466,7 @@ undisplay_command (char *args, int from_tty) while (*p1 >= '0' && *p1 <= '9') p1++; if (*p1 && *p1 != ' ' && *p1 != '\t') - error ("Arguments must be display numbers."); + error (_("Arguments must be display numbers.")); num = atoi (p); @@ -1653,7 +1653,7 @@ enable_display (char *args, int from_tty) while (*p1 >= '0' && *p1 <= '9') p1++; if (*p1 && *p1 != ' ' && *p1 != '\t') - error ("Arguments must be display numbers."); + error (_("Arguments must be display numbers.")); num = atoi (p); @@ -1690,7 +1690,7 @@ disable_display_command (char *args, int from_tty) while (*p1 >= '0' && *p1 <= '9') p1++; if (*p1 && *p1 != ' ' && *p1 != '\t') - error ("Arguments must be display numbers."); + error (_("Arguments must be display numbers.")); disable_display (atoi (p)); @@ -1739,7 +1739,7 @@ printf_command (char *arg, int from_tty) /* A format string should follow, enveloped in double quotes */ if (*s++ != '"') - error ("Bad format string, missing '\"'."); + error (_("Bad format string, missing '\"'.")); /* Parse the format-control string and copy it into the string STRING, processing some kinds of escape sequence. */ @@ -1752,7 +1752,7 @@ printf_command (char *arg, int from_tty) switch (c) { case '\0': - error ("Bad format string, non-terminated '\"'."); + error (_("Bad format string, non-terminated '\"'.")); case '\\': switch (c = *s++) @@ -1786,7 +1786,7 @@ printf_command (char *arg, int from_tty) break; default: /* ??? TODO: handle other escape sequences */ - error ("Unrecognized escape character \\%c in format string.", + error (_("Unrecognized escape character \\%c in format string."), c); } break; @@ -1803,7 +1803,7 @@ printf_command (char *arg, int from_tty) s++; if (*s != ',' && *s != 0) - error ("Invalid argument syntax"); + error (_("Invalid argument syntax")); if (*s == ',') s++; @@ -1857,10 +1857,10 @@ printf_command (char *arg, int from_tty) break; case '*': - error ("`*' not supported for precision or width in printf"); + error (_("`*' not supported for precision or width in printf")); case 'n': - error ("Format specifier `n' not supported in printf"); + error (_("Format specifier `n' not supported in printf")); case '%': this_argclass = no_arg; @@ -1915,7 +1915,7 @@ printf_command (char *arg, int from_tty) } if (nargs != nargs_wanted) - error ("Wrong number of arguments for specified format-string"); + error (_("Wrong number of arguments for specified format-string")); /* Now actually print them. */ current_substring = substrings; @@ -1963,7 +1963,7 @@ printf_command (char *arg, int from_tty) break; } #else - error ("long long not supported in printf"); + error (_("long long not supported in printf")); #endif case int_arg: { @@ -1973,7 +1973,7 @@ printf_command (char *arg, int from_tty) break; } default: /* purecov: deadcode */ - error ("internal error in printf_command"); /* purecov: deadcode */ + error (_("internal error in printf_command")); /* purecov: deadcode */ } /* Skip to the next substring. */ current_substring += strlen (current_substring) + 1; diff --git a/gdb/procfs.c b/gdb/procfs.c index 29d5c81..5976624 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -466,10 +466,10 @@ find_procinfo_or_die (int pid, int tid) if (pi == NULL) { if (tid) - error ("procfs: couldn't find pid %d (kernel thread %d) in procinfo list.", + error (_("procfs: couldn't find pid %d (kernel thread %d) in procinfo list."), pid, tid); else - error ("procfs: couldn't find pid %d in procinfo list.", pid); + error (_("procfs: couldn't find pid %d in procinfo list."), pid); } return pi; } @@ -833,7 +833,7 @@ dead_procinfo (procinfo *pi, char *msg, int kill_p) kill (pi->pid, SIGKILL); destroy_procinfo (pi); - error (msg); + error ((msg)); } /* @@ -902,18 +902,18 @@ load_syscalls (procinfo *pi) sysent_fd = open_with_retry (pathname, O_RDONLY); if (sysent_fd < 0) { - error ("load_syscalls: Can't open /proc/%d/sysent", pi->pid); + error (_("load_syscalls: Can't open /proc/%d/sysent"), pi->pid); } size = sizeof header - sizeof (prsyscall_t); if (read (sysent_fd, &header, size) != size) { - error ("load_syscalls: Error reading /proc/%d/sysent", pi->pid); + error (_("load_syscalls: Error reading /proc/%d/sysent"), pi->pid); } if (header.pr_nsyscalls == 0) { - error ("load_syscalls: /proc/%d/sysent contains no syscalls!", pi->pid); + error (_("load_syscalls: /proc/%d/sysent contains no syscalls!"), pi->pid); } size = header.pr_nsyscalls * sizeof (prsyscall_t); @@ -922,7 +922,7 @@ load_syscalls (procinfo *pi) if (read (sysent_fd, syscalls, size) != size) { xfree (syscalls); - error ("load_syscalls: Error reading /proc/%d/sysent", pi->pid); + error (_("load_syscalls: Error reading /proc/%d/sysent"), pi->pid); } /* Find maximum syscall number. This may not be the same as @@ -1471,7 +1471,7 @@ proc_modify_flag (procinfo *pi, long flag, long mode) pi->status_valid = 0; if (!win) - warning ("procfs: modify_flag failed to turn %s %s", + warning (_("procfs: modify_flag failed to turn %s %s"), flag == PR_FORK ? "PR_FORK" : flag == PR_RLC ? "PR_RLC" : #ifdef PR_ASYNC @@ -1819,7 +1819,7 @@ proc_set_traced_signals (procinfo *pi, gdb_sigset_t *sigset) pi->status_valid = 0; if (!win) - warning ("procfs: set_traced_signals failed"); + warning (_("procfs: set_traced_signals failed")); return win; } @@ -3516,7 +3516,7 @@ procfs_attach (char *args, int from_tty) pid = atoi (args); if (pid == getpid ()) - error ("Attaching GDB to itself is not a good idea..."); + error (_("Attaching GDB to itself is not a good idea...")); if (from_tty) { @@ -3570,7 +3570,7 @@ do_attach (ptid_t ptid) int fail; if ((pi = create_procinfo (PIDGET (ptid), 0)) == NULL) - perror ("procfs: out of memory in 'attach'"); + perror (_("procfs: out of memory in 'attach'")); if (!open_procinfo_files (pi, FD_CTL)) { @@ -3697,7 +3697,7 @@ procfs_fetch_registers (int regnum) pi = find_procinfo_or_die (pid, tid); if (pi == NULL) - error ("procfs: fetch_registers failed to find procinfo for %s", + error (_("procfs: fetch_registers failed to find procinfo for %s"), target_pid_to_str (inferior_ptid)); gregs = proc_get_gregs (pi); @@ -3765,7 +3765,7 @@ procfs_store_registers (int regnum) pi = find_procinfo_or_die (pid, tid); if (pi == NULL) - error ("procfs: store_registers: failed to find procinfo for %s", + error (_("procfs: store_registers: failed to find procinfo for %s"), target_pid_to_str (inferior_ptid)); gregs = proc_get_gregs (pi); @@ -3919,7 +3919,7 @@ wait_again: wait_retval = wait (&wstat); /* "wait" for the child's exit */ if (wait_retval != PIDGET (inferior_ptid)) /* wrong child? */ - error ("procfs: couldn't stop process %d: wait returned %d\n", + error (_("procfs: couldn't stop process %d: wait returned %d."), PIDGET (inferior_ptid), wait_retval); /* FIXME: might I not just use waitpid? Or try find_procinfo to see if I know about this child? */ @@ -4232,7 +4232,7 @@ wait_again: printf_filtered ("procfs:%d -- ", __LINE__); printf_filtered ("child stopped for unknown reason:\n"); proc_prettyprint_why (why, what, 1); - error ("... giving up..."); + error (_("... giving up...")); break; } break; /* case PR_FAULTED: */ @@ -4240,7 +4240,7 @@ wait_again: printf_filtered ("procfs:%d -- ", __LINE__); printf_filtered ("child stopped for unknown reason:\n"); proc_prettyprint_why (why, what, 1); - error ("... giving up..."); + error (_("... giving up...")); break; } /* @@ -4283,7 +4283,7 @@ wait_again: printf_filtered ("procfs:%d -- process not stopped.\n", __LINE__); proc_prettyprint_flags (flags, 1); - error ("procfs: ...giving up..."); + error (_("procfs: ...giving up...")); } } @@ -4554,7 +4554,7 @@ procfs_resume (ptid_t ptid, int step, enum target_signal signo) if (!proc_run_process (pi, step, native_signo)) { if (errno == EBUSY) - warning ("resume: target already running. Pretend to resume, and hope for the best!\n"); + warning (_("resume: target already running. Pretend to resume, and hope for the best!")); else proc_error (pi, "target_resume", __LINE__); } @@ -4628,7 +4628,7 @@ procfs_files_info (struct target_ops *ignore) static void procfs_open (char *args, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } /* @@ -5084,7 +5084,7 @@ procfs_create_inferior (char *exec_file, char *allargs, char **env, /* Not found. This must be an error rather than merely passing the file to execlp(), because execlp() would try all the exec()s, causing GDB to get confused. */ - error ("procfs:%d -- Can't find shell %s in PATH", + error (_("procfs:%d -- Can't find shell %s in PATH"), __LINE__, shell_file); shell_file = tryname; @@ -5335,14 +5335,14 @@ procfs_find_LDT_entry (ptid_t ptid) /* Find procinfo for the lwp. */ if ((pi = find_procinfo (PIDGET (ptid), TIDGET (ptid))) == NULL) { - warning ("procfs_find_LDT_entry: could not find procinfo for %d:%d.", + warning (_("procfs_find_LDT_entry: could not find procinfo for %d:%d."), PIDGET (ptid), TIDGET (ptid)); return NULL; } /* get its general registers. */ if ((gregs = proc_get_gregs (pi)) == NULL) { - warning ("procfs_find_LDT_entry: could not read gregs for %d:%d.", + warning (_("procfs_find_LDT_entry: could not read gregs for %d:%d."), PIDGET (ptid), TIDGET (ptid)); return NULL; } @@ -5577,7 +5577,7 @@ remove_dbx_link_breakpoint (void) if (memory_remove_breakpoint (dbx_link_bpt_addr, dbx_link_shadow_contents) != 0) - warning ("Unable to remove __dbx_link breakpoint."); + warning (_("Unable to remove __dbx_link breakpoint.")); dbx_link_bpt_addr = 0; } @@ -5630,7 +5630,7 @@ insert_dbx_link_bpt_in_file (int fd, CORE_ADDR ignored) abfd = bfd_fdopenr ("unamed", 0, fd); if (abfd == NULL) { - warning ("Failed to create a bfd: %s.\n", bfd_errmsg (bfd_get_error ())); + warning (_("Failed to create a bfd: %s."), bfd_errmsg (bfd_get_error ())); return 0; } @@ -5649,7 +5649,7 @@ insert_dbx_link_bpt_in_file (int fd, CORE_ADDR ignored) dbx_link_bpt_addr = sym_addr; if (target_insert_breakpoint (sym_addr, dbx_link_shadow_contents) != 0) { - warning ("Failed to insert dbx_link breakpoint."); + warning (_("Failed to insert dbx_link breakpoint.")); bfd_close (abfd); return 0; } @@ -5833,7 +5833,7 @@ info_proc_cmd (char *args, int from_tty) if (pid == 0) pid = PIDGET (inferior_ptid); if (pid == 0) - error ("No current process: you must name one."); + error (_("No current process: you must name one.")); else { /* Have pid, will travel. @@ -5924,7 +5924,7 @@ proc_trace_syscalls (char *args, int from_tty, int entry_or_exit, int mode) procinfo *pi; if (PIDGET (inferior_ptid) <= 0) - error ("you must be debugging a process to use this command."); + error (_("you must be debugging a process to use this command.")); if (args == NULL || args[0] == 0) error_no_arg ("system call to trace"); @@ -6141,7 +6141,7 @@ procfs_make_note_section (bfd *obfd, int *note_size) static char * procfs_make_note_section (bfd *obfd, int *note_size) { - error ("gcore not implemented for this host."); + error (_("gcore not implemented for this host.")); return NULL; /* lint */ } #endif /* Solaris or Unixware */ diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index 06b73f5..6c4cdf0 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -152,7 +152,7 @@ static void puts_e7000debug (char *buf) { if (!e7000_desc) - error ("Use \"target e7000 ...\" first."); + error (_("Use \"target e7000 ...\" first.")); if (remote_debug) printf_unfiltered ("Sending %s\n", buf); @@ -210,10 +210,10 @@ readchar (int timeout) if (timeout == 0) return -1; echo = 0; - error ("Timeout reading from remote system."); + error (_("Timeout reading from remote system.")); } else if (c < 0) - error ("Serial communication error"); + error (_("Serial communication error")); if (remote_debug) { @@ -378,10 +378,10 @@ e7000_create_inferior (char *execfile, char *args, char **env, int entry_pt; if (args && *args) - error ("Can't pass arguments to remote E7000DEBUG process"); + error (_("Can't pass arguments to remote E7000DEBUG process")); if (execfile == 0 || exec_bfd == 0) - error ("No executable file specified"); + error (_("No executable file specified")); entry_pt = (int) bfd_get_start_address (exec_bfd); @@ -460,7 +460,7 @@ e7000_login_command (char *args, int from_tty) } else { - error ("Syntax is ftplogin <machine> <user> <passwd> <directory>"); + error (_("Syntax is ftplogin <machine> <user> <passwd> <directory>")); } } @@ -524,10 +524,10 @@ e7000_parse_device (char *args, char *dev_name, int baudrate) if (n != 1 && n != 2) { - error ("Bad arguments. Usage:\ttarget e7000 <device> <speed>\n\ + error (_("Bad arguments. Usage:\ttarget e7000 <device> <speed>\n\ or \t\ttarget e7000 <host>[:<port>]\n\ or \t\ttarget e7000 tcp_remote <host>[:<port>]\n\ -or \t\ttarget e7000 pc\n"); +or \t\ttarget e7000 pc\n")); } #if !defined(__GO32__) && !defined(_WIN32) && !defined(__CYGWIN__) @@ -614,7 +614,7 @@ e7000_start_remote (void *dummy) if (!sync) { fprintf_unfiltered (gdb_stderr, "Giving up after %d tries...\n", try); - error ("Unable to synchronize with target.\n"); + error (_("Unable to synchronize with target.")); } puts_e7000debug ("\r"); @@ -826,7 +826,7 @@ fetch_regs_from_dump (int (*nextchar) (), char *want) } else { - error ("out of sync in fetch registers wanted <%s>, got <%c 0x%x>", + error (_("out of sync in fetch registers wanted <%s>, got <%c 0x%x>"), want, thischar, thischar); } @@ -1181,7 +1181,7 @@ write_large (CORE_ADDR memaddr, unsigned char *myaddr, int len) { /* Hmm, it's trying to tell us something */ expect (":"); - error ("Error writing memory"); + error (_("Error writing memory")); } else { @@ -1390,7 +1390,7 @@ fast_but_for_the_pause_e7000_read_inferior_memory (CORE_ADDR memaddr, if (c != ENQ) { /* Got an error */ - error ("Memory read error"); + error (_("Memory read error")); } putchar_e7000 (ACK); expect ("SV s"); @@ -1536,7 +1536,7 @@ e7000_load (char *args, int from_tty) else if (strncmp (arg, "-nostart", strlen (arg)) == 0) nostart = 1; else - error ("unknown option `%s'", arg); + error (_("unknown option `%s'"), arg); } if (!filename) @@ -1551,7 +1551,7 @@ e7000_load (char *args, int from_tty) old_chain = make_cleanup_bfd_close (pbfd); if (!bfd_check_format (pbfd, bfd_object)) - error ("\"%s\" is not an object file: %s", filename, + error (_("\"%s\" is not an object file: %s"), filename, bfd_errmsg (bfd_get_error ())); start_time = time (NULL); @@ -1725,7 +1725,7 @@ e7000_insert_breakpoint (CORE_ADDR addr, char *shadow) return 0; } - error ("Too many breakpoints ( > %d) for the E7000\n", + error (_("Too many breakpoints ( > %d) for the E7000."), MAX_E7000DEBUG_BREAKPOINTS); return 1; } @@ -1766,7 +1766,7 @@ e7000_remove_breakpoint (CORE_ADDR addr, char *shadow) return 0; } - warning ("Can't find breakpoint associated with 0x%s\n", paddr_nz (addr)); + warning (_("Can't find breakpoint associated with 0x%s."), paddr_nz (addr)); return 1; } @@ -1782,7 +1782,7 @@ e7000_command (char *args, int fromtty) echo = 0; if (!e7000_desc) - error ("e7000 target not open."); + error (_("e7000 target not open.")); if (!args) { puts_e7000debug ("\r"); diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 2ffc803..26297a9 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -1358,14 +1358,14 @@ set_system_call_allowed (char *args, int from_tty) return; } } - error ("Illegal argument for \"set remote system-call-allowed\" command"); + error (_("Illegal argument for \"set remote system-call-allowed\" command")); } static void show_system_call_allowed (char *args, int from_tty) { if (args) - error ("Garbage after \"show remote system-call-allowed\" command: `%s'", args); + error (_("Garbage after \"show remote system-call-allowed\" command: `%s'"), args); printf_unfiltered ("Calling host system(3) call from target is %sallowed\n", remote_fio_system_call_allowed ? "" : "not "); } diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index cca045e..d86936f 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -312,10 +312,10 @@ m32r_create_inferior (char *execfile, char *args, char **env, int from_tty) CORE_ADDR entry_pt; if (args && *args) - error ("Cannot pass arguments to remote STDEBUG process"); + error (_("Cannot pass arguments to remote STDEBUG process")); if (execfile == 0 || exec_bfd == 0) - error ("No executable file specified"); + error (_("No executable file specified")); if (remote_debug) fprintf_unfiltered (gdb_stdlog, "m32r_create_inferior(%s,%s)\n", execfile, @@ -374,13 +374,13 @@ m32r_open (char *args, int from_tty) sdi_desc = serial_open (hostname); if (!sdi_desc) - error ("Connection refused\n"); + error (_("Connection refused.")); if (get_ack () == -1) - error ("Cannot connect to SDI target\n"); + error (_("Cannot connect to SDI target.")); if (send_cmd (SDI_OPEN) == -1) - error ("Cannot connect to SDI target\n"); + error (_("Cannot connect to SDI target.")); /* Get maximum number of ib breakpoints */ send_one_arg_cmd (SDI_GET_ATTR, SDI_ATTR_BRK); @@ -703,13 +703,13 @@ m32r_wait (ptid_t ptid, struct target_waitstatus *status) /* Wait for ready */ buf[0] = SDI_WAIT_FOR_READY; if (serial_write (sdi_desc, buf, 1) != 0) - error ("Remote connection closed"); + error (_("Remote connection closed")); while (1) { c = serial_readchar (sdi_desc, SDI_TIMEOUT); if (c < 0) - error ("Remote connection closed"); + error (_("Remote connection closed")); if (c == '-') /* error */ { @@ -725,7 +725,7 @@ m32r_wait (ptid_t ptid, struct target_waitstatus *status) else ret = serial_write (sdi_desc, ".", 1); /* packet to wait */ if (ret != 0) - error ("Remote connection closed"); + error (_("Remote connection closed")); } status->kind = TARGET_WAITKIND_STOPPED; @@ -1178,7 +1178,7 @@ m32r_insert_breakpoint (CORE_ADDR addr, char *shadow) } } - error ("Too many breakpoints"); + error (_("Too many breakpoints")); return 1; } @@ -1245,7 +1245,7 @@ m32r_load (char *args, int from_tty) else if (strncmp (arg, "-nostart", strlen (arg)) == 0) nostart = 1; else - error ("Unknown option `%s'", arg); + error (_("Unknown option `%s'"), arg); } if (!filename) @@ -1260,7 +1260,7 @@ m32r_load (char *args, int from_tty) old_chain = make_cleanup_bfd_close (pbfd); if (!bfd_check_format (pbfd, bfd_object)) - error ("\"%s\" is not an object file: %s", filename, + error (_("\"%s\" is not an object file: %s"), filename, bfd_errmsg (bfd_get_error ())); start_time = time (NULL); @@ -1310,7 +1310,7 @@ m32r_load (char *args, int from_tty) bfd_get_section_contents (pbfd, section, buf + 9, fptr, count); if (send_data (buf, count + 9) <= 0) - error ("Error while downloading %s section.", + error (_("Error while downloading %s section."), bfd_get_section_name (pbfd, section)); if (!quiet) @@ -1425,7 +1425,7 @@ m32r_insert_watchpoint (CORE_ADDR addr, int len, int type) } } - error ("Too many watchpoints"); + error (_("Too many watchpoints")); return 1; } diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c index 3d3f3cf..2f10971 100644 --- a/gdb/remote-rdi.c +++ b/gdb/remote-rdi.c @@ -193,8 +193,8 @@ arm_rdi_open (char *name, int from_tty) char *p; if (name == NULL) - error ("To open an RDI connection, you need to specify what serial\n\ -device is attached to the remote system (e.g. /dev/ttya)."); + error (_("To open an RDI connection, you need to specify what serial\n\ +device is attached to the remote system (e.g. /dev/ttya).")); /* split name after whitespace, pass tail as arg to open command */ @@ -217,7 +217,7 @@ device is attached to the remote system (e.g. /dev/ttya)."); rslt = Adp_OpenDevice (devName, openArgs, rdi_heartbeat); if (rslt != adp_ok) - error ("Could not open device \"%s\"", name); + error (_("Could not open device \"%s\""), name); gdb_config.bytesex = 2 | (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 1 : 0); gdb_config.fpe = 1; @@ -242,7 +242,7 @@ device is attached to the remote system (e.g. /dev/ttya)."); { printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt)); Adp_CloseDevice (); - error ("RDI_open failed\n"); + error (_("RDI_open failed.")); } rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2); @@ -336,7 +336,7 @@ arm_rdi_create_inferior (char *exec_file, char *args, char **env, int from_tty) CORE_ADDR entry_point; if (exec_file == 0 || exec_bfd == 0) - error ("No executable file specified."); + error (_("No executable file specified.")); entry_point = (CORE_ADDR) bfd_get_start_address (exec_bfd); diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c index f8d9d8b..8c9288d 100644 --- a/gdb/remote-rdp.c +++ b/gdb/remote-rdp.c @@ -193,7 +193,7 @@ get_byte (void) if (timeout == 0) return (unsigned char) c; - error ("Timeout reading from remote_system"); + error (_("Timeout reading from remote_system")); } return c; @@ -387,7 +387,7 @@ rdp_init (int cold, int tty) if (!sync) { - error ("Couldn't reset the board, try pressing the reset button"); + error (_("Couldn't reset the board, try pressing the reset button")); } } @@ -454,10 +454,10 @@ send_rdp (char *template,...) printf_unfiltered ("RDP: Unimplemented message\n"); return; case 255: - error ("Command garbled"); + error (_("Command garbled")); break; default: - error ("Corrupt reply from target"); + error (_("Corrupt reply from target")); break; } break; @@ -988,7 +988,7 @@ handle_swi (void) break; default: - error ("Unimplemented SWI argument"); + error (_("Unimplemented SWI argument")); } type = type >> 2; @@ -1357,7 +1357,7 @@ remote_rdp_create_inferior (char *exec_file, char *allargs, char **env, CORE_ADDR entry_point; if (exec_file == 0 || exec_bfd == 0) - error ("No executable file specified."); + error (_("No executable file specified.")); entry_point = (CORE_ADDR) bfd_get_start_address (exec_bfd); diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index dda0df3..1a8302f 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -407,7 +407,7 @@ gdbsim_load (char *prog, int fromtty) Need error to either not print anything if passed NULL or need another routine that doesn't take any arguments. */ if (sim_load (gdbsim_desc, prog, NULL, fromtty) == SIM_RC_FAIL) - error ("unable to load program"); + error (_("unable to load program")); /* FIXME: If a load command should reset the targets registers then a call to sim_create_inferior() should go here. */ @@ -431,9 +431,9 @@ gdbsim_create_inferior (char *exec_file, char *args, char **env, int from_tty) char *arg_buf, **argv; if (exec_file == 0 || exec_bfd == 0) - warning ("No executable file specified."); + warning (_("No executable file specified.")); if (!program_loaded) - warning ("No program loaded."); + warning (_("No program loaded.")); if (sr_get_debug ()) printf_filtered ("gdbsim_create_inferior: exec_file \"%s\", args \"%s\"\n", @@ -527,14 +527,14 @@ gdbsim_open (char *args, int from_tty) } argv = buildargv (arg_buf); if (argv == NULL) - error ("Insufficient memory available to allocate simulator arg list."); + error (_("Insufficient memory available to allocate simulator arg list.")); make_cleanup_freeargv (argv); init_callbacks (); gdbsim_desc = sim_open (SIM_OPEN_DEBUG, &gdb_callback, exec_bfd, argv); if (gdbsim_desc == 0) - error ("unable to create simulator instance"); + error (_("unable to create simulator instance")); push_target (&gdbsim_ops); target_fetch_registers (-1); @@ -599,7 +599,7 @@ static void gdbsim_resume (ptid_t ptid, int step, enum target_signal siggnal) { if (PIDGET (inferior_ptid) != 42) - error ("The program is not being run."); + error (_("The program is not being run.")); if (sr_get_debug ()) printf_filtered ("gdbsim_resume: step %d, signal %d\n", step, siggnal); @@ -747,7 +747,7 @@ gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, struct target_ops *target) { if (!program_loaded) - error ("No program loaded."); + error (_("No program loaded.")); if (sr_get_debug ()) { @@ -835,7 +835,7 @@ simulator_command (char *args, int from_tty) commands, is restricted to the period when the channel to the simulator is open. */ - error ("Not connected to the simulator target"); + error (_("Not connected to the simulator target")); } sim_do_command (gdbsim_desc, args); diff --git a/gdb/remote-st.c b/gdb/remote-st.c index ce82c30..a8d8fb2 100644 --- a/gdb/remote-st.c +++ b/gdb/remote-st.c @@ -105,7 +105,7 @@ readchar (int timeout) if (timeout == 0) return c; /* Polls shouldn't generate timeout errors */ - error ("Timeout reading from remote system."); + error (_("Timeout reading from remote system.")); } perror_with_name ("remote-st2000"); @@ -190,7 +190,7 @@ get_hex_digit (int ignore_space) else { expect_prompt (1); - error ("Invalid hex digit from remote system."); + error (_("Invalid hex digit from remote system.")); } } } @@ -235,10 +235,10 @@ st2000_create_inferior (char *execfile, char *args, char **env, int entry_pt; if (args && *args) - error ("Can't pass arguments to remote STDEBUG process"); + error (_("Can't pass arguments to remote STDEBUG process")); if (execfile == 0 || exec_bfd == 0) - error ("No executable file specified"); + error (_("No executable file specified")); entry_pt = (int) bfd_get_start_address (exec_bfd); @@ -279,8 +279,8 @@ st2000_open (char *args, int from_tty) n = sscanf (args, " %s %d %s", dev_name, &baudrate, junk); if (n != 2) - error ("Bad arguments. Usage: target st2000 <device> <speed>\n\ -or target st2000 <host> <port>\n"); + error (_("Bad arguments. Usage: target st2000 <device> <speed>\n\ +or target st2000 <host> <port>\n")); st2000_close (0); @@ -651,10 +651,10 @@ static void st2000_command (char *args, int fromtty) { if (!st2000_desc) - error ("st2000 target not open."); + error (_("st2000 target not open.")); if (!args) - error ("Missing command."); + error (_("Missing command.")); printf_stdebug ("%s\r", args); expect_prompt (0); @@ -686,7 +686,7 @@ connect_command (char *args, int fromtty) dont_repeat (); if (st2000_desc < 0) - error ("st2000 target not open."); + error (_("st2000 target not open.")); if (args) fprintf ("This command takes no args. They have been ignored.\n"); diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c index 2f3032c..8bfa864 100644 --- a/gdb/remote-utils.c +++ b/gdb/remote-utils.c @@ -85,8 +85,8 @@ usage (char *proto, char *junk) if (junk != NULL) fprintf_unfiltered (gdb_stderr, "Unrecognized arguments: `%s'.\n", junk); - error ("Usage: target %s [DEVICE [SPEED [DEBUG]]]\n\ -where DEVICE is the name of a device or HOST:PORT", proto); + error (_("Usage: target %s [DEVICE [SPEED [DEBUG]]]\n\ +where DEVICE is the name of a device or HOST:PORT"), proto); return; } @@ -225,7 +225,7 @@ sr_readchar (void) buf = serial_readchar (sr_get_desc (), sr_get_timeout ()); if (buf == SERIAL_TIMEOUT) - error ("Timeout reading from remote system."); + error (_("Timeout reading from remote system.")); if (sr_get_debug () > 0) printf_unfiltered ("%c", buf); @@ -339,7 +339,7 @@ sr_get_hex_digit (int ignore_space) else if (ch != ' ' || !ignore_space) { gr_expect_prompt (); - error ("Invalid hex digit from remote system."); + error (_("Invalid hex digit from remote system.")); } } } @@ -417,7 +417,7 @@ void gr_detach (char *args, int from_tty) { if (args) - error ("Argument given to \"detach\" when remotely debugging."); + error (_("Argument given to \"detach\" when remotely debugging.")); if (sr_is_open ()) gr_clear_all_breakpoints (); @@ -471,10 +471,10 @@ gr_create_inferior (char *execfile, char *args, char **env) int entry_pt; if (args && *args) - error ("Can't pass arguments to remote process."); + error (_("Can't pass arguments to remote process.")); if (execfile == 0 || exec_bfd == 0) - error ("No executable file specified"); + error (_("No executable file specified")); entry_pt = (int) bfd_get_start_address (exec_bfd); sr_check_open (); diff --git a/gdb/remote-utils.h b/gdb/remote-utils.h index cae5d5e..daadcb9 100644 --- a/gdb/remote-utils.h +++ b/gdb/remote-utils.h @@ -70,7 +70,7 @@ extern struct _sr_settings sr_settings; #define sr_is_open() (sr_settings.desc != NULL) #define sr_check_open() { if (!sr_is_open()) \ - error ("Remote device not open"); } + error (_("Remote device not open")); } struct gr_settings { diff --git a/gdb/remote.c b/gdb/remote.c index d84a572..f5099ad 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -452,7 +452,7 @@ set_memory_packet_size (char *args, struct memory_packet_config *config) int fixed_p = config->fixed_p; long size = config->size; if (args == NULL) - error ("Argument required (integer, `fixed' or `limited')."); + error (_("Argument required (integer, `fixed' or `limited').")); else if (strcmp (args, "hard") == 0 || strcmp (args, "fixed") == 0) fixed_p = 1; @@ -464,14 +464,14 @@ set_memory_packet_size (char *args, struct memory_packet_config *config) char *end; size = strtoul (args, &end, 0); if (args == end) - error ("Invalid %s (bad syntax).", config->name); + error (_("Invalid %s (bad syntax)."), config->name); #if 0 /* Instead of explicitly capping the size of a packet to MAX_REMOTE_PACKET_SIZE or dissallowing it, the user is instead allowed to set the size to something arbitrarily large. */ if (size > MAX_REMOTE_PACKET_SIZE) - error ("Invalid %s (too large).", config->name); + error (_("Invalid %s (too large)."), config->name); #endif } /* Extra checks? */ @@ -480,7 +480,7 @@ set_memory_packet_size (char *args, struct memory_packet_config *config) if (! query ("The target may not be able to correctly handle a %s\n" "of %ld bytes. Change the packet size? ", config->name, size)) - error ("Packet size not changed."); + error (_("Packet size not changed.")); } /* Update the config. */ config->fixed_p = fixed_p; @@ -718,11 +718,11 @@ packet_ok (const char *buf, struct packet_config *config) if (config->detect == AUTO_BOOLEAN_AUTO) /* If the stub previously indicated that the packet was supported then there is a protocol error.. */ - error ("Protocol error: %s (%s) conflicting enabled responses.", + error (_("Protocol error: %s (%s) conflicting enabled responses."), config->name, config->title); else /* The user set it wrong. */ - error ("Enabled packet %s (%s) not recognized by stub", + error (_("Enabled packet %s (%s) not recognized by stub"), config->name, config->title); break; case PACKET_SUPPORT_UNKNOWN: @@ -1486,10 +1486,10 @@ remote_unpack_thread_info_response (char *pkt, threadref *expectedref, pkt = unpack_threadid (pkt, &ref); if (mask == 0) - warning ("Incomplete response to threadinfo request\n"); + warning (_("Incomplete response to threadinfo request.")); if (!threadmatch (&ref, expectedref)) { /* This is an answer to a different request. */ - warning ("ERROR RMT Thread info mismatch\n"); + warning (_("ERROR RMT Thread info mismatch.")); return 0; } copy_threadref (&info->threadid, &ref); @@ -1503,7 +1503,7 @@ remote_unpack_thread_info_response (char *pkt, threadref *expectedref, pkt = unpack_byte (pkt, &length); /* length */ if (!(tag & mask)) /* Tags out of synch with mask. */ { - warning ("ERROR RMT: threadinfo tag mismatch\n"); + warning (_("ERROR RMT: threadinfo tag mismatch.")); retval = 0; break; } @@ -1511,7 +1511,7 @@ remote_unpack_thread_info_response (char *pkt, threadref *expectedref, { if (length != 16) { - warning ("ERROR RMT: length of threadid is not 16\n"); + warning (_("ERROR RMT: length of threadid is not 16.")); retval = 0; break; } @@ -1526,7 +1526,7 @@ remote_unpack_thread_info_response (char *pkt, threadref *expectedref, mask = mask & ~(TAG_EXISTS); if (length > 8) { - warning ("ERROR RMT: 'exists' length too long\n"); + warning (_("ERROR RMT: 'exists' length too long.")); retval = 0; break; } @@ -1550,7 +1550,7 @@ remote_unpack_thread_info_response (char *pkt, threadref *expectedref, mask = mask & ~TAG_MOREDISPLAY; continue; } - warning ("ERROR RMT: unknown thread info tag\n"); + warning (_("ERROR RMT: unknown thread info tag.")); break; /* Not a tag we know about. */ } return retval; @@ -1650,14 +1650,14 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit, exit wait for packet, then exit */ - warning ("HMM: threadlist did not echo arg thread, dropping it\n"); + warning (_("HMM: threadlist did not echo arg thread, dropping it.")); return 0; /* I choose simply exiting. */ } if (*result_count <= 0) { if (*done != 1) { - warning ("RMT ERROR : failed to get remote thread list\n"); + warning (_("RMT ERROR : failed to get remote thread list.")); result = 0; } return result; /* break; */ @@ -1665,7 +1665,7 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit, if (*result_count > result_limit) { *result_count = 0; - warning ("RMT ERROR: threadlist response longer than requested\n"); + warning (_("RMT ERROR: threadlist response longer than requested.")); return 0; } return result; @@ -1702,7 +1702,7 @@ remote_threadlist_iterator (rmt_thread_action stepfunction, void *context, if (loopcount++ > looplimit) { result = 0; - warning ("Remote fetch threadlist -infinite loop-\n"); + warning (_("Remote fetch threadlist -infinite loop-.")); break; } if (!remote_get_threadlist (startflag, &nextthread, MAXTHREADLISTRESULTS, @@ -1786,7 +1786,7 @@ remote_threads_info (void) int tid; if (remote_desc == 0) /* paranoia */ - error ("Command can only be used when connected to the remote target."); + error (_("Command can only be used when connected to the remote target.")); if (use_threadinfo_query) { @@ -1943,7 +1943,7 @@ get_offsets (void) this command. */ if (buf[0] == 'E') { - warning ("Remote failure reply: %s", buf); + warning (_("Remote failure reply: %s"), buf); return; } @@ -1984,7 +1984,7 @@ get_offsets (void) lose = 1; if (lose) - error ("Malformed response to offset query, %s", buf); + error (_("Malformed response to offset query, %s"), buf); if (symfile_objfile == NULL) return; @@ -2140,9 +2140,9 @@ remote_serial_open (char *name) to be. */ if (!udp_warning && strncmp (name, "udp:", 4) == 0) { - warning ("The remote protocol may be unreliable over UDP."); - warning ("Some events may be lost, rendering further debugging " - "impossible."); + warning (_("\ +The remote protocol may be unreliable over UDP.\n\ +Some events may be lost, rendering further debugging impossible.")); udp_warning = 1; } @@ -2156,9 +2156,9 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target, struct exception ex; struct remote_state *rs = get_remote_state (); if (name == 0) - error ("To open a remote debug connection, you need to specify what\n" + error (_("To open a remote debug connection, you need to specify what\n" "serial device is attached to the remote system\n" - "(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.)."); + "(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).")); /* See FIXME above. */ if (!async_p) @@ -2303,7 +2303,7 @@ remote_detach (char *args, int from_tty) char *buf = alloca (rs->remote_packet_size); if (args) - error ("Argument given to \"detach\" when remotely debugging."); + error (_("Argument given to \"detach\" when remotely debugging.")); /* Tell the remote target to detach. */ strcpy (buf, "D"); @@ -2327,7 +2327,7 @@ remote_disconnect (char *args, int from_tty) char *buf = alloca (rs->remote_packet_size); if (args) - error ("Argument given to \"detach\" when remotely debugging."); + error (_("Argument given to \"detach\" when remotely debugging.")); /* Unregister the file descriptor from the event loop. */ if (target_is_async_p ()) @@ -2350,7 +2350,7 @@ fromhex (int a) else if (a >= 'A' && a <= 'F') return a - 'A' + 10; else - error ("Reply contains invalid hex digit %d", a); + error (_("Reply contains invalid hex digit %d"), a); } static int @@ -2835,7 +2835,7 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status) switch (buf[0]) { case 'E': /* Error of some sort. */ - warning ("Remote failure reply: %s", buf); + warning (_("Remote failure reply: %s"), buf); continue; case 'F': /* File-I/O request. */ remote_fileio_request (buf); @@ -2880,8 +2880,8 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status) { p1 = (unsigned char *) strchr (p, ':'); if (p1 == NULL) - warning ("Malformed packet(a) (missing colon): %s\n\ -Packet: '%s'\n", + warning (_("Malformed packet(a) (missing colon): %s\n\ +Packet: '%s'\n"), p, buf); if (strncmp (p, "thread", p1 - p) == 0) { @@ -2911,13 +2911,13 @@ Packet: '%s'\n", p = p1; if (*p++ != ':') - error ("Malformed packet(b) (missing colon): %s\n\ -Packet: '%s'\n", + error (_("Malformed packet(b) (missing colon): %s\n\ +Packet: '%s'\n"), p, buf); if (reg == NULL) - error ("Remote sent bad register number %s: %s\n\ -Packet: '%s'\n", + error (_("Remote sent bad register number %s: %s\n\ +Packet: '%s'\n"), phex_nz (pnum, 0), p, buf); fieldsize = hex2bin (p, regs, @@ -2926,13 +2926,13 @@ Packet: '%s'\n", p += 2 * fieldsize; if (fieldsize < register_size (current_gdbarch, reg->regnum)) - warning ("Remote reply is too short: %s", buf); + warning (_("Remote reply is too short: %s"), buf); regcache_raw_supply (current_regcache, reg->regnum, regs); } if (*p++ != ';') - error ("Remote register badly formatted: %s\nhere: %s", + error (_("Remote register badly formatted: %s\nhere: %s"), buf, p); } } @@ -2983,7 +2983,7 @@ Packet: '%s'\n", } /* else fallthrough */ default: - warning ("Invalid remote reply: %s", buf); + warning (_("Invalid remote reply: %s"), buf); continue; } } @@ -3031,7 +3031,7 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status) switch (buf[0]) { case 'E': /* Error of some sort. */ - warning ("Remote failure reply: %s", buf); + warning (_("Remote failure reply: %s"), buf); continue; case 'F': /* File-I/O request. */ remote_fileio_request (buf); @@ -3076,8 +3076,8 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status) { p1 = (unsigned char *) strchr (p, ':'); if (p1 == NULL) - error ("Malformed packet(a) (missing colon): %s\n\ -Packet: '%s'\n", + error (_("Malformed packet(a) (missing colon): %s\n\ +Packet: '%s'\n"), p, buf); if (strncmp (p, "thread", p1 - p) == 0) { @@ -3107,13 +3107,13 @@ Packet: '%s'\n", struct packet_reg *reg = packet_reg_from_pnum (rs, pnum); p = p1; if (*p++ != ':') - error ("Malformed packet(b) (missing colon): %s\n\ -Packet: '%s'\n", + error (_("Malformed packet(b) (missing colon): %s\n\ +Packet: '%s'\n"), p, buf); if (reg == NULL) - error ("Remote sent bad register number %ld: %s\n\ -Packet: '%s'\n", + error (_("Remote sent bad register number %ld: %s\n\ +Packet: '%s'\n"), pnum, p, buf); fieldsize = hex2bin (p, regs, @@ -3122,12 +3122,12 @@ Packet: '%s'\n", p += 2 * fieldsize; if (fieldsize < register_size (current_gdbarch, reg->regnum)) - warning ("Remote reply is too short: %s", buf); + warning (_("Remote reply is too short: %s"), buf); regcache_raw_supply (current_regcache, reg->regnum, regs); } if (*p++ != ';') - error ("Remote register badly formatted: %s\nhere: %s", + error (_("Remote register badly formatted: %s\nhere: %s"), buf, p); } } @@ -3181,7 +3181,7 @@ Packet: '%s'\n", } /* else fallthrough */ default: - warning ("Invalid remote reply: %s", buf); + warning (_("Invalid remote reply: %s"), buf); continue; } } @@ -3234,7 +3234,7 @@ fetch_register_using_p (int regnum) { if (p[1] == 0) { - error ("fetch_register_using_p: early buf termination"); + error (_("fetch_register_using_p: early buf termination")); return 0; } @@ -3273,7 +3273,7 @@ remote_fetch_registers (int regnum) if (fetch_register_using_p (regnum)) return; else - error ("Protocol error: p packet not recognized by stub"); + error (_("Protocol error: p packet not recognized by stub")); case PACKET_SUPPORT_UNKNOWN: if (fetch_register_using_p (regnum)) { @@ -3327,7 +3327,7 @@ remote_fetch_registers (int regnum) break; if (p[1] == 0) { - warning ("Remote reply is of odd length: %s", buf); + warning (_("Remote reply is of odd length: %s"), buf); /* Don't change register_bytes_found in this case, and don't print a second warning. */ goto supply_them; @@ -3344,7 +3344,7 @@ remote_fetch_registers (int regnum) register_bytes_found = i; if (REGISTER_BYTES_OK_P () && !REGISTER_BYTES_OK (i)) - warning ("Remote reply is too short: %s", buf); + warning (_("Remote reply is too short: %s"), buf); } supply_them: @@ -3451,7 +3451,7 @@ remote_store_registers (int regnum) if (store_register_using_P (regnum)) return; else - error ("Protocol error: P packet not recognized by stub"); + error (_("Protocol error: P packet not recognized by stub")); case PACKET_SUPPORT_UNKNOWN: if (store_register_using_P (regnum)) { @@ -3890,7 +3890,7 @@ readchar (int timeout) { case SERIAL_EOF: target_mourn_inferior (); - error ("Remote connection closed"); + error (_("Remote connection closed")); /* no return */ case SERIAL_ERROR: perror_with_name ("Remote communication error"); @@ -3912,7 +3912,7 @@ remote_send (char *buf, getpkt (buf, sizeof_buf, 0); if (buf[0] == 'E') - error ("Remote failure reply: %s", buf); + error (_("Remote failure reply: %s"), buf); } /* Display a null-terminated packet on stdout, for debugging, using C @@ -4254,7 +4254,7 @@ getpkt_sane (char *buf, { QUIT; target_mourn_inferior (); - error ("Watchdog has expired. Target detached.\n"); + error (_("Watchdog has expired. Target detached.")); } if (remote_debug) fputs_filtered ("Timed out.\n", gdb_stdlog); @@ -4589,7 +4589,7 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type) enum Z_packet_type packet = watchpoint_to_Z_packet (type); if (remote_protocol_Z[packet].support == PACKET_DISABLE) - error ("Can't set hardware watchpoints without the '%s' (%s) packet\n", + error (_("Can't set hardware watchpoints without the '%s' (%s) packet."), remote_protocol_Z[packet].name, remote_protocol_Z[packet].title); @@ -4624,7 +4624,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type) enum Z_packet_type packet = watchpoint_to_Z_packet (type); if (remote_protocol_Z[packet].support == PACKET_DISABLE) - error ("Can't clear hardware watchpoints without the '%s' (%s) packet\n", + error (_("Can't clear hardware watchpoints without the '%s' (%s) packet."), remote_protocol_Z[packet].name, remote_protocol_Z[packet].title); @@ -4715,7 +4715,7 @@ remote_insert_hw_breakpoint (CORE_ADDR addr, char *shadow) BREAKPOINT_FROM_PC (&addr, &len); if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE) - error ("Can't set hardware breakpoint without the '%s' (%s) packet\n", + error (_("Can't set hardware breakpoint without the '%s' (%s) packet."), remote_protocol_Z[Z_PACKET_HARDWARE_BP].name, remote_protocol_Z[Z_PACKET_HARDWARE_BP].title); @@ -4757,7 +4757,7 @@ remote_remove_hw_breakpoint (CORE_ADDR addr, char *shadow) BREAKPOINT_FROM_PC (&addr, &len); if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE) - error ("Can't clear hardware breakpoint without the '%s' (%s) packet\n", + error (_("Can't clear hardware breakpoint without the '%s' (%s) packet."), remote_protocol_Z[Z_PACKET_HARDWARE_BP].name, remote_protocol_Z[Z_PACKET_HARDWARE_BP].title); @@ -4861,10 +4861,10 @@ compare_sections_command (char *args, int from_tty) int mismatched = 0; if (!exec_bfd) - error ("command cannot be used without an exec file"); + error (_("command cannot be used without an exec file")); if (!current_target.to_shortname || strcmp (current_target.to_shortname, "remote") != 0) - error ("command can only be used with remote target"); + error (_("command can only be used with remote target")); for (s = exec_bfd->sections; s; s = s->next) { @@ -4894,10 +4894,10 @@ compare_sections_command (char *args, int from_tty) getpkt (buf, (rs->remote_packet_size), 0); if (buf[0] == 'E') - error ("target memory fault, section %s, range 0x%s -- 0x%s", + error (_("target memory fault, section %s, range 0x%s -- 0x%s"), sectname, paddr (lma), paddr (lma + size)); if (buf[0] != 'C') - error ("remote target does not support this operation"); + error (_("remote target does not support this operation")); for (target_crc = 0, tmp = &buf[1]; *tmp; tmp++) target_crc = target_crc * 16 + fromhex (*tmp); @@ -4915,8 +4915,8 @@ compare_sections_command (char *args, int from_tty) do_cleanups (old_chain); } if (mismatched > 0) - warning ("One or more sections of the remote executable does not match\n\ -the loaded file\n"); + warning (_("One or more sections of the remote executable does not match\n\ +the loaded file\n")); if (args && !matched) printf_filtered ("No loaded section named '%s'.\n", args); } @@ -5022,7 +5022,7 @@ remote_xfer_partial (struct target_ops *ops, enum target_object object, /* Except for querying the minimum buffer size, target must be open. */ if (!remote_desc) - error ("remote query is only available after target open"); + error (_("remote query is only available after target open")); gdb_assert (annex != NULL); gdb_assert (readbuf != NULL); @@ -5065,7 +5065,7 @@ remote_rcmd (char *command, char *p = buf; if (!remote_desc) - error ("remote rcmd is only available after target open"); + error (_("remote rcmd is only available after target open")); /* Send a NULL command across as an empty command. */ if (command == NULL) @@ -5076,13 +5076,13 @@ remote_rcmd (char *command, p = strchr (buf, '\0'); if ((strlen (buf) + strlen (command) * 2 + 8/*misc*/) > (rs->remote_packet_size)) - error ("\"monitor\" command ``%s'' is too long\n", command); + error (_("\"monitor\" command ``%s'' is too long."), command); /* Encode the actual command. */ bin2hex (command, p, 0); if (putpkt (buf) < 0) - error ("Communication problem with target\n"); + error (_("Communication problem with target.")); /* get/display the response */ while (1) @@ -5091,7 +5091,7 @@ remote_rcmd (char *command, buf[0] = '\0'; getpkt (buf, (rs->remote_packet_size), 0); if (buf[0] == '\0') - error ("Target does not support this command\n"); + error (_("Target does not support this command.")); if (buf[0] == 'O' && buf[1] != 'K') { remote_console_output (buf + 1); /* 'O' message from stub. */ @@ -5102,7 +5102,7 @@ remote_rcmd (char *command, if (strlen (buf) == 3 && buf[0] == 'E' && isdigit (buf[1]) && isdigit (buf[2])) { - error ("Protocol error with Rcmd"); + error (_("Protocol error with Rcmd")); } for (p = buf; p[0] != '\0' && p[1] != '\0'; p += 2) { @@ -5120,10 +5120,10 @@ packet_command (char *args, int from_tty) char *buf = alloca (rs->remote_packet_size); if (!remote_desc) - error ("command can only be used with remote target"); + error (_("command can only be used with remote target")); if (!args) - error ("remote-packet command requires packet text as argument"); + error (_("remote-packet command requires packet text as argument")); puts_filtered ("sending: "); print_packet (args); diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c index 01422a6..908e7fa 100644 --- a/gdb/rom68k-rom.c +++ b/gdb/rom68k-rom.c @@ -54,7 +54,7 @@ hex_digit_value (int a) else if (a >= 'A' && a <= 'F') return a - 'A' + 10; else - error ("Invalid hex digit %d", a); + error (_("Invalid hex digit %d"), a); } diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index d0f3ba5..88a6f0d 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -775,7 +775,7 @@ add_vmap (LdInfo *ldi) abfd = bfd_fdopenr (objname, gnutarget, fd); if (!abfd) { - warning ("Could not open `%s' as an executable file: %s", + warning (_("Could not open `%s' as an executable file: %s"), objname, bfd_errmsg (bfd_get_error ())); return NULL; } @@ -795,14 +795,14 @@ add_vmap (LdInfo *ldi) if (!last) { - warning ("\"%s\": member \"%s\" missing.", objname, mem); + warning (_("\"%s\": member \"%s\" missing."), objname, mem); bfd_close (abfd); return NULL; } if (!bfd_check_format (last, bfd_object)) { - warning ("\"%s\": member \"%s\" not in executable format: %s.", + warning (_("\"%s\": member \"%s\" not in executable format: %s."), objname, mem, bfd_errmsg (bfd_get_error ())); bfd_close (last); bfd_close (abfd); @@ -813,7 +813,7 @@ add_vmap (LdInfo *ldi) } else { - warning ("\"%s\": not in executable format: %s.", + warning (_("\"%s\": not in executable format: %s."), objname, bfd_errmsg (bfd_get_error ())); bfd_close (abfd); return NULL; @@ -857,7 +857,7 @@ vmap_ldinfo (LdInfo *ldi) /* The kernel sets ld_info to -1, if the process is still using the object, and the object is removed. Keep the symbol info for the removed object and issue a warning. */ - warning ("%s (fd=%d) has disappeared, keeping its symbols", + warning (_("%s (fd=%d) has disappeared, keeping its symbols"), name, fd); continue; } @@ -886,7 +886,7 @@ vmap_ldinfo (LdInfo *ldi) || objfile->obfd == NULL || bfd_stat (objfile->obfd, &vi) < 0) { - warning ("Unable to stat %s, keeping its symbols", name); + warning (_("Unable to stat %s, keeping its symbols"), name); continue; } @@ -934,11 +934,11 @@ vmap_ldinfo (LdInfo *ldi) running a different copy of the same executable. */ if (symfile_objfile != NULL && !got_exec_file) { - warning ("Symbol file %s\nis not mapped; discarding it.\n\ + warning (_("Symbol file %s\nis not mapped; discarding it.\n\ If in fact that file has symbols which the mapped files listed by\n\ \"info files\" lack, you can load symbols with the \"symbol-file\" or\n\ \"add-symbol-file\" commands (note that you must take care of relocating\n\ -symbols to the proper address).", +symbols to the proper address)."), symfile_objfile->name); free_objfile (symfile_objfile); symfile_objfile = NULL; @@ -968,7 +968,7 @@ vmap_exec (void) execbfd = exec_bfd; if (!vmap || !exec_ops.to_sections) - error ("vmap_exec: vmap or exec_ops.to_sections == 0\n"); + error (_("vmap_exec: vmap or exec_ops.to_sections == 0.")); for (i = 0; &exec_ops.to_sections[i] < exec_ops.to_sections_end; i++) { @@ -1229,7 +1229,7 @@ find_toc_address (CORE_ADDR pc) : vp->objfile); } } - error ("Unable to find TOC entry for pc %s\n", hex_string (pc)); + error (_("Unable to find TOC entry for pc %s."), hex_string (pc)); } /* Register that we are able to handle rs6000 core file formats. */ diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index b09abae..3e57b71 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -201,7 +201,7 @@ s390_dwarf_reg_to_regnum (int reg) regnum = s390_dwarf_regmap[reg]; if (regnum == -1) - warning ("Unmapped DWARF Register #%d encountered\n", reg); + warning (_("Unmapped DWARF Register #%d encountered."), reg); return regnum; } @@ -2733,7 +2733,7 @@ s390_return_value (struct gdbarch *gdbarch, struct type *type, break; case RETURN_VALUE_STRUCT_CONVENTION: - error ("Cannot set function return value."); + error (_("Cannot set function return value.")); break; } } @@ -2766,7 +2766,7 @@ s390_return_value (struct gdbarch *gdbarch, struct type *type, break; case RETURN_VALUE_STRUCT_CONVENTION: - error ("Function return value unknown."); + error (_("Function return value unknown.")); break; } } diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c index 71f2d2d..ebdaa47 100644 --- a/gdb/scm-lang.c +++ b/gdb/scm-lang.c @@ -117,7 +117,7 @@ scm_unpack (struct type *type, const char *valaddr, enum type_code context) return 1; } } - error ("Value can't be converted to integer."); + error (_("Value can't be converted to integer.")); default: return svalue; } @@ -180,7 +180,7 @@ scm_lookup_name (char *str) (struct symtab **) NULL); if (sym) return value_of_variable (sym, NULL); - error ("No symbol \"%s\" in current context.", str); + error (_("No symbol \"%s\" in current context."), str); } struct value * diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c index 1efe142..474e111 100644 --- a/gdb/ser-e7kpc.c +++ b/gdb/ser-e7kpc.c @@ -164,16 +164,16 @@ e7000pc_init (void) sigs[try].addr); return 1; } - error ("The E7000 PC board is working, but the E7000 is turned off.\n"); + error (_("The E7000 PC board is working, but the E7000 is turned off.")); return 0; } } - error ("GDB cannot connect to the E7000 PC board, check that it is installed\n\ + error (_("GDB cannot connect to the E7000 PC board, check that it is installed\n\ and that the switch settings are correct. Some other DOS programs can \n\ stop the board from working. Try starting from a very minimal boot, \n\ perhaps you need to disable EMM386 over the region where the board has\n\ -its I/O space, remove other unneeded cards, etc etc\n"); +its I/O space, remove other unneeded cards, etc etc\n")); return 0; } diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 632ea1c..2009191 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -74,7 +74,7 @@ net_open (struct serial *scb, const char *name) port_str = strchr (name, ':'); if (!port_str) - error ("net_open: No colon in host name!"); /* Shouldn't ever happen */ + error (_("net_open: No colon in host name!")); /* Shouldn't ever happen */ tmp = min (port_str - name, (int) sizeof hostname - 1); strncpy (hostname, name, tmp); /* Don't want colon */ diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index cf77be0..bc91894 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -758,12 +758,12 @@ rate_to_code (int rate) { if (i) { - warning ("Invalid baud rate %d. Closest values are %d and %d.", + warning (_("Invalid baud rate %d. Closest values are %d and %d."), rate, baudtab[i - 1].rate, baudtab[i].rate); } else { - warning ("Invalid baud rate %d. Minimum value is %d.", + warning (_("Invalid baud rate %d. Minimum value is %d."), rate, baudtab[0].rate); } return -1; @@ -772,7 +772,7 @@ rate_to_code (int rate) } /* The requested speed was too large. */ - warning ("Invalid baud rate %d. Maximum value is %d.", + warning (_("Invalid baud rate %d. Maximum value is %d."), rate, baudtab[i - 1].rate); return -1; } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index a10dbbd..4da61fc 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1216,7 +1216,7 @@ sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache, regcache_raw_read (regcache, regnum++, (char *) valbuf + i); } else - error ("bad size for return value"); + error (_("bad size for return value")); } static void @@ -1865,7 +1865,7 @@ sh_register_convert_to_raw (struct type *type, int regnum, &val, to); } else - error ("sh_register_convert_to_raw called with non DR register number"); + error (_("sh_register_convert_to_raw called with non DR register number")); } /* For vectors of 4 floating point registers. */ @@ -2035,7 +2035,7 @@ sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum) /* Get the data in raw format. */ if (!frame_register_read (get_selected_frame (NULL), regnum, raw_buffer)) - error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum)); + error (_("can't read register %d (%s)"), regnum, REGISTER_NAME (regnum)); /* Get the register as a number */ flt = unpack_double (builtin_type_float, raw_buffer, &inv); @@ -2112,7 +2112,7 @@ sh_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, if (regnum != -1) /* do one specified register */ { if (*(REGISTER_NAME (regnum)) == '\0') - error ("Not a valid register for the current processor type"); + error (_("Not a valid register for the current processor type")); sh_print_register (gdbarch, file, regnum); } diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c index 327e76a..3a01e25 100644 --- a/gdb/sh3-rom.c +++ b/gdb/sh3-rom.c @@ -288,7 +288,7 @@ sh3_open (char *args, int from_tty) gdbarch_info_init (&info); info.bfd_arch_info = bfd_lookup_arch (bfd_arch_sh, bfd_mach_sh3); if (!gdbarch_update_p (info)) - error ("Target is not an SH3"); + error (_("Target is not an SH3")); } } @@ -341,7 +341,7 @@ sh3e_open (char *args, int from_tty) gdbarch_info_init (&info); info.bfd_arch_info = bfd_lookup_arch (bfd_arch_sh, bfd_mach_sh3); if (!gdbarch_update_p (info)) - error ("Target is not an SH3"); + error (_("Target is not an SH3")); } } diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c index 9c94910..f7482ce 100644 --- a/gdb/shnbsd-tdep.c +++ b/gdb/shnbsd-tdep.c @@ -123,7 +123,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, if (core_reg_size < SIZEOF_STRUCT_REG) { - warning ("Wrong size register set in core file."); + warning (_("Wrong size register set in core file.")); return; } @@ -139,7 +139,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 register set in core file."); + warning (_("Wrong size register set in core file.")); else shnbsd_supply_reg (core_reg_sect, -1); break; diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index 820317b..18d24e7 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -273,19 +273,19 @@ thread_to_lwp (ptid_t thread_id, int default_lwp) if (val == TD_NOTHR) return pid_to_ptid (-1); /* Thread must have terminated. */ else if (val != TD_OK) - error ("thread_to_lwp: td_ta_map_id2thr %s", td_err_string (val)); + error (_("thread_to_lwp: td_ta_map_id2thr %s"), td_err_string (val)); val = p_td_thr_get_info (&th, &ti); if (val == TD_NOTHR) return pid_to_ptid (-1); /* Thread must have terminated. */ else if (val != TD_OK) - error ("thread_to_lwp: td_thr_get_info: %s", td_err_string (val)); + error (_("thread_to_lwp: td_thr_get_info: %s"), td_err_string (val)); if (ti.ti_state != TD_THR_ACTIVE) { if (default_lwp != -1) return pid_to_ptid (default_lwp); - error ("thread_to_lwp: thread state not active: %s", + error (_("thread_to_lwp: thread state not active: %s"), td_state_string (ti.ti_state)); } @@ -316,19 +316,19 @@ lwp_to_thread (ptid_t lwp) if (val == TD_NOTHR) return pid_to_ptid (-1); /* Thread must have terminated. */ else if (val != TD_OK) - error ("lwp_to_thread: td_ta_map_lwp2thr: %s.", td_err_string (val)); + error (_("lwp_to_thread: td_ta_map_lwp2thr: %s."), td_err_string (val)); val = p_td_thr_validate (&th); if (val == TD_NOTHR) return lwp; /* Unknown to libthread; just return LPW, */ else if (val != TD_OK) - error ("lwp_to_thread: td_thr_validate: %s.", td_err_string (val)); + error (_("lwp_to_thread: td_thr_validate: %s."), td_err_string (val)); val = p_td_thr_get_info (&th, &ti); if (val == TD_NOTHR) return pid_to_ptid (-1); /* Thread must have terminated. */ else if (val != TD_OK) - error ("lwp_to_thread: td_thr_get_info: %s.", td_err_string (val)); + error (_("lwp_to_thread: td_thr_get_info: %s."), td_err_string (val)); return BUILD_THREAD (ti.ti_tid, PIDGET (lwp)); } @@ -408,9 +408,9 @@ sol_thread_resume (ptid_t ptid, int step, enum target_signal signo) ptid = thread_to_lwp (ptid, -2); if (PIDGET (ptid) == -2) /* Inactive thread. */ - error ("This version of Solaris can't start inactive threads."); + error (_("This version of Solaris can't start inactive threads.")); if (info_verbose && PIDGET (ptid) == -1) - warning ("Specified thread %ld seems to have terminated", + warning (_("Specified thread %ld seems to have terminated"), GET_THREAD (save_ptid)); } @@ -442,9 +442,9 @@ sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus) ptid = thread_to_lwp (ptid, -2); if (PIDGET (ptid) == -2) /* Inactive thread. */ - error ("This version of Solaris can't start inactive threads."); + error (_("This version of Solaris can't start inactive threads.")); if (info_verbose && PIDGET (ptid) == -1) - warning ("Specified thread %ld seems to have terminated", + warning (_("Specified thread %ld seems to have terminated"), GET_THREAD (save_ptid)); } @@ -502,18 +502,18 @@ sol_thread_fetch_registers (int regnum) /* Solaris thread: convert INFERIOR_PTID into a td_thrhandle_t. */ thread = GET_THREAD (inferior_ptid); if (thread == 0) - error ("sol_thread_fetch_registers: thread == 0"); + error (_("sol_thread_fetch_registers: thread == 0")); val = p_td_ta_map_id2thr (main_ta, thread, &thandle); if (val != TD_OK) - error ("sol_thread_fetch_registers: td_ta_map_id2thr: %s", + error (_("sol_thread_fetch_registers: td_ta_map_id2thr: %s"), td_err_string (val)); /* Get the general-purpose registers. */ val = p_td_thr_getgregs (&thandle, gregset); if (val != TD_OK && val != TD_PARTIALREG) - error ("sol_thread_fetch_registers: td_thr_getgregs %s", + error (_("sol_thread_fetch_registers: td_thr_getgregs %s"), td_err_string (val)); /* For SPARC, TD_PARTIALREG means that only %i0...%i7, %l0..%l7, %pc @@ -523,7 +523,7 @@ sol_thread_fetch_registers (int regnum) val = p_td_thr_getfpregs (&thandle, &fpregset); if (val != TD_OK && val != TD_NOFPREGS) - error ("sol_thread_fetch_registers: td_thr_getfpregs %s", + error (_("sol_thread_fetch_registers: td_thr_getfpregs %s"), td_err_string (val)); /* Note that we must call supply_gregset and supply_fpregset *after* @@ -537,7 +537,7 @@ sol_thread_fetch_registers (int regnum) /* FIXME: libthread_db doesn't seem to handle this right. */ val = td_thr_getxregsize (&thandle, &xregsize); if (val != TD_OK && val != TD_NOXREGS) - error ("sol_thread_fetch_registers: td_thr_getxregsize %s", + error (_("sol_thread_fetch_registers: td_thr_getxregsize %s"), td_err_string (val)); if (val == TD_OK) @@ -545,7 +545,7 @@ sol_thread_fetch_registers (int regnum) xregset = alloca (xregsize); val = td_thr_getxregs (&thandle, xregset); if (val != TD_OK) - error ("sol_thread_fetch_registers: td_thr_getxregs %s", + error (_("sol_thread_fetch_registers: td_thr_getxregs %s"), td_err_string (val)); } #endif @@ -576,7 +576,7 @@ sol_thread_store_registers (int regnum) val = p_td_ta_map_id2thr (main_ta, thread, &thandle); if (val != TD_OK) - error ("sol_thread_store_registers: td_ta_map_id2thr %s", + error (_("sol_thread_store_registers: td_ta_map_id2thr %s"), td_err_string (val)); if (regnum != -1) @@ -589,11 +589,11 @@ sol_thread_store_registers (int regnum) val = p_td_thr_getgregs (&thandle, gregset); if (val != TD_OK) - error ("sol_thread_store_registers: td_thr_getgregs %s", + error (_("sol_thread_store_registers: td_thr_getgregs %s"), td_err_string (val)); val = p_td_thr_getfpregs (&thandle, &fpregset); if (val != TD_OK) - error ("sol_thread_store_registers: td_thr_getfpregs %s", + error (_("sol_thread_store_registers: td_thr_getfpregs %s"), td_err_string (val)); /* Restore new register value. */ @@ -603,7 +603,7 @@ sol_thread_store_registers (int regnum) /* FIXME: libthread_db doesn't seem to handle this right. */ val = td_thr_getxregsize (&thandle, &xregsize); if (val != TD_OK && val != TD_NOXREGS) - error ("sol_thread_store_registers: td_thr_getxregsize %s", + error (_("sol_thread_store_registers: td_thr_getxregsize %s"), td_err_string (val)); if (val == TD_OK) @@ -611,7 +611,7 @@ sol_thread_store_registers (int regnum) xregset = alloca (xregsize); val = td_thr_getxregs (&thandle, xregset); if (val != TD_OK) - error ("sol_thread_store_registers: td_thr_getxregs %s", + error (_("sol_thread_store_registers: td_thr_getxregs %s"), td_err_string (val)); } #endif @@ -622,18 +622,18 @@ sol_thread_store_registers (int regnum) val = p_td_thr_setgregs (&thandle, gregset); if (val != TD_OK) - error ("sol_thread_store_registers: td_thr_setgregs %s", + error (_("sol_thread_store_registers: td_thr_setgregs %s"), td_err_string (val)); val = p_td_thr_setfpregs (&thandle, &fpregset); if (val != TD_OK) - error ("sol_thread_store_registers: td_thr_setfpregs %s", + error (_("sol_thread_store_registers: td_thr_setfpregs %s"), td_err_string (val)); #if 0 /* FIXME: libthread_db doesn't seem to handle this right. */ val = td_thr_getxregsize (&thandle, &xregsize); if (val != TD_OK && val != TD_NOXREGS) - error ("sol_thread_store_registers: td_thr_getxregsize %s", + error (_("sol_thread_store_registers: td_thr_getxregsize %s"), td_err_string (val)); /* ??? Should probably do something about writing the xregs here, @@ -807,7 +807,7 @@ sol_thread_new_objfile (struct objfile *objfile) val = p_td_init (); if (val != TD_OK) { - warning ("sol_thread_new_objfile: td_init: %s", td_err_string (val)); + warning (_("sol_thread_new_objfile: td_init: %s"), td_err_string (val)); goto quit; } @@ -816,7 +816,7 @@ sol_thread_new_objfile (struct objfile *objfile) goto quit; else if (val != TD_OK) { - warning ("sol_thread_new_objfile: td_ta_new: %s", td_err_string (val)); + warning (_("sol_thread_new_objfile: td_ta_new: %s"), td_err_string (val)); goto quit; } @@ -1034,10 +1034,10 @@ rw_common (int dowrite, const struct ps_prochandle *ph, gdb_ps_addr_t addr, else if (cc == 0) { if (dowrite == 0) - warning ("rw_common (): unable to read at addr 0x%lx", + warning (_("rw_common (): unable to read at addr 0x%lx"), (long) addr); else - warning ("rw_common (): unable to write at addr 0x%lx", + warning (_("rw_common (): unable to write at addr 0x%lx"), (long) addr); do_cleanups (old_chain); @@ -1491,7 +1491,7 @@ info_cb (const td_thrhandle_t *th, void *s) printf_filtered ("\n"); /* don't you hate counting newlines? */ } else - warning ("info sol-thread: failed to get info for thread."); + warning (_("info sol-thread: failed to get info for thread.")); return 0; } diff --git a/gdb/solib-aix5.c b/gdb/solib-aix5.c index 3532be4..3c69183 100644 --- a/gdb/solib-aix5.c +++ b/gdb/solib-aix5.c @@ -335,7 +335,7 @@ open_symbol_file_object (void *from_ttyp) if (sos == NULL) { - warning ("Could not find name of main executable in map file"); + warning (_("Could not find name of main executable in map file")); return 0; } @@ -480,7 +480,7 @@ enable_break (void) /* Make sure the dynamic linker's really a useful object. */ if (!bfd_check_format (tmp_bfd, bfd_object)) { - warning ("Unable to grok dynamic linker %s as an object file", buf); + warning (_("Unable to grok dynamic linker %s as an object file"), buf); bfd_close (tmp_bfd); goto bkpt_at_symbol; } @@ -529,7 +529,7 @@ enable_break (void) /* For whatever reason we couldn't set a breakpoint in the dynamic linker. Warn and drop into the old code. */ bkpt_at_symbol: - warning ("Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code."); + warning (_("Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code.")); } /* Nothing good happened. */ @@ -684,7 +684,7 @@ map_index_vs_section_name_okay (int idx, const char *name) return idx == okay[i].idx; } - warning ("solib-aix5.c: Ignoring section %s when relocating the executable\n", + warning (_("Ignoring section %s when relocating the executable."), name); return 0; } @@ -707,7 +707,7 @@ aix5_relocate_main_executable (void) /* Make sure we actually have some mappings to work with. */ if (so == NULL) { - warning ("Could not find main executable in map file"); + warning (_("Could not find main executable in map file")); do_cleanups (old_chain); return; } @@ -798,7 +798,7 @@ aix5_solib_create_inferior_hook (void) if (!enable_break ()) { - warning ("shared library handler failed to enable breakpoint"); + warning (_("shared library handler failed to enable breakpoint")); return; } } @@ -908,7 +908,7 @@ aix5_find_gate_addresses (CORE_ADDR *start, CORE_ADDR *end) /* Make sure we actually have some mappings to work with. */ if (so == NULL) { - warning ("Could not find gate page in map file"); + warning (_("Could not find gate page in map file")); *start = 0; *end = 0; do_cleanups (old_chain); diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index a102573..6b2995c 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -435,7 +435,7 @@ frv_current_sos (void) if (target_read_memory (lm_addr, (char *) &lm_buf, sizeof (lm_buf)) != 0) { - warning ("frv_current_sos: Unable to read link map entry. Shared object chain may be incomplete."); + warning (_("frv_current_sos: Unable to read link map entry. Shared object chain may be incomplete.")); break; } @@ -459,7 +459,7 @@ frv_current_sos (void) loadmap = fetch_loadmap (addr); if (loadmap == NULL) { - warning ("frv_current_sos: Unable to fetch load map. Shared object chain may be incomplete."); + warning (_("frv_current_sos: Unable to fetch load map. Shared object chain may be incomplete.")); break; } @@ -478,10 +478,8 @@ frv_current_sos (void) name_buf); if (errcode != 0) - { - warning ("frv_current_sos: Can't read pathname for link map entry: %s\n", - safe_strerror (errcode)); - } + warning (_("Can't read pathname for link map entry: %s."), + safe_strerror (errcode)); else { strncpy (sop->so_name, name_buf, SO_NAME_MAX_PATH_SIZE - 1); @@ -546,9 +544,9 @@ displacement_from_map (struct int_elf32_fdpic_loadmap *map, static void enable_break_failure_warning (void) { - warning ("Unable to find dynamic linker breakpoint function.\n" + warning (_("Unable to find dynamic linker breakpoint function.\n" "GDB will be unable to debug shared library initializers\n" - "and track explicitly loaded dynamic code."); + "and track explicitly loaded dynamic code.")); } /* @@ -651,7 +649,7 @@ enable_break2 (void) /* Make sure the dynamic linker is really a useful object. */ if (!bfd_check_format (tmp_bfd, bfd_object)) { - warning ("Unable to grok dynamic linker %s as an object file", buf); + warning (_("Unable to grok dynamic linker %s as an object file"), buf); enable_break_failure_warning (); bfd_close (tmp_bfd); return 0; @@ -661,7 +659,7 @@ enable_break2 (void) &interp_loadmap_addr, 0); if (status < 0) { - warning ("Unable to determine dynamic linker loadmap address\n"); + warning (_("Unable to determine dynamic linker loadmap address.")); enable_break_failure_warning (); bfd_close (tmp_bfd); return 0; @@ -675,7 +673,7 @@ enable_break2 (void) ldm = fetch_loadmap (interp_loadmap_addr); if (ldm == NULL) { - warning ("Unable to load dynamic linker loadmap at address %s\n", + warning (_("Unable to load dynamic linker loadmap at address %s."), hex_string_custom (interp_loadmap_addr, 8)); enable_break_failure_warning (); bfd_close (tmp_bfd); @@ -708,7 +706,7 @@ enable_break2 (void) addr = bfd_lookup_symbol (tmp_bfd, "_dl_debug_addr"); if (addr == 0) { - warning ("Could not find symbol _dl_debug_addr in dynamic linker"); + warning (_("Could not find symbol _dl_debug_addr in dynamic linker")); enable_break_failure_warning (); bfd_close (tmp_bfd); return 0; @@ -729,7 +727,7 @@ enable_break2 (void) /* Fetch the address of the r_debug struct. */ if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0) { - warning ("Unable to fetch contents of _dl_debug_addr (at address %s) from dynamic linker", + warning (_("Unable to fetch contents of _dl_debug_addr (at address %s) from dynamic linker"), hex_string_custom (addr, 8)); } addr = extract_unsigned_integer (addr_buf, sizeof addr_buf); @@ -738,7 +736,7 @@ enable_break2 (void) _dl_debug_addr. */ if (target_read_memory (addr + 8, addr_buf, sizeof addr_buf) != 0) { - warning ("Unable to fetch _dl_debug_addr->r_brk (at address %s) from dynamic linker", + warning (_("Unable to fetch _dl_debug_addr->r_brk (at address %s) from dynamic linker"), hex_string_custom (addr + 8, 8)); enable_break_failure_warning (); bfd_close (tmp_bfd); @@ -749,7 +747,7 @@ enable_break2 (void) /* Now fetch the function entry point. */ if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0) { - warning ("Unable to fetch _dl_debug_addr->.r_brk entry point (at address %s) from dynamic linker", + warning (_("Unable to fetch _dl_debug_addr->.r_brk entry point (at address %s) from dynamic linker"), hex_string_custom (addr, 8)); enable_break_failure_warning (); bfd_close (tmp_bfd); @@ -857,7 +855,7 @@ frv_relocate_main_executable (void) /* Fetch the loadmap located at ``exec_addr''. */ ldm = fetch_loadmap (exec_addr); if (ldm == NULL) - error ("Unable to load the executable's loadmap."); + error (_("Unable to load the executable's loadmap.")); if (main_executable_lm_info) xfree (main_executable_lm_info); @@ -940,7 +938,7 @@ frv_solib_create_inferior_hook (void) /* Enable shared library breakpoints. */ if (!enable_break ()) { - warning ("shared library handler failed to enable breakpoint"); + warning (_("shared library handler failed to enable breakpoint")); return; } } diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c index f84a54a..34cedbe 100644 --- a/gdb/solib-irix.c +++ b/gdb/solib-irix.c @@ -218,7 +218,7 @@ fetch_lm_info (CORE_ADDR addr) } else { - error ("Unable to fetch shared library obj_info or obj_list info."); + error (_("Unable to fetch shared library obj_info or obj_list info.")); } return li; @@ -420,7 +420,7 @@ irix_solib_create_inferior_hook (void) { if (!enable_break ()) { - warning ("shared library handler failed to enable breakpoint"); + warning (_("shared library handler failed to enable breakpoint")); return; } @@ -446,7 +446,7 @@ irix_solib_create_inferior_hook (void) if (!disable_break ()) { - warning ("shared library handler failed to disable breakpoint"); + warning (_("shared library handler failed to disable breakpoint")); } /* solib_add will call reinit_frame_cache. @@ -539,10 +539,8 @@ irix_current_sos (void) target_read_string (lm.pathname_addr, &name_buf, name_size, &errcode); if (errcode != 0) - { - warning ("current_sos: Can't read pathname for load map: %s\n", + warning (_("Can't read pathname for load map: %s."), safe_strerror (errcode)); - } else { strncpy (new->so_name, name_buf, name_size); @@ -621,7 +619,7 @@ irix_open_symbol_file_object (void *from_ttyp) if (errcode) { - warning ("failed to read exec filename from attached file: %s", + warning (_("failed to read exec filename from attached file: %s"), safe_strerror (errcode)); return 0; } diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c index a4c1406..c7d1267 100644 --- a/gdb/solib-osf.c +++ b/gdb/solib-osf.c @@ -220,7 +220,7 @@ fetch_sec_names (struct lm_info *lmi) target_read_string (lms->nameaddr, &name, PATH_MAX, &errcode); if (errcode != 0) { - warning ("unable to read shared sec name at 0x%lx", lms->nameaddr); + warning (_("unable to read shared sec name at 0x%lx"), lms->nameaddr); name = xstrdup (""); } lms->name = name; diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c index f18c992..fb6ad25 100644 --- a/gdb/solib-pa64.c +++ b/gdb/solib-pa64.c @@ -139,7 +139,7 @@ read_dld_descriptor (void) if (!dld_cache.is_valid) { if (symfile_objfile == NULL) - error ("No object file symbols."); + error (_("No object file symbols.")); dyninfo_sect = bfd_get_section_by_name (symfile_objfile->obfd, ".dynamic"); @@ -149,7 +149,7 @@ read_dld_descriptor (void) } if (!read_dynamic_info (dyninfo_sect, &dld_cache)) - error ("Unable to read in .dynamic section information."); + error (_("Unable to read in .dynamic section information.")); } /* Read the load map pointer. */ @@ -158,7 +158,7 @@ read_dld_descriptor (void) sizeof (dld_cache.load_map)) != 0) { - error ("Error while reading in load map pointer."); + error (_("Error while reading in load map pointer.")); } /* Read in the dld load module descriptor */ @@ -170,7 +170,7 @@ read_dld_descriptor (void) dld_cache.load_map) == 0) { - error ("Error trying to get information about dynamic linker."); + error (_("Error trying to get information about dynamic linker.")); } /* Indicate that we have loaded the dld descriptor. */ @@ -228,7 +228,7 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p) sizeof (dld_cache_p->dld_flags)) != 0) { - error ("Error while reading in .dynamic section of the program."); + error (_("Error while reading in .dynamic section of the program.")); } } else if (dyn_tag == DT_HP_LOAD_MAP) @@ -241,7 +241,7 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p) sizeof (dld_cache_p->load_map_addr)) != 0) { - error ("Error while reading in .dynamic section of the program."); + error (_("Error while reading in .dynamic section of the program.")); } } else @@ -355,7 +355,7 @@ pa64_solib_create_inferior_hook (void) /* Read in the .dynamic section. */ if (! read_dynamic_info (shlib_info, &dld_cache)) - error ("Unable to read the .dynamic section."); + error (_("Unable to read the .dynamic section.")); /* Turn on the flags we care about. */ dld_cache.dld_flags |= DT_HP_DEBUG_PRIVATE; @@ -364,7 +364,7 @@ pa64_solib_create_inferior_hook (void) (char *) &dld_cache.dld_flags, sizeof (dld_cache.dld_flags)); if (status != 0) - error ("Unable to modify dynamic linker flags."); + error (_("Unable to modify dynamic linker flags.")); /* Now we have to create a shared library breakpoint in the dynamic linker. This can be somewhat tricky since the symbol is inside @@ -401,7 +401,7 @@ pa64_solib_create_inferior_hook (void) /* Make sure the dynamic linker's really a useful object. */ if (!bfd_check_format (tmp_bfd, bfd_object)) { - warning ("Unable to grok dynamic linker %s as an object file", buf); + warning (_("Unable to grok dynamic linker %s as an object file"), buf); bfd_close (tmp_bfd); return; } @@ -453,9 +453,9 @@ pa64_current_sos (void) /* If the libraries were not mapped private, warn the user. */ if ((dld_cache.dld_flags & DT_HP_DEBUG_PRIVATE) == 0) - warning ("The shared libraries were not privately mapped; setting a\n" + warning (_("The shared libraries were not privately mapped; setting a\n" "breakpoint in a shared library will not work until you rerun " - "the program.\n"); + "the program.\n")); for (dll_index = -1; ; dll_index++) { @@ -682,6 +682,6 @@ void pa64_solib_select (struct gdbarch_tdep *tdep) { /* For a SOM-only target, there is no pa64 solib support. This is needed for hppa-hpux-tdep.c to build. */ - error ("Cannot select pa64 solib support for this configuration.\n"); + error (_("Cannot select pa64 solib support for this configuration.")); } #endif diff --git a/gdb/solib-som.c b/gdb/solib-som.c index 758bc3c..73d2eb0 100644 --- a/gdb/solib-som.c +++ b/gdb/solib-som.c @@ -195,9 +195,10 @@ som_solib_create_inferior_hook (void) status = target_write_memory (anaddr, buf, 4); if (status != 0) { - warning ("Unable to write __d_pid"); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("\ +Unable to write __d_pid.\n\ +Suggest linking with /opt/langtools/lib/end.o.\n\ +GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } @@ -215,9 +216,10 @@ som_solib_create_inferior_hook (void) msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find _DLD_HOOK symbol in object file."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("\ +Unable to find _DLD_HOOK symbol in object file.\n\ +Suggest linking with /opt/langtools/lib/end.o.\n\ +GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -237,9 +239,10 @@ som_solib_create_inferior_hook (void) msymbol = lookup_minimal_symbol ("__dld_hook", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find __dld_hook symbol in object file."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("\ +Unable to find __dld_hook symbol in object file.\n\ +Suggest linking with /opt/langtools/lib/end.o.\n\ +GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -250,9 +253,10 @@ som_solib_create_inferior_hook (void) msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find __dld_d_trap symbol in object file."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_(\ +Unable to find __dld_d_trap symbol in object file.\n\ +Suggest linking with /opt/langtools/lib/end.o.\n\ +GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } create_solib_event_breakpoint (SYMBOL_VALUE_ADDRESS (msymbol)); @@ -268,7 +272,7 @@ keep_going: msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL); if (msymbol == NULL) { - error ("Unable to find __dld_flags symbol in object file.\n"); + error (_("Unable to find __dld_flags symbol in object file.")); } anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -276,9 +280,7 @@ keep_going: /* Read the current contents. */ status = target_read_memory (anaddr, buf, 4); if (status != 0) - { - error ("Unable to read __dld_flags\n"); - } + error (_("Unable to read __dld_flags.")); dld_flags = extract_unsigned_integer (buf, 4); /* Turn on the flags we care about. */ @@ -288,9 +290,7 @@ keep_going: store_unsigned_integer (buf, 4, dld_flags); status = target_write_memory (anaddr, buf, 4); if (status != 0) - { - error ("Unable to write __dld_flags\n"); - } + error (_("Unable to write __dld_flags.")); /* Now find the address of _start and set a breakpoint there. We still need this code for two reasons: @@ -303,9 +303,7 @@ keep_going: msymbol = lookup_minimal_symbol ("_start", NULL, symfile_objfile); if (msymbol == NULL) - { - error ("Unable to find _start symbol in object file.\n"); - } + error (_("Unable to find _start symbol in object file.")); anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -534,24 +532,18 @@ link_map_start (void) sym = lookup_minimal_symbol ("__dld_flags", NULL, NULL); if (!sym) - { - error ("Unable to find __dld_flags symbol in object file.\n"); - return 0; - } + error (_("Unable to find __dld_flags symbol in object file.")); addr = SYMBOL_VALUE_ADDRESS (sym); read_memory (addr, buf, 4); dld_flags = extract_unsigned_integer (buf, 4); if ((dld_flags & DLD_FLAGS_LISTVALID) == 0) - { - error ("__dld_list is not valid according to __dld_flags.\n"); - return 0; - } + error (_("__dld_list is not valid according to __dld_flags.")); /* If the libraries were not mapped private, warn the user. */ if ((dld_flags & DLD_FLAGS_MAPPRIVATE) == 0) - warning ("The shared libraries were not privately mapped; setting a\n" + warning (_("The shared libraries were not privately mapped; setting a\n" "breakpoint in a shared library will not work until you rerun the " - "program.\n"); + "program.\n")); sym = lookup_minimal_symbol ("__dld_list", NULL, NULL); if (!sym) @@ -561,7 +553,7 @@ link_map_start (void) sym = lookup_minimal_symbol ("__dld_flags", NULL, NULL); if (!sym) { - error ("Unable to find dynamic library list.\n"); + error (_("Unable to find dynamic library list.")); return 0; } addr = SYMBOL_VALUE_ADDRESS (sym) - 8; @@ -572,10 +564,7 @@ link_map_start (void) read_memory (addr, buf, 4); addr = extract_unsigned_integer (buf, 4); if (addr == 0) - { - error ("Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.\n"); - return 0; - } + error (_("Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.")); read_memory (addr, buf, 4); return extract_unsigned_integer (buf, 4); @@ -617,10 +606,8 @@ som_current_sos (void) addr = extract_unsigned_integer (&dbuf.name, sizeof (dbuf.name)); target_read_string (addr, &namebuf, SO_NAME_MAX_PATH_SIZE - 1, &errcode); if (errcode != 0) - { - warning ("current_sos: Can't read pathname for load map: %s\n", - safe_strerror (errcode)); - } + warning (_("Can't read pathname for load map: %s."), + safe_strerror (errcode)); else { strncpy (new->so_name, namebuf, SO_NAME_MAX_PATH_SIZE - 1); @@ -732,7 +719,7 @@ som_open_symbol_file_object (void *from_ttyp) if (errcode) { - warning ("failed to read exec filename from attached file: %s", + warning (_("failed to read exec filename from attached file: %s"), safe_strerror (errcode)); return 0; } @@ -860,7 +847,7 @@ som_solib_section_offsets (struct objfile *objfile, "$PRIVATE$"); if (!private_section) { - warning ("Unable to find $PRIVATE$ in shared library!"); + warning (_("Unable to find $PRIVATE$ in shared library!")); offsets->offsets[SECT_OFF_DATA (objfile)] = 0; offsets->offsets[SECT_OFF_BSS (objfile)] = 0; return 1; diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c index b9aad55..79ae9cc 100644 --- a/gdb/solib-sunos.c +++ b/gdb/solib-sunos.c @@ -438,10 +438,8 @@ sunos_current_sos (void) target_read_string (LM_NAME (new), &buffer, SO_NAME_MAX_PATH_SIZE - 1, &errcode); if (errcode != 0) - { - warning ("current_sos: Can't read pathname for load map: %s\n", - safe_strerror (errcode)); - } + warning (_("Can't read pathname for load map: %s."), + safe_strerror (errcode)); else { strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); @@ -539,7 +537,7 @@ disable_break (void) if (stop_pc != breakpoint_addr) { - warning ("stopped at unknown breakpoint while handling shared libraries"); + warning (_("stopped at unknown breakpoint while handling shared libraries")); } return 1; @@ -750,7 +748,7 @@ sunos_solib_create_inferior_hook (void) if (!enable_break ()) { - warning ("shared library handler failed to enable breakpoint"); + warning (_("shared library handler failed to enable breakpoint")); return; } @@ -787,7 +785,7 @@ sunos_solib_create_inferior_hook (void) if (!disable_break ()) { - warning ("shared library handler failed to disable breakpoint"); + warning (_("shared library handler failed to disable breakpoint")); } solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add); diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 3c6a992..f3fe605 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -557,7 +557,7 @@ open_symbol_file_object (void *from_ttyp) if (errcode) { - warning ("failed to read exec filename from attached file: %s", + warning (_("failed to read exec filename from attached file: %s"), safe_strerror (errcode)); return 0; } @@ -646,10 +646,8 @@ svr4_current_sos (void) target_read_string (LM_NAME (new), &buffer, SO_NAME_MAX_PATH_SIZE - 1, &errcode); if (errcode != 0) - { - warning ("current_sos: Can't read pathname for load map: %s\n", - safe_strerror (errcode)); - } + warning (_("Can't read pathname for load map: %s."), + safe_strerror (errcode)); else { strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); @@ -725,10 +723,8 @@ svr4_fetch_objfile_link_map (struct objfile *objfile) SO_NAME_MAX_PATH_SIZE - 1, &errcode); make_cleanup (xfree, buffer); if (errcode != 0) - { - warning ("svr4_fetch_objfile_link_map: Can't read pathname for load map: %s\n", - safe_strerror (errcode)); - } + warning (_("Can't read pathname for load map: %s."), + safe_strerror (errcode)); else { /* Is this the linkmap for the file we want? */ @@ -905,7 +901,7 @@ enable_break (void) /* Make sure the dynamic linker's really a useful object. */ if (!bfd_check_format (tmp_bfd, bfd_object)) { - warning ("Unable to grok dynamic linker %s as an object file", buf); + warning (_("Unable to grok dynamic linker %s as an object file"), buf); bfd_close (tmp_bfd); goto bkpt_at_symbol; } @@ -986,7 +982,7 @@ enable_break (void) /* For whatever reason we couldn't set a breakpoint in the dynamic linker. Warn and drop into the old code. */ bkpt_at_symbol: - warning ("Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code."); + warning (_("Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code.")); } /* Scan through the list of symbols, trying to look up the symbol and @@ -1207,14 +1203,14 @@ svr4_solib_create_inferior_hook (void) if (!svr4_have_link_map_offsets ()) { - warning ("no shared library support for this OS / ABI"); + warning (_("no shared library support for this OS / ABI")); return; } if (!enable_break ()) { - warning ("shared library handler failed to enable breakpoint"); + warning (_("shared library handler failed to enable breakpoint")); return; } diff --git a/gdb/solib.c b/gdb/solib.c index 3efe575..aa15e92 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -249,7 +249,7 @@ solib_map_sections (void *arg) if (!abfd) { close (scratch_chan); - error ("Could not open `%s' as an executable file: %s", + error (_("Could not open `%s' as an executable file: %s"), scratch_pathname, bfd_errmsg (bfd_get_error ())); } @@ -260,17 +260,17 @@ solib_map_sections (void *arg) /* copy full path name into so_name, so that later symbol_file_add can find it */ if (strlen (scratch_pathname) >= SO_NAME_MAX_PATH_SIZE) - error ("Full path name length of shared library exceeds SO_NAME_MAX_PATH_SIZE in so_list structure."); + error (_("Full path name length of shared library exceeds SO_NAME_MAX_PATH_SIZE in so_list structure.")); strcpy (so->so_name, scratch_pathname); if (!bfd_check_format (abfd, bfd_object)) { - error ("\"%s\": not in executable format: %s.", + error (_("\"%s\": not in executable format: %s."), scratch_pathname, bfd_errmsg (bfd_get_error ())); } if (build_section_table (abfd, &so->sections, &so->sections_end)) { - error ("Can't find the file sections in `%s': %s", + error (_("Can't find the file sections in `%s': %s"), bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); } @@ -325,7 +325,7 @@ free_so (struct so_list *so) { bfd_filename = bfd_get_filename (so->abfd); if (! bfd_close (so->abfd)) - warning ("cannot close \"%s\": %s", + warning (_("cannot close \"%s\": %s"), bfd_filename, bfd_errmsg (bfd_get_error ())); } @@ -601,7 +601,7 @@ solib_add (char *pattern, int from_tty, struct target_ops *target, int readsyms) char *re_err = re_comp (pattern); if (re_err) - error ("Invalid regexp: %s", re_err); + error (_("Invalid regexp: %s"), re_err); } update_solib_list (from_tty, target); diff --git a/gdb/somread.c b/gdb/somread.c index e65bdcc..50c1f84 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -93,14 +93,14 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET); val = bfd_bread (buf, symsize * number_of_symbols, abfd); if (val != symsize * number_of_symbols) - error ("Couldn't read symbol dictionary!"); + error (_("Couldn't read symbol dictionary!")); /* FIXME (alloca): could be quite large. */ stringtab = alloca (obj_som_stringtab_size (abfd)); bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET); val = bfd_bread (stringtab, obj_som_stringtab_size (abfd), abfd); if (val != obj_som_stringtab_size (abfd)) - error ("Can't read in HP string table."); + error (_("Can't read in HP string table.")); /* We need to determine if objfile is a dynamic executable (so we can do the right thing for ST_ENTRY vs ST_CODE symbols). @@ -277,7 +277,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, } if (bufp->name.n_strx > obj_som_stringtab_size (abfd)) - error ("Invalid symbol data; bad HP string table offset: %d", + error (_("Invalid symbol data; bad HP string table offset: %d"), bufp->name.n_strx); prim_record_minimal_symbol (symname, bufp->symbol_value, ms_type, diff --git a/gdb/somsolib.c b/gdb/somsolib.c index 7883af7..aff470c 100644 --- a/gdb/somsolib.c +++ b/gdb/somsolib.c @@ -237,7 +237,7 @@ som_solib_sizeof_symbol_table (char *filename) { close (desc); make_cleanup (xfree, filename); - error ("\"%s\": can't open to read symbols: %s.", filename, + error (_("\"%s\": can't open to read symbols: %s."), filename, bfd_errmsg (bfd_get_error ())); } @@ -245,7 +245,7 @@ som_solib_sizeof_symbol_table (char *filename) { bfd_close (abfd); /* This also closes desc */ make_cleanup (xfree, filename); - error ("\"%s\": can't read symbols: %s.", filename, + error (_("\"%s\": can't read symbols: %s."), filename, bfd_errmsg (bfd_get_error ())); } @@ -333,7 +333,7 @@ som_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty, if (!bfd_check_format (so->abfd, bfd_object)) { - error ("\"%s\": not in executable format: %s.", + error (_("\"%s\": not in executable format: %s."), name, bfd_errmsg (bfd_get_error ())); } } @@ -361,7 +361,7 @@ som_solib_load_symbols (struct so_list *so, char *name, int from_tty, &so->sections, &so->sections_end)) { - error ("Unable to build section table for shared library\n."); + error (_("Unable to build section table for shared library\n.")); return; } @@ -442,7 +442,7 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re re_err = re_comp (arg_string ? arg_string : "."); if (re_err != NULL) { - error ("Invalid regexp: %s", re_err); + error (_("Invalid regexp: %s"), re_err); } /* If we're debugging a core file, or have attached to a running @@ -469,19 +469,13 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL); if (msymbol == NULL) - { - error ("Unable to find __dld_flags symbol in object file.\n"); - return; - } + error (_("Unable to find __dld_flags symbol in object file.")); addr = SYMBOL_VALUE_ADDRESS (msymbol); /* Read the current contents. */ status = target_read_memory (addr, buf, 4); if (status != 0) - { - error ("Unable to read __dld_flags\n"); - return; - } + error (_("Unable to read __dld_flags.")); dld_flags = extract_unsigned_integer (buf, 4); /* __dld_list may not be valid. If not, then we punt, warning the user if @@ -490,13 +484,15 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re if ((dld_flags & DLD_FLAGS_LISTVALID) == 0) { if (from_tty) - error ("__dld_list is not valid according to __dld_flags.\n"); + error (_("__dld_list is not valid according to __dld_flags.")); return; } /* If the libraries were not mapped private, warn the user. */ if ((dld_flags & DLD_FLAGS_MAPPRIVATE) == 0) - warning ("The shared libraries were not privately mapped; setting a\nbreakpoint in a shared library will not work until you rerun the program.\n"); + warning (_("\ +The shared libraries were not privately mapped; setting a breakpoint\n\ +in a shared library will not work until you rerun the program.")); msymbol = lookup_minimal_symbol ("__dld_list", NULL, NULL); if (!msymbol) @@ -505,10 +501,7 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re but the data is still available if you know where to look. */ msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL); if (!msymbol) - { - error ("Unable to find dynamic library list.\n"); - return; - } + error (_("Unable to find dynamic library list.")); addr = SYMBOL_VALUE_ADDRESS (msymbol) - 8; } else @@ -516,10 +509,7 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re status = target_read_memory (addr, buf, 4); if (status != 0) - { - error ("Unable to find dynamic library list.\n"); - return; - } + error (_("Unable to find dynamic library list.")); addr = extract_unsigned_integer (buf, 4); @@ -535,10 +525,7 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re with hpux10 when it is released. */ status = target_read_memory (addr, buf, 4); if (status != 0) - { - error ("Unable to find dynamic library list.\n"); - return; - } + error (_("Unable to find dynamic library list.")); /* addr now holds the address of the first entry in the dynamic library list. */ @@ -609,7 +596,7 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re status = stat (name, &statbuf); if (status == -1) { - warning ("Can't find file %s referenced in dld_list.", name); + warning (_("Can't find file %s referenced in dld_list."), name); status = target_read_memory (addr + 36, buf, 4); if (status != 0) @@ -808,7 +795,12 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re if (som_solib_st_size_threshold_exceeded) { if (!threshold_warning_given) - warning ("Symbols for some libraries have not been loaded, because\ndoing so would exceed the size threshold specified by auto-solib-limit.\nTo manually load symbols, use the 'sharedlibrary' command.\nTo raise the threshold, set auto-solib-limit to a larger value and rerun\nthe program.\n"); + warning (_("\ +Symbols for some libraries have not been loaded, because doing so would\n\ +exceed the size threshold specified by auto-solib-limit.\n\ +To manually load symbols, use the 'sharedlibrary' command.\n\ +To raise the threshold, set auto-solib-limit to a larger value and rerun\n\ +the program.")); threshold_warning_given = 1; /* We'll still make note of this shlib, even if we don't @@ -837,12 +829,10 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re return; old_dld: - error ("Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.\n"); - return; + error (_("Debugging dynamic executables loaded via the hpux8 dld.sl is not supported.)); err: - error ("Error while reading dynamic library list.\n"); - return; + error (_("Error while reading dynamic library list.")); } @@ -908,9 +898,9 @@ som_solib_create_inferior_hook (void) status = target_write_memory (anaddr, buf, 4); if (status != 0) { - warning ("Unable to write __d_pid"); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("Unable to write __d_pid")); + warning (_("Suggest linking with /opt/langtools/lib/end.o.")); + warning (_("GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } @@ -928,9 +918,9 @@ som_solib_create_inferior_hook (void) msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find _DLD_HOOK symbol in object file."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("Unable to find _DLD_HOOK symbol in object file.")); + warning (_("Suggest linking with /opt/langtools/lib/end.o.")); + warning (_("GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -969,9 +959,9 @@ som_solib_create_inferior_hook (void) msymbol = lookup_minimal_symbol ("__dld_hook", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find __dld_hook symbol in object file."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("Unable to find __dld_hook symbol in object file.")); + warning (_("Suggest linking with /opt/langtools/lib/end.o.")); + warning (_("GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -982,9 +972,9 @@ som_solib_create_inferior_hook (void) msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile); if (msymbol == NULL) { - warning ("Unable to find __dld_d_trap symbol in object file."); - warning ("Suggest linking with /opt/langtools/lib/end.o."); - warning ("GDB will be unable to track shl_load/shl_unload calls"); + warning (_("Unable to find __dld_d_trap symbol in object file.")); + warning (_("Suggest linking with /opt/langtools/lib/end.o.")); + warning (_("GDB will be unable to track shl_load/shl_unload calls")); goto keep_going; } create_solib_event_breakpoint (SYMBOL_VALUE_ADDRESS (msymbol)); @@ -999,18 +989,14 @@ keep_going: not debug the shared code. */ msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL); if (msymbol == NULL) - { - error ("Unable to find __dld_flags symbol in object file.\n"); - } + error (_("Unable to find __dld_flags symbol in object file.")); anaddr = SYMBOL_VALUE_ADDRESS (msymbol); /* Read the current contents. */ status = target_read_memory (anaddr, buf, 4); if (status != 0) - { - error ("Unable to read __dld_flags\n"); - } + error (_("Unable to read __dld_flags.")); dld_flags = extract_unsigned_integer (buf, 4); /* Turn on the flags we care about. */ @@ -1020,9 +1006,7 @@ keep_going: store_unsigned_integer (buf, 4, dld_flags); status = target_write_memory (anaddr, buf, 4); if (status != 0) - { - error ("Unable to write __dld_flags\n"); - } + error (_("Unable to write __dld_flags.")); /* Now find the address of _start and set a breakpoint there. We still need this code for two reasons: @@ -1035,9 +1019,7 @@ keep_going: msymbol = lookup_minimal_symbol ("_start", NULL, symfile_objfile); if (msymbol == NULL) - { - error ("Unable to find _start symbol in object file.\n"); - } + error (_("Unable to find _start symbol in object file.")); anaddr = SYMBOL_VALUE_ADDRESS (msymbol); @@ -1192,7 +1174,7 @@ char * som_solib_loaded_library_pathname (int pid) { if (!som_solib_have_load_event (pid)) - error ("Must have a load event to use this query"); + error (_("Must have a load event to use this query")); return som_solib_library_pathname (pid); } @@ -1201,7 +1183,7 @@ char * som_solib_unloaded_library_pathname (int pid) { if (!som_solib_have_unload_event (pid)) - error ("Must have an unload event to use this query"); + error (_("Must have an unload event to use this query")); return som_solib_library_pathname (pid); } @@ -1424,7 +1406,7 @@ som_solib_section_offsets (struct objfile *objfile, "$PRIVATE$"); if (!private_section) { - warning ("Unable to find $PRIVATE$ in shared library!"); + warning (_("Unable to find $PRIVATE$ in shared library!")); offsets->offsets[SECT_OFF_DATA (objfile)] = 0; offsets->offsets[SECT_OFF_BSS (objfile)] = 0; return 1; diff --git a/gdb/source.c b/gdb/source.c index 34ed01c..14faff1 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -158,7 +158,7 @@ set_default_source_symtab_and_line (void) struct symtab_and_line cursal; if (!have_full_symbols () && !have_partial_symbols ()) - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); /* Pull in a current source symtab if necessary */ if (current_source_symtab == 0) @@ -284,7 +284,7 @@ select_source_symtab (struct symtab *s) if (current_source_symtab) return; - error ("Can't find a default source file"); + error (_("Can't find a default source file")); } static void @@ -506,7 +506,7 @@ add_path (char *dirname, char **which_path, int parse_separators) print_sys_errmsg (name, save_errno); } else if ((st.st_mode & S_IFMT) != S_IFDIR) - warning ("%s is not a directory.", name); + warning (_("%s is not a directory."), name); } append: @@ -979,9 +979,7 @@ find_source_lines (struct symtab *s, int desc) mtime = bfd_get_mtime (exec_bfd); if (mtime && mtime < st.st_mtime) - { - warning ("Source file is more recent than executable.\n"); - } + warning (_("Source file is more recent than executable.")); #ifdef LSEEK_NOT_LINEAR { @@ -1218,7 +1216,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror) if (line < 1 || line > s->nlines) { close (desc); - error ("Line number %d out of range; %s has %d lines.", + error (_("Line number %d out of range; %s has %d lines."), line, s->filename, s->nlines); } @@ -1395,7 +1393,7 @@ forward_search_command (char *regex, int from_tty) msg = (char *) re_comp (regex); if (msg) - error ("%s", msg); + error (("%s"), msg); if (current_source_symtab == 0) select_source_symtab (0); @@ -1410,7 +1408,7 @@ forward_search_command (char *regex, int from_tty) if (line < 1 || line > current_source_symtab->nlines) { close (desc); - error ("Expression not found"); + error (_("Expression not found")); } if (lseek (desc, current_source_symtab->line_charpos[line - 1], 0) < 0) @@ -1488,7 +1486,7 @@ reverse_search_command (char *regex, int from_tty) msg = (char *) re_comp (regex); if (msg) - error ("%s", msg); + error (("%s"), msg); if (current_source_symtab == 0) select_source_symtab (0); @@ -1503,7 +1501,7 @@ reverse_search_command (char *regex, int from_tty) if (line < 1 || line > current_source_symtab->nlines) { close (desc); - error ("Expression not found"); + error (_("Expression not found")); } if (lseek (desc, current_source_symtab->line_charpos[line - 1], 0) < 0) diff --git a/gdb/stabsread.c b/gdb/stabsread.c index c0f0ae3..463c7b6 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -281,7 +281,7 @@ dbx_lookup_type (int typenums[2]) struct type *temp_type; struct type **temp_type_p; - warning ("GDB internal error: bad real_filenum"); + warning (_("GDB internal error: bad real_filenum")); error_return: temp_type = init_type (TYPE_CODE_ERROR, 0, 0, NULL, NULL); @@ -1886,7 +1886,7 @@ again: if (type == 0) { - warning ("GDB internal error, type is NULL in stabsread.c\n"); + warning (_("GDB internal error, type is NULL in stabsread.c.")); return error_type (pp, objfile); } @@ -4433,12 +4433,12 @@ find_name_end (char *name) /* Must be an ObjC method symbol. */ if (s[1] != '[') { - error ("invalid symbol name \"%s\"", name); + error (_("invalid symbol name \"%s\""), name); } s = strchr (s, ']'); if (s == NULL) { - error ("invalid symbol name \"%s\"", name); + error (_("invalid symbol name \"%s\""), name); } return strchr (s, ':'); } diff --git a/gdb/stack.c b/gdb/stack.c index cd11406..677b336 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -764,7 +764,7 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, This avoids problems with expressions that contain side-effects. */ if (numargs >= ARRAY_SIZE (args)) - error ("Too many args in frame specification"); + error (_("Too many args in frame specification")); args[numargs++] = parse_and_eval (addr_string); do_cleanups (cleanup); @@ -824,7 +824,7 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, really should be used instead of spaces to delimit; using spaces normally works in an expression). */ #ifdef SETUP_ARBITRARY_FRAME - error ("No frame %s", paddr_d (addrs[0])); + error (_("No frame %s"), paddr_d (addrs[0])); #endif /* If (s)he specifies the frame with an address, he deserves what (s)he gets. Still, give the highest one that matches. @@ -850,7 +850,7 @@ parse_frame_specification_1 (const char *frame_exp, const char *message, else if (numargs == 2) return create_new_frame (addrs[0], addrs[1]); else - error ("Too many args in frame specification"); + error (_("Too many args in frame specification")); } struct frame_info * @@ -1134,7 +1134,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty) int trailing_level; if (!target_has_stack) - error ("No stack."); + error (_("No stack.")); /* The following code must do two things. First, it must set the variable TRAILING to the frame from which we should start @@ -1145,7 +1145,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty) /* The target can be in a state where there is no valid frames (e.g., just connected). */ if (trailing == NULL) - error ("No stack."); + error (_("No stack.")); trailing_level = 0; if (count_exp) @@ -1460,9 +1460,9 @@ print_frame_label_vars (struct frame_info *fi, int this_level_only, int last_index; if (bl != blockvector_for_pc (end, &index)) - error ("blockvector blotch"); + error (_("blockvector blotch")); if (BLOCKVECTOR_BLOCK (bl, index) != block) - error ("blockvector botch"); + error (_("blockvector botch")); last_index = BLOCKVECTOR_NBLOCKS (bl); index += 1; @@ -1735,7 +1735,7 @@ up_silently_base (char *count_exp) fi = find_relative_frame (get_selected_frame ("No stack."), &count1); if (count1 != 0 && count_exp == 0) - error ("Initial frame selected; you cannot go up."); + error (_("Initial frame selected; you cannot go up.")); select_frame (fi); } @@ -1773,7 +1773,7 @@ down_silently_base (char *count_exp) impossible), but "down 9999" can be used to mean go all the way down without getting an error. */ - error ("Bottom (i.e., innermost) frame selected; you cannot go down."); + error (_("Bottom (i.e., innermost) frame selected; you cannot go down.")); } select_frame (frame); @@ -1872,7 +1872,7 @@ If you continue, the return value that you specified will be ignored.\n"; confirmed = query ("%sMake %s return now? ", query_prefix, SYMBOL_PRINT_NAME (thisfun)); if (!confirmed) - error ("Not confirmed"); + error (_("Not confirmed")); } /* NOTE: cagney/2003-01-18: Is this silly? Rather than pop each @@ -1888,7 +1888,7 @@ If you continue, the return value that you specified will be ignored.\n"; if (frame_id_inner (selected_id, get_frame_id (get_current_frame ()))) /* Caught in the safety net, oops! We've gone way past the selected frame. */ - error ("Problem while popping stack frames (corrupt stack?)"); + error (_("Problem while popping stack frames (corrupt stack?)")); frame_pop (get_current_frame ()); } } diff --git a/gdb/std-regs.c b/gdb/std-regs.c index 0d711a6..eaa6d26 100644 --- a/gdb/std-regs.c +++ b/gdb/std-regs.c @@ -120,7 +120,7 @@ value_of_builtin_frame_sp_reg (struct frame_info *frame) if (SP_REGNUM >= 0) return value_of_register (SP_REGNUM, frame); #endif - error ("Standard register ``$sp'' is not available for this target"); + error (_("Standard register ``$sp'' is not available for this target")); } static struct value * @@ -130,7 +130,7 @@ value_of_builtin_frame_ps_reg (struct frame_info *frame) if (PS_REGNUM >= 0) return value_of_register (PS_REGNUM, frame); #endif - error ("Standard register ``$ps'' is not available for this target"); + error (_("Standard register ``$ps'' is not available for this target")); } extern initialize_file_ftype _initialize_frame_reg; /* -Wmissing-prototypes */ diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index 61c168e..2094a9c 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -84,12 +84,12 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, char *name, unsigned int i; if (bfd_get_flavour (templ) != bfd_target_elf_flavour) - error ("add-symbol-file-from-memory not supported for this target"); + error (_("add-symbol-file-from-memory not supported for this target")); nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase, do_target_read_memory); if (nbfd == NULL) - error ("Failed to read a valid object file image from memory."); + error (_("Failed to read a valid object file image from memory.")); if (name == NULL) nbfd->filename = xstrdup ("shared object read from target memory"); @@ -102,7 +102,7 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, char *name, on error it does not free all the storage associated with the bfd). */ bfd_close (nbfd); - error ("Got object file from memory but can't read symbols: %s.", + error (_("Got object file from memory but can't read symbols: %s."), bfd_errmsg (bfd_get_error ())); } @@ -135,7 +135,7 @@ add_symbol_file_from_memory_command (char *args, int from_tty) struct bfd *templ; if (args == NULL) - error ("add-symbol-file-from-memory requires an expression argument"); + error (_("add-symbol-file-from-memory requires an expression argument")); addr = parse_and_eval_address (args); @@ -145,8 +145,8 @@ add_symbol_file_from_memory_command (char *args, int from_tty) else templ = exec_bfd; if (templ == NULL) - error ("\ -Must use symbol-file or exec-file before add-symbol-file-from-memory."); + error (_("\ +Must use symbol-file or exec-file before add-symbol-file-from-memory.")); symbol_file_add_from_memory (templ, addr, NULL, from_tty); } @@ -200,8 +200,9 @@ add_vsyscall_page (struct target_ops *target, int from_tty) ``bfd_runtime'' (a BFD created using the loaded image) file format should fix this. */ { - warning ("could not load vsyscall page because no executable was specified"); - warning ("try using the \"file\" command first"); + warning (_("\ +Could not load vsyscall page because no executable was specified\n\ +try using the \"file\" command first.")); return; } args.bfd = bfd; diff --git a/gdb/symfile.c b/gdb/symfile.c index b39844d..7f2c7bd 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -601,11 +601,11 @@ syms_from_objfile (struct objfile *objfile, bfd_map_over_sections (objfile->obfd, find_lowest_section, &lower_sect); if (lower_sect == NULL) - warning ("no loadable sections found in added symbol-file %s", + warning (_("no loadable sections found in added symbol-file %s"), objfile->name); else if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) - warning ("Lowest section in %s is %s at %s", + warning (_("Lowest section in %s is %s at %s"), objfile->name, bfd_section_name (objfile->obfd, lower_sect), paddr (bfd_section_vma (objfile->obfd, lower_sect))); @@ -640,7 +640,7 @@ syms_from_objfile (struct objfile *objfile, } else { - warning ("section %s not found in %s", + warning (_("section %s not found in %s"), addrs->other[i].name, objfile->name); addrs->other[i].addr = 0; @@ -811,7 +811,7 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, int from_tty, && mainline && from_tty && !query ("Load new symbol table from \"%s\"? ", name)) - error ("Not confirmed."); + error (_("Not confirmed.")); objfile = allocate_objfile (abfd, flags); discard_cleanups (my_cleanups); @@ -986,7 +986,7 @@ symbol_file_clear (int from_tty) && from_tty && !query ("Discard symbol table from `%s'? ", symfile_objfile->name)) - error ("Not confirmed."); + error (_("Not confirmed.")); free_all_objfiles (); /* solib descriptors may have handles to objfiles. Since their @@ -1180,7 +1180,7 @@ symbol_file_command (char *args, int from_tty) if (strcmp (*argv, "-readnow") == 0) flags |= OBJF_READNOW; else if (**argv == '-') - error ("unknown option `%s'", *argv); + error (_("unknown option `%s'"), *argv); else { name = *argv; @@ -1192,7 +1192,7 @@ symbol_file_command (char *args, int from_tty) if (name == NULL) { - error ("no symbol file name was specified"); + error (_("no symbol file name was specified")); } do_cleanups (cleanups); } @@ -1273,7 +1273,7 @@ symfile_bfd_open (char *name) { close (desc); make_cleanup (xfree, name); - error ("\"%s\": can't open to read symbols: %s.", name, + error (_("\"%s\": can't open to read symbols: %s."), name, bfd_errmsg (bfd_get_error ())); } bfd_set_cacheable (sym_bfd, 1); @@ -1285,7 +1285,7 @@ symfile_bfd_open (char *name) bfd). */ bfd_close (sym_bfd); /* This also closes desc */ make_cleanup (xfree, name); - error ("\"%s\": can't read symbols: %s.", name, + error (_("\"%s\": can't read symbols: %s."), name, bfd_errmsg (bfd_get_error ())); } return (sym_bfd); @@ -1341,7 +1341,7 @@ find_sym_fns (struct objfile *objfile) return; } } - error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + error (_("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown."), bfd_get_target (objfile->obfd)); } @@ -1451,10 +1451,10 @@ load_section_callback (bfd *abfd, asection *asec, void *data) make_cleanup (xfree, check); if (target_read_memory (lma, check, len) != 0) - error ("Download verify read failed at 0x%s", + error (_("Download verify read failed at 0x%s"), paddr (lma)); if (memcmp (buffer, check, len) != 0) - error ("Download verify compare failed at 0x%s", + error (_("Download verify compare failed at 0x%s"), paddr (lma)); do_cleanups (verify_cleanups); } @@ -1466,7 +1466,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data) if (quit_flag || (deprecated_ui_load_progress_hook != NULL && deprecated_ui_load_progress_hook (sect_name, sent))) - error ("Canceled the download"); + error (_("Canceled the download")); if (deprecated_show_load_progress != NULL) deprecated_show_load_progress (sect_name, sent, size, @@ -1476,7 +1476,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data) while (sent < size); if (err != 0) - error ("Memory access error while loading section %s.", sect_name); + error (_("Memory access error while loading section %s."), sect_name); do_cleanups (old_chain); } @@ -1512,7 +1512,7 @@ generic_load (char *args, int from_tty) cbdata.load_offset = strtoul (offptr, &endptr, 0); if (offptr == endptr) - error ("Invalid download offset:%s\n", offptr); + error (_("Invalid download offset:%s."), offptr); *offptr = '\0'; } else @@ -1533,7 +1533,7 @@ generic_load (char *args, int from_tty) if (!bfd_check_format (loadfile_bfd, bfd_object)) { - error ("\"%s\" is not an object file: %s", filename, + error (_("\"%s\" is not an object file: %s"), filename, bfd_errmsg (bfd_get_error ())); } @@ -1650,7 +1650,7 @@ add_symbol_file_command (char *args, int from_tty) dont_repeat (); if (args == NULL) - error ("add-symbol-file takes a file name and an address"); + error (_("add-symbol-file takes a file name and an address")); /* Make a copy of the string that we can safely write into. */ args = xstrdup (args); @@ -1733,7 +1733,7 @@ add_symbol_file_command (char *args, int from_tty) } } else - error ("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*"); + error (_("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*")); } } argcnt++; @@ -1772,7 +1772,7 @@ add_symbol_file_command (char *args, int from_tty) } if (from_tty && (!query ("%s", ""))) - error ("Not confirmed."); + error (_("Not confirmed.")); symbol_file_add (filename, from_tty, section_addrs, 0, flags); @@ -1788,7 +1788,7 @@ add_shared_symbol_files_command (char *args, int from_tty) #ifdef ADD_SHARED_SYMBOL_FILES ADD_SHARED_SYMBOL_FILES (args, from_tty); #else - error ("This command is not available in this configuration of GDB."); + error (_("This command is not available in this configuration of GDB.")); #endif } @@ -1858,14 +1858,14 @@ reread_symbols (void) BFD without closing the descriptor. */ obfd_filename = bfd_get_filename (objfile->obfd); if (!bfd_close (objfile->obfd)) - error ("Can't close BFD for %s: %s", objfile->name, + error (_("Can't close BFD for %s: %s"), objfile->name, bfd_errmsg (bfd_get_error ())); objfile->obfd = bfd_openr (obfd_filename, gnutarget); if (objfile->obfd == NULL) - error ("Can't open %s to read symbols.", objfile->name); + error (_("Can't open %s to read symbols."), objfile->name); /* bfd_openr sets cacheable to true, which is what we want. */ if (!bfd_check_format (objfile->obfd, bfd_object)) - error ("Can't read symbols from %s: %s.", objfile->name, + error (_("Can't read symbols from %s: %s."), objfile->name, bfd_errmsg (bfd_get_error ())); /* Save the offsets, we will nuke them with the rest of the @@ -1932,7 +1932,7 @@ reread_symbols (void) obstack_init (&objfile->objfile_obstack); if (build_objfile_section_table (objfile)) { - error ("Can't find the file sections in `%s': %s", + error (_("Can't find the file sections in `%s': %s"), objfile->name, bfd_errmsg (bfd_get_error ())); } terminate_minimal_symbol_table (objfile); @@ -2098,14 +2098,14 @@ set_ext_lang_command (char *args, int from_tty) /* First arg is filename extension, starting with '.' */ if (*cp != '.') - error ("'%s': Filename extension must begin with '.'", ext_args); + error (_("'%s': Filename extension must begin with '.'"), ext_args); /* Find end of first arg. */ while (*cp && !isspace (*cp)) cp++; if (*cp == '\0') - error ("'%s': two arguments required -- filename extension and language", + error (_("'%s': two arguments required -- filename extension and language"), ext_args); /* Null-terminate first arg */ @@ -2116,7 +2116,7 @@ set_ext_lang_command (char *args, int from_tty) cp++; if (*cp == '\0') - error ("'%s': two arguments required -- filename extension and language", + error (_("'%s': two arguments required -- filename extension and language"), ext_args); /* Lookup the language from among those we know. */ @@ -3108,12 +3108,12 @@ map_overlay_command (char *args, int from_tty) asection *bfdsec; if (!overlay_debugging) - error ("\ + error (_("\ Overlay debugging not enabled. Use either the 'overlay auto' or\n\ -the 'overlay manual' command."); +the 'overlay manual' command.")); if (args == 0 || *args == 0) - error ("Argument required: name of an overlay section"); + error (_("Argument required: name of an overlay section")); /* First, find a section matching the user supplied argument */ ALL_OBJSECTIONS (objfile, sec) @@ -3144,7 +3144,7 @@ the 'overlay manual' command."); } return; } - error ("No overlay section called %s", args); + error (_("No overlay section called %s"), args); } /* Function: unmap_overlay_command @@ -3158,23 +3158,23 @@ unmap_overlay_command (char *args, int from_tty) struct obj_section *sec; if (!overlay_debugging) - error ("\ + error (_("\ Overlay debugging not enabled. Use either the 'overlay auto' or\n\ -the 'overlay manual' command."); +the 'overlay manual' command.")); if (args == 0 || *args == 0) - error ("Argument required: name of an overlay section"); + error (_("Argument required: name of an overlay section")); /* First, find a section matching the user supplied argument */ ALL_OBJSECTIONS (objfile, sec) if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) { if (!sec->ovly_mapped) - error ("Section %s is not mapped", args); + error (_("Section %s is not mapped"), args); sec->ovly_mapped = 0; return; } - error ("No overlay section called %s", args); + error (_("No overlay section called %s"), args); } /* Function: overlay_auto_command @@ -3222,7 +3222,7 @@ overlay_load_command (char *args, int from_tty) if (target_overlay_update) (*target_overlay_update) (NULL); else - error ("This target does not know how to read its overlay state."); + error (_("This target does not know how to read its overlay state.")); } /* Function: overlay_command @@ -3343,18 +3343,18 @@ simple_read_overlay_table (void) novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL); if (! novlys_msym) { - error ("Error reading inferior's overlay table: " + error (_("Error reading inferior's overlay table: " "couldn't find `_novlys' variable\n" - "in inferior. Use `overlay manual' mode."); + "in inferior. Use `overlay manual' mode.")); return 0; } ovly_table_msym = lookup_minimal_symbol ("_ovly_table", NULL, NULL); if (! ovly_table_msym) { - error ("Error reading inferior's overlay table: couldn't find " + error (_("Error reading inferior's overlay table: couldn't find " "`_ovly_table' array\n" - "in inferior. Use `overlay manual' mode."); + "in inferior. Use `overlay manual' mode.")); return 0; } diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 5bf148c..85eda5e 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -366,7 +366,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile) } if (objfile->minimal_symbol_count != index) { - warning ("internal error: minimal symbol count %d != %d", + warning (_("internal error: minimal symbol count %d != %d"), objfile->minimal_symbol_count, index); } fprintf_filtered (outfile, "\n"); @@ -548,8 +548,8 @@ maintenance_print_symbols (char *args, int from_tty) if (args == NULL) { - error ("\ -Arguments missing: an output file name and an optional symbol file name"); + error (_("\ +Arguments missing: an output file name and an optional symbol file name")); } else if ((argv = buildargv (args)) == NULL) { @@ -788,7 +788,7 @@ maintenance_print_psymbols (char *args, int from_tty) if (args == NULL) { - error ("print-psymbols takes an output file name and optional symbol file name"); + error (_("print-psymbols takes an output file name and optional symbol file name")); } else if ((argv = buildargv (args)) == NULL) { @@ -937,7 +937,7 @@ maintenance_print_msymbols (char *args, int from_tty) if (args == NULL) { - error ("print-msymbols takes an output file name and optional symbol file name"); + error (_("print-msymbols takes an output file name and optional symbol file name")); } else if ((argv = buildargv (args)) == NULL) { diff --git a/gdb/symtab.c b/gdb/symtab.c index 7c90c50..85807c1 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -221,7 +221,7 @@ got_symtab: return (NULL); if (ps->readin) - error ("Internal: readin %s pst for `%s' found when no symtab found.", + error (_("Internal: readin %s pst for `%s' found when no symtab found."), ps->filename, name); s = PSYMTAB_TO_SYMTAB (ps); @@ -1295,7 +1295,7 @@ lookup_symbol_aux_psymtabs (int block_index, const char *name, STATIC_BLOCK : GLOBAL_BLOCK); sym = lookup_block_symbol (block, name, linkage_name, domain); if (!sym) - error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s<type>).", + error (_("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s<type>)."), block_index == GLOBAL_BLOCK ? "global" : "static", name, ps->filename, name, name); } @@ -1676,9 +1676,9 @@ basic_lookup_transparent_type (const char *name) block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (!sym) - error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ + error (_("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ %s may be an inlined function, or may be a template function\n\ -(if a template, try specifying an instantiation: %s<type>).", +(if a template, try specifying an instantiation: %s<type>)."), name, ps->filename, name, name); } if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) @@ -1723,9 +1723,9 @@ basic_lookup_transparent_type (const char *name) block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); if (!sym) - error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ + error (_("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ %s may be an inlined function, or may be a template function\n\ -(if a template, try specifying an instantiation: %s<type>).", +(if a template, try specifying an instantiation: %s<type>)."), name, ps->filename, name, name); } if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) @@ -1923,8 +1923,8 @@ find_pc_sect_symtab (CORE_ADDR pc, asection *section) /* Might want to error() here (in case symtab is corrupt and will cause a core dump), but maybe we can successfully continue, so let's not. */ - warning ("\ -(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n", + warning (_("\ +(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n"), paddr_nz (pc)); s = PSYMTAB_TO_SYMTAB (ps); } @@ -2521,14 +2521,14 @@ operator_chars (char *p, char **end) else if (p[1] == '[') { if (p[2] == ']') - error ("mismatched quoting on brackets, try 'operator\\[\\]'"); + error (_("mismatched quoting on brackets, try 'operator\\[\\]'")); else if (p[2] == '\\' && p[3] == ']') { *end = p + 4; /* 'operator\[\]' */ return p; } else - error ("nothing is allowed between '[' and ']'"); + error (_("nothing is allowed between '[' and ']'")); } else { @@ -2584,21 +2584,21 @@ operator_chars (char *p, char **end) return p; case '(': if (p[1] != ')') - error ("`operator ()' must be specified without whitespace in `()'"); + error (_("`operator ()' must be specified without whitespace in `()'")); *end = p + 2; return p; case '?': if (p[1] != ':') - error ("`operator ?:' must be specified without whitespace in `?:'"); + error (_("`operator ?:' must be specified without whitespace in `?:'")); *end = p + 2; return p; case '[': if (p[1] != ']') - error ("`operator []' must be specified without whitespace in `[]'"); + error (_("`operator []' must be specified without whitespace in `[]'")); *end = p + 2; return p; default: - error ("`operator %s' not supported", p); + error (_("`operator %s' not supported"), p); break; } @@ -2696,7 +2696,7 @@ sources_info (char *ignore, int from_tty) if (!have_full_symbols () && !have_partial_symbols ()) { - error ("No symbol table is loaded. Use the \"file\" command."); + error (_("No symbol table is loaded. Use the \"file\" command.")); } printf_filtered ("Source files for which symbols have been read in:\n\n"); @@ -2868,7 +2868,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], struct cleanup *old_chain = NULL; if (kind < VARIABLES_DOMAIN) - error ("must search on specific domain"); + error (_("must search on specific domain")); ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; @@ -2911,7 +2911,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], } if (0 != (val = re_comp (regexp))) - error ("Invalid regexp (%s): %s", val, regexp); + error (_("Invalid regexp (%s): %s"), val, regexp); } /* Search through the partial symtabs *first* for all symbols @@ -4060,7 +4060,7 @@ decode_line_spec (char *string, int funfirstline) struct symtab_and_line cursal; if (string == 0) - error ("Empty line specification."); + error (_("Empty line specification.")); /* We use whatever is set as the current source line. We do not try and get a default or it will recursively call us! */ @@ -4071,7 +4071,7 @@ decode_line_spec (char *string, int funfirstline) (char ***) NULL, NULL); if (*string) - error ("Junk at end of line specification: %s", string); + error (_("Junk at end of line specification: %s"), string); return sals; } diff --git a/gdb/target.c b/gdb/target.c index e17cdaa..3499470 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -277,14 +277,14 @@ nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, static void tcomplain (void) { - error ("You can't do that when your target is `%s'", + error (_("You can't do that when your target is `%s'"), current_target.to_shortname); } void noprocess (void) { - error ("You can't do that without a process to debug."); + error (_("You can't do that without a process to debug.")); } static int @@ -299,7 +299,7 @@ nosupport_runtime (void) if (ptid_equal (inferior_ptid, null_ptid)) noprocess (); else - error ("No run-time support for this"); + error (_("No run-time support for this")); } @@ -325,12 +325,12 @@ kill_or_be_killed (int from_tty) { target_kill (); if (target_has_execution) - error ("Killing the program did not help."); + error (_("Killing the program did not help.")); return; } else { - error ("Program not killed."); + error (_("Program not killed.")); } } tcomplain (); @@ -1422,7 +1422,7 @@ target_preopen (int from_tty) || query ("A program is being debugged already. Kill it? ")) target_kill (); else - error ("Program not killed."); + error (_("Program not killed.")); } /* Calling target_kill may remove the target from the stack. But if @@ -1453,7 +1453,7 @@ target_link (char *modname, CORE_ADDR *t_reloc) { (current_target.to_lookup_symbol) (modname, t_reloc); if (*t_reloc == 0) - error ("Unable to link to %s and get relocation in rombug", modname); + error (_("Unable to link to %s and get relocation in rombug"), modname); } else *t_reloc = (CORE_ADDR) -1; @@ -1493,7 +1493,7 @@ find_default_run_target (char *do_mesg) } if (count != 1) - error ("Don't know how to %s. Try \"help target\".", do_mesg); + error (_("Don't know how to %s. Try \"help target\"."), do_mesg); return runable; } @@ -1768,14 +1768,14 @@ normal_pid_to_str (ptid_t ptid) /* Error-catcher for target_find_memory_regions */ static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) { - error ("No target."); + error (_("No target.")); return 0; } /* Error-catcher for target_make_corefile_notes */ static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2) { - error ("No target."); + error (_("No target.")); return NULL; } @@ -2539,9 +2539,7 @@ do_monitor_command (char *cmd, || (current_target.to_rcmd == debug_to_rcmd && (debug_target.to_rcmd == (void (*) (char *, struct ui_file *)) tcomplain))) - { - error ("\"monitor\" command not supported by this target.\n"); - } + error (_("\"monitor\" command not supported by this target.")); target_rcmd (cmd, gdb_stdtarg); } diff --git a/gdb/thread.c b/gdb/thread.c index ecdbe5e..2593c70 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -442,7 +442,7 @@ info_threads_command (char *arg, int from_tty) if (cur_frame == NULL) { /* Ooops, can't restore, tell user where we are. */ - warning ("Couldn't restore frame in current thread, at frame 0"); + warning (_("Couldn't restore frame in current thread, at frame 0")); print_stack_frame (get_selected_frame (NULL), 0, LOCATION); } else @@ -518,7 +518,7 @@ thread_apply_all_command (char *cmd, int from_tty) char *saved_cmd; if (cmd == NULL || *cmd == '\000') - error ("Please specify a command following the thread ID list"); + error (_("Please specify a command following the thread ID list")); old_chain = make_cleanup_restore_current_thread (inferior_ptid); @@ -554,12 +554,12 @@ thread_apply_command (char *tidlist, int from_tty) char *saved_cmd; if (tidlist == NULL || *tidlist == '\000') - error ("Please specify a thread ID list"); + error (_("Please specify a thread ID list")); for (cmd = tidlist; *cmd != '\000' && !isalpha (*cmd); cmd++); if (*cmd == '\000') - error ("Please specify a command following the thread ID list"); + error (_("Please specify a command following the thread ID list")); old_chain = make_cleanup_restore_current_thread (inferior_ptid); @@ -574,7 +574,7 @@ thread_apply_command (char *tidlist, int from_tty) start = strtol (tidlist, &p, 10); if (p == tidlist) - error ("Error parsing %s", tidlist); + error (_("Error parsing %s"), tidlist); tidlist = p; while (*tidlist == ' ' || *tidlist == '\t') @@ -585,7 +585,7 @@ thread_apply_command (char *tidlist, int from_tty) tidlist++; /* Skip the - */ end = strtol (tidlist, &p, 10); if (p == tidlist) - error ("Error parsing %s", tidlist); + error (_("Error parsing %s"), tidlist); tidlist = p; while (*tidlist == ' ' || *tidlist == '\t') @@ -599,9 +599,9 @@ thread_apply_command (char *tidlist, int from_tty) tp = find_thread_id (start); if (!tp) - warning ("Unknown thread %d.", start); + warning (_("Unknown thread %d."), start); else if (!thread_alive (tp)) - warning ("Thread %d has terminated.", start); + warning (_("Thread %d has terminated."), start); else { switch_to_thread (tp->ptid); @@ -631,7 +631,7 @@ thread_command (char *tidstr, int from_tty) pid_to_thread_id (inferior_ptid), target_tid_to_str (inferior_ptid)); else - error ("No stack."); + error (_("No stack.")); return; } @@ -649,10 +649,10 @@ do_captured_thread_select (struct ui_out *uiout, void *tidstr) tp = find_thread_id (num); if (!tp) - error ("Thread ID %d not known.", num); + error (_("Thread ID %d not known."), num); if (!thread_alive (tp)) - error ("Thread ID %d has terminated.\n", num); + error (_("Thread ID %d has terminated."), num); switch_to_thread (tp->ptid); @@ -391,7 +391,7 @@ execute_command (char *p, int from_tty) && strcmp (c->name, "pwd") != 0 && strcmp (c->name, "show") != 0 && strcmp (c->name, "stop") != 0) - error ("Cannot execute this command while the target is running."); + error (_("Cannot execute this command while the target is running.")); /* Pass null arg rather than an empty one. */ arg = *p ? p : 0; @@ -427,7 +427,7 @@ execute_command (char *p, int from_tty) else if (c->type == set_cmd || c->type == show_cmd) do_setshow_command (arg, from_tty & caution, c); else if (!cmd_func_p (c)) - error ("That is not a command, just a help topic."); + error (_("That is not a command, just a help topic.")); else if (deprecated_call_command_hook) deprecated_call_command_hook (c, arg, from_tty & caution); else @@ -723,7 +723,7 @@ float_handler (int signo) /* This message is based on ANSI C, section 4.7. Note that integer divide by zero causes this, so "float" is a misnomer. */ signal (SIGFPE, float_handler); - error ("Erroneous arithmetic operation."); + error (_("Erroneous arithmetic operation.")); } static void @@ -1258,7 +1258,7 @@ set_history_size_command (char *args, int from_tty, struct cmd_list_element *c) else { history_size = INT_MAX; - error ("History size must be non-negative"); + error (_("History size must be non-negative")); } } diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 6faec3e..050d8c7 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -180,14 +180,14 @@ trace_error (char *buf) { case '1': /* malformed packet error */ if (*++buf == '0') /* general case: */ - error ("tracepoint.c: error in outgoing packet."); + error (_("tracepoint.c: error in outgoing packet.")); else - error ("tracepoint.c: error in outgoing packet at field #%ld.", + error (_("tracepoint.c: error in outgoing packet at field #%ld."), strtol (buf, NULL, 16)); case '2': - error ("trace API error 0x%s.", ++buf); + error (_("trace API error 0x%s."), ++buf); default: - error ("Target returns error code '%s'.", buf); + error (_("Target returns error code '%s'."), buf); } } @@ -201,7 +201,7 @@ remote_get_noisy_reply (char *buf, QUIT; /* allow user to bail out with ^C */ getpkt (buf, sizeof_buf, 0); if (buf[0] == 0) - error ("Target does not support this command."); + error (_("Target does not support this command.")); else if (buf[0] == 'E') trace_error (buf); else if (buf[0] == 'O' && @@ -391,7 +391,7 @@ trace_command (char *arg, int from_tty) int i; if (!arg || !*arg) - error ("trace command requires an argument"); + error (_("trace command requires an argument")); if (from_tty && info_verbose) printf_filtered ("TRACE %s\n", arg); @@ -713,7 +713,7 @@ trace_pass_command (char *args, int from_tty) int all = 0; if (args == 0 || *args == 0) - error ("passcount command requires an argument (count + optional TP num)"); + error (_("passcount command requires an argument (count + optional TP num)")); count = strtoul (args, &args, 10); /* Count comes first, then TP num. */ @@ -725,7 +725,7 @@ trace_pass_command (char *args, int from_tty) args += 3; /* Skip special argument "all". */ all = 1; if (*args) - error ("Junk at end of arguments."); + error (_("Junk at end of arguments.")); } else t1 = get_tracepoint_by_number (&args, 1, 1); @@ -767,19 +767,19 @@ static void read_actions (struct tracepoint *); static void end_actions_pseudocommand (char *args, int from_tty) { - error ("This command cannot be used at the top level."); + error (_("This command cannot be used at the top level.")); } static void while_stepping_pseudocommand (char *args, int from_tty) { - error ("This command can only be used in a tracepoint actions list."); + error (_("This command can only be used in a tracepoint actions list.")); } static void collect_pseudocommand (char *args, int from_tty) { - error ("This command can only be used in a tracepoint actions list."); + error (_("This command can only be used in a tracepoint actions list.")); } /* Enter a list of actions for a tracepoint. */ @@ -880,7 +880,7 @@ read_actions (struct tracepoint *t) { if (prompt == prompt2) { - warning ("Already processing 'while-stepping'"); + warning (_("Already processing 'while-stepping'")); continue; } else @@ -939,7 +939,7 @@ validate_actionline (char **line, struct tracepoint *t) c = lookup_cmd (&p, cmdlist, "", -1, 1); if (c == 0) { - warning ("'%s' is not an action that I know, or is ambiguous.", + warning (_("'%s' is not an action that I know, or is ambiguous."), p); return BADLINE; } @@ -973,14 +973,14 @@ validate_actionline (char **line, struct tracepoint *t) { if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_CONST) { - warning ("constant %s (value %ld) will not be collected.", + warning (_("constant %s (value %ld) will not be collected."), DEPRECATED_SYMBOL_NAME (exp->elts[2].symbol), SYMBOL_VALUE (exp->elts[2].symbol)); return BADLINE; } else if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_OPTIMIZED_OUT) { - warning ("%s is optimized away and cannot be collected.", + warning (_("%s is optimized away and cannot be collected."), DEPRECATED_SYMBOL_NAME (exp->elts[2].symbol)); return BADLINE; } @@ -993,19 +993,19 @@ validate_actionline (char **line, struct tracepoint *t) make_cleanup_free_agent_expr (aexpr); if (aexpr->len > MAX_AGENT_EXPR_LEN) - error ("expression too complicated, try simplifying"); + error (_("expression too complicated, try simplifying")); ax_reqs (aexpr, &areqs); (void) make_cleanup (xfree, areqs.reg_mask); if (areqs.flaw != agent_flaw_none) - error ("malformed expression"); + error (_("malformed expression")); if (areqs.min_height < 0) - error ("gdb: Internal error: expression has min height < 0"); + error (_("gdb: Internal error: expression has min height < 0")); if (areqs.max_height > 20) - error ("expression too complicated, try simplifying"); + error (_("expression too complicated, try simplifying")); do_cleanups (old_chain); } @@ -1023,7 +1023,7 @@ validate_actionline (char **line, struct tracepoint *t) if (*p == '\0' || (t->step_count = strtol (p, &p, 0)) == 0) { - warning ("'%s': bad step-count; command ignored.", *line); + warning (_("'%s': bad step-count; command ignored."), *line); return BADLINE; } return STEPPING; @@ -1032,7 +1032,7 @@ validate_actionline (char **line, struct tracepoint *t) return END; else { - warning ("'%s' is not a supported tracepoint action.", *line); + warning (_("'%s' is not a supported tracepoint action."), *line); return BADLINE; } } @@ -1153,7 +1153,7 @@ add_register (struct collection_list *collection, unsigned int regno) if (info_verbose) printf_filtered ("collect register %d\n", regno); if (regno > (8 * sizeof (collection->regs_mask))) - error ("Internal: register number %d too large for tracepoint", + error (_("Internal: register number %d too large for tracepoint"), regno); collection->regs_mask[regno / 8] |= 1 << (regno % 8); } @@ -1322,7 +1322,7 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc, switch (SYMBOL_CLASS (sym)) { default: - warning ("don't know how to trace local symbol %s", + warning (_("don't know how to trace local symbol %s"), DEPRECATED_SYMBOL_NAME (sym)); case LOC_LOCAL: case LOC_STATIC: @@ -1355,7 +1355,7 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc, block = BLOCK_SUPERBLOCK (block); } if (count == 0) - warning ("No %s found in scope.", + warning (_("No %s found in scope."), type == 'L' ? "locals" : "args"); } @@ -1535,7 +1535,7 @@ encode_actions (struct tracepoint *t, char ***tdp_actions, cmd = lookup_cmd (&action_exp, cmdlist, "", -1, 1); if (cmd == 0) - error ("Bad action list item: %s", action_exp); + error (_("Bad action list item: %s"), action_exp); if (cmd_cfunc_eq (cmd, collect_pseudocommand)) { @@ -1611,12 +1611,12 @@ encode_actions (struct tracepoint *t, char ***tdp_actions, ax_reqs (aexpr, &areqs); if (areqs.flaw != agent_flaw_none) - error ("malformed expression"); + error (_("malformed expression")); if (areqs.min_height < 0) - error ("gdb: Internal error: expression has min height < 0"); + error (_("gdb: Internal error: expression has min height < 0")); if (areqs.max_height > 20) - error ("expression too complicated, try simplifying"); + error (_("expression too complicated, try simplifying")); discard_cleanups (old_chain1); add_aexpr (collect, aexpr); @@ -1753,7 +1753,7 @@ trace_start_command (char *args, int from_tty) putpkt ("QTinit"); remote_get_noisy_reply (target_buf, sizeof (target_buf)); if (strcmp (target_buf, "OK")) - error ("Target does not support this command."); + error (_("Target does not support this command.")); ALL_TRACEPOINTS (t) { @@ -1770,7 +1770,7 @@ trace_start_command (char *args, int from_tty) putpkt (buf); remote_get_noisy_reply (target_buf, sizeof (target_buf)); if (strcmp (target_buf, "OK")) - error ("Target does not support tracepoints."); + error (_("Target does not support tracepoints.")); if (t->actions) { @@ -1795,7 +1795,7 @@ trace_start_command (char *args, int from_tty) remote_get_noisy_reply (target_buf, sizeof (target_buf)); if (strcmp (target_buf, "OK")) - error ("Error on target while setting tracepoints."); + error (_("Error on target while setting tracepoints.")); } } if (stepping_actions) @@ -1812,7 +1812,7 @@ trace_start_command (char *args, int from_tty) remote_get_noisy_reply (target_buf, sizeof (target_buf)); if (strcmp (target_buf, "OK")) - error ("Error on target while setting tracepoints."); + error (_("Error on target while setting tracepoints.")); } } @@ -1825,7 +1825,7 @@ trace_start_command (char *args, int from_tty) putpkt ("QTStart"); remote_get_noisy_reply (target_buf, sizeof (target_buf)); if (strcmp (target_buf, "OK")) - error ("Bogus reply from target: %s", target_buf); + error (_("Bogus reply from target: %s"), target_buf); set_traceframe_num (-1); /* All old traceframes invalidated. */ set_tracepoint_num (-1); set_traceframe_context (-1); @@ -1835,7 +1835,7 @@ trace_start_command (char *args, int from_tty) } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* tstop command */ @@ -1847,13 +1847,13 @@ trace_stop_command (char *args, int from_tty) putpkt ("QTStop"); remote_get_noisy_reply (target_buf, sizeof (target_buf)); if (strcmp (target_buf, "OK")) - error ("Bogus reply from target: %s", target_buf); + error (_("Bogus reply from target: %s"), target_buf); trace_running_p = 0; if (deprecated_trace_start_stop_hook) deprecated_trace_start_stop_hook (0, from_tty); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } unsigned long trace_running_p; @@ -1869,13 +1869,13 @@ trace_status_command (char *args, int from_tty) if (target_buf[0] != 'T' || (target_buf[1] != '0' && target_buf[1] != '1')) - error ("Bogus reply from target: %s", target_buf); + error (_("Bogus reply from target: %s"), target_buf); /* exported for use by the GUI */ trace_running_p = (target_buf[1] == '1'); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* Worker function for the various flavors of the tfind command. */ @@ -1923,7 +1923,7 @@ finish_tfind_command (char *msg, and then continue on to do something else. */ if (from_tty) - error ("Target failed to find requested trace frame."); + error (_("Target failed to find requested trace frame.")); else { if (info_verbose) @@ -1938,16 +1938,16 @@ finish_tfind_command (char *msg, break; case 'T': if ((target_tracept = (int) strtol (++reply, &reply, 16)) == -1) - error ("Target failed to find requested trace frame."); + error (_("Target failed to find requested trace frame.")); break; case 'O': /* "OK"? */ if (reply[1] == 'K' && reply[2] == '\0') reply += 2; else - error ("Bogus reply from target: %s", reply); + error (_("Bogus reply from target: %s"), reply); break; default: - error ("Bogus reply from target: %s", reply); + error (_("Bogus reply from target: %s"), reply); } flush_cached_frames (); @@ -2024,9 +2024,9 @@ trace_find_command (char *args, int from_tty) else if (0 == strcmp (args, "-")) { if (traceframe_number == -1) - error ("not debugging trace buffer"); + error (_("not debugging trace buffer")); else if (from_tty && traceframe_number == 0) - error ("already at start of trace buffer"); + error (_("already at start of trace buffer")); frameno = traceframe_number - 1; } @@ -2034,13 +2034,13 @@ trace_find_command (char *args, int from_tty) frameno = parse_and_eval_long (args); if (frameno < -1) - error ("invalid input (%d is less than zero)", frameno); + error (_("invalid input (%d is less than zero)"), frameno); sprintf (target_buf, "QTFrame:%x", frameno); finish_tfind_command (target_buf, sizeof (target_buf), from_tty); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* tfind end */ @@ -2083,7 +2083,7 @@ trace_find_pc_command (char *args, int from_tty) finish_tfind_command (target_buf, sizeof (target_buf), from_tty); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* tfind tracepoint command */ @@ -2097,7 +2097,7 @@ trace_find_tracepoint_command (char *args, int from_tty) if (args == 0 || *args == 0) { if (tracepoint_number == -1) - error ("No current tracepoint -- please supply an argument."); + error (_("No current tracepoint -- please supply an argument.")); else tdp = tracepoint_number; /* default is current TDP */ } @@ -2108,7 +2108,7 @@ trace_find_tracepoint_command (char *args, int from_tty) finish_tfind_command (target_buf, sizeof (target_buf), from_tty); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* TFIND LINE command: @@ -2183,14 +2183,14 @@ trace_find_line_command (char *args, int from_tty) printf_filtered ("Attempting to find line %d instead.\n", sal.line); else - error ("Cannot find a good line."); + error (_("Cannot find a good line.")); } } else /* Is there any case in which we get here, and have an address which the user would want to see? If we have debugging symbols and no line numbers? */ - error ("Line number %d is out of range for \"%s\".\n", + error (_("Line number %d is out of range for \"%s\"."), sal.line, sal.symtab->filename); sprintf_vma (startpc_str, start_pc); @@ -2208,7 +2208,7 @@ trace_find_line_command (char *args, int from_tty) do_cleanups (old_chain); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* tfind range command */ @@ -2247,7 +2247,7 @@ trace_find_range_command (char *args, int from_tty) finish_tfind_command (target_buf, sizeof (target_buf), from_tty); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* tfind outside command */ @@ -2286,7 +2286,7 @@ trace_find_outside_command (char *args, int from_tty) finish_tfind_command (target_buf, sizeof (target_buf), from_tty); } else - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); } /* save-tracepoints command */ @@ -2301,17 +2301,17 @@ tracepoint_save_command (char *args, int from_tty) char tmp[40]; if (args == 0 || *args == 0) - error ("Argument required (file name in which to save tracepoints"); + error (_("Argument required (file name in which to save tracepoints")); if (tracepoint_chain == 0) { - warning ("save-tracepoints: no tracepoints to save.\n"); + warning (_("save-tracepoints: no tracepoints to save.")); return; } pathname = tilde_expand (args); if (!(fp = fopen (pathname, "w"))) - error ("Unable to open file '%s' for saving tracepoints (%s)", + error (_("Unable to open file '%s' for saving tracepoints (%s)"), args, safe_strerror (errno)); xfree (pathname); @@ -2346,7 +2346,7 @@ tracepoint_save_command (char *args, int from_tty) { cmd = lookup_cmd (&actionline, cmdlist, "", -1, 1); if (cmd == 0) - error ("Bad action list item: %s", actionline); + error (_("Bad action list item: %s"), actionline); if (cmd_cfunc_eq (cmd, while_stepping_pseudocommand)) indent = i2; else if (cmd_cfunc_eq (cmd, end_actions_pseudocommand)) @@ -2374,7 +2374,7 @@ scope_info (char *args, int from_tty) int j, count = 0; if (args == 0 || *args == 0) - error ("requires an argument (function, line or *addr) to define a scope"); + error (_("requires an argument (function, line or *addr) to define a scope")); sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL); if (sals.nelts == 0) @@ -2534,13 +2534,13 @@ trace_dump_command (char *args, int from_tty) if (!target_is_remote ()) { - error ("Trace can only be run on remote targets."); + error (_("Trace can only be run on remote targets.")); return; } if (tracepoint_number == -1) { - warning ("No current trace frame."); + warning (_("No current trace frame.")); return; } @@ -2549,7 +2549,7 @@ trace_dump_command (char *args, int from_tty) break; if (t == NULL) - error ("No known tracepoint matches 'current' tracepoint #%d.", + error (_("No known tracepoint matches 'current' tracepoint #%d."), tracepoint_number); old_cleanups = make_cleanup (null_cleanup, NULL); @@ -2580,7 +2580,7 @@ trace_dump_command (char *args, int from_tty) cmd = lookup_cmd (&action_exp, cmdlist, "", -1, 1); if (cmd == 0) - error ("Bad action list item: %s", action_exp); + error (_("Bad action list item: %s"), action_exp); if (cmd_cfunc_eq (cmd, while_stepping_pseudocommand)) stepping_actions = 1; diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c index fc67db8..8eef3f1 100644 --- a/gdb/trad-frame.c +++ b/gdb/trad-frame.c @@ -166,7 +166,7 @@ trad_frame_get_prev_register (struct frame_info *next_frame, } else { - error ("Register %s not available", + error (_("Register %s not available"), gdbarch_register_name (gdbarch, regnum)); } } diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index f2d4412..00c3dcd 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -423,7 +423,7 @@ tui_set_layout_for_display_command (const char *layout_name) /* First check for ambiguous input */ if (strlen (buf_ptr) <= 1 && (*buf_ptr == 'S' || *buf_ptr == '$')) { - warning ("Ambiguous command input.\n"); + warning (_("Ambiguous command input.")); status = TUI_FAILURE; } else @@ -592,7 +592,7 @@ tui_layout_command (char *arg, int from_tty) /* Switch to the selected layout. */ if (tui_set_layout_for_display_command (arg) != TUI_SUCCESS) - warning ("Invalid layout specified.\n%s", LAYOUT_USAGE); + warning (_("Invalid layout specified.\n%s"), LAYOUT_USAGE); } diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 0ee5389..bdf3273 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -357,7 +357,7 @@ tui_show_frame_info (struct frame_info *fi) { if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL, &low, (CORE_ADDR) NULL) == 0) - error ("No function contains program counter for selected frame.\n"); + error (_("No function contains program counter for selected frame.")); else low = tui_get_low_disassembly_address (low, get_frame_pc (fi)); } diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index a646a5a..443172d 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -855,8 +855,8 @@ tui_set_focus (char *arg, int from_tty) win_info = tui_partial_win_by_name (buf_ptr); if (win_info == (struct tui_win_info *) NULL || !win_info->generic.is_visible) - warning ("Invalid window specified. \n\ -The window name specified must be valid and visible.\n"); + warning (_("Invalid window specified. \n\ +The window name specified must be valid and visible.\n")); else { tui_set_win_focus_to (win_info); @@ -870,7 +870,7 @@ The window name specified must be valid and visible.\n"); tui_win_name ((struct tui_gen_win_info *) tui_win_with_focus ())); } else - warning ("Incorrect Number of Arguments.\n%s", FOCUS_USAGE); + warning (_("Incorrect Number of Arguments.\n%s"), FOCUS_USAGE); } static void @@ -927,7 +927,7 @@ tui_set_tab_width_command (char *arg, int from_tty) if (ts > 0) tui_set_default_tab_len (ts); else - warning ("Tab widths greater than 0 must be specified.\n"); + warning (_("Tab widths greater than 0 must be specified.")); } } @@ -960,8 +960,8 @@ tui_set_win_height (char *arg, int from_tty) win_info = tui_partial_win_by_name (wname); if (win_info == (struct tui_win_info *) NULL || !win_info->generic.is_visible) - warning ("Invalid window specified. \n\ -The window name specified must be valid and visible.\n"); + warning (_("Invalid window specified. \n\ +The window name specified must be valid and visible.\n")); else { /* Process the size */ @@ -996,13 +996,13 @@ The window name specified must be valid and visible.\n"); */ if (tui_adjust_win_heights (win_info, new_height) == TUI_FAILURE) - warning ("Invalid window height specified.\n%s", + warning (_("Invalid window height specified.\n%s"), WIN_HEIGHT_USAGE); else tui_update_gdb_sizes (); } else - warning ("Invalid window height specified.\n%s", + warning (_("Invalid window height specified.\n%s"), WIN_HEIGHT_USAGE); } } @@ -1045,15 +1045,15 @@ tui_xdb_set_win_height (char *arg, int from_tty) if (!new_height_ok (tui_win_list[CMD_WIN], new_height) || tui_adjust_win_heights (tui_win_list[CMD_WIN], new_height) == TUI_FAILURE) - warning ("Invalid window height specified.\n%s", + warning (_("Invalid window height specified.\n%s"), XDBWIN_HEIGHT_USAGE); } else - warning ("Invalid window height specified.\n%s", + warning (_("Invalid window height specified.\n%s"), XDBWIN_HEIGHT_USAGE); } else - warning ("Invalid window height specified.\n%s", XDBWIN_HEIGHT_USAGE); + warning (_("Invalid window height specified.\n%s"), XDBWIN_HEIGHT_USAGE); } /* Set the height of the specified window, with va_list. */ @@ -1510,8 +1510,8 @@ parse_scrolling_args (char *arg, struct tui_win_info * * win_to_scroll, if (*win_to_scroll == (struct tui_win_info *) NULL || !(*win_to_scroll)->generic.is_visible) - warning ("Invalid window specified. \n\ -The window name specified must be valid and visible.\n"); + warning (_("Invalid window specified. \n\ +The window name specified must be valid and visible.\n")); else if (*win_to_scroll == TUI_CMD_WIN) *win_to_scroll = (struct tui_win_info *) (tui_source_windows ())->list[0]; } diff --git a/gdb/typeprint.c b/gdb/typeprint.c index 9fc5855..93d3b7b 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -90,7 +90,7 @@ typedef_print (struct type *type, struct symbol *new, struct ui_file *stream) break; #endif default: - error ("Language not supported."); + error (_("Language not supported.")); } fprintf_filtered (stream, ";\n"); } @@ -306,11 +306,11 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream) case TYPE_CODE_METHOD: case TYPE_CODE_REF: case TYPE_CODE_NAMESPACE: - error ("internal error: unhandled type in print_type_scalar"); + error (_("internal error: unhandled type in print_type_scalar")); break; default: - error ("Invalid type code in symbol table."); + error (_("Invalid type code in symbol table.")); } gdb_flush (stream); } diff --git a/gdb/utils.c b/gdb/utils.c index d93e55f..b0d177a 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -642,7 +642,7 @@ error_stream (struct ui_file *stream) long len; char *message = ui_file_xstrdup (stream, &len); make_cleanup (xfree, message); - error ("%s", message); + error (("%s"), message); } /* Print a message reporting an internal error/warning. Ask the user @@ -846,7 +846,7 @@ perror_with_name (const char *string) bfd_set_error (bfd_error_no_error); errno = 0; - error ("%s.", combined); + error (_("%s."), combined); } /* Print the system error message for ERRCODE, and also mention STRING @@ -1332,7 +1332,7 @@ no_control_char_error (const char *start, const char *end) memcpy (copy, start, len); copy[len] = '\0'; - error ("There is no control character `\\%s' in the `%s' character set.", + error (_("There is no control character `\\%s' in the `%s' character set."), copy, target_charset ()); } @@ -1380,8 +1380,8 @@ parse_escape (char **string_ptr) c = 0177; if (!host_char_to_target (c, &target_char)) - error ("There is no character corresponding to `Delete' " - "in the target character set `%s'.", host_charset ()); + error (_("There is no character corresponding to `Delete' " + "in the target character set `%s'."), host_charset ()); return target_char; } diff --git a/gdb/uw-thread.c b/gdb/uw-thread.c index 3bee2e6..69f323b 100644 --- a/gdb/uw-thread.c +++ b/gdb/uw-thread.c @@ -161,7 +161,7 @@ do { \ #define CALL_BASE(call) \ do { \ if (!lwp_infpid ()) \ - error ("uw-thread: no lwp"); \ + error (_("uw-thread: no lwp")); \ CALL_BASE_1 (call); \ } while (0) @@ -254,7 +254,7 @@ dbg (char *fmt, ...) if (!path) path = DEBUG_FILE; if ((fd = open (path, O_WRONLY | O_CREAT | O_TRUNC, 0664)) < 0) - error ("can't open %s\n", path); + error (_("can't open %s."), path); } va_start (args, fmt); @@ -525,7 +525,7 @@ add_thread_uw (int thrid, int lwpid, CORE_ADDR mapp, ptid_t ptid) struct thread_info *newthread; if ((newthread = add_thread (ptid)) == NULL) - error ("failed to create new thread structure"); + error (_("failed to create new thread structure")); newthread->private = xmalloc (sizeof (struct private_thread_info)); newthread->private->stable = 1; @@ -1002,7 +1002,7 @@ libthread_init (void) return; err: - warning ("uw-thread: unable to initialize user-mode thread debugging\n"); + warning (_("uw-thread: unable to initialize user-mode thread debugging.")); deactivate_uw_thread (); } diff --git a/gdb/valarith.c b/gdb/valarith.c index b3f6c49..4322c44 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -73,11 +73,11 @@ find_size_for_pointer_math (struct type *ptr_type) if (name == NULL) name = TYPE_TAG_NAME (ptr_target); if (name == NULL) - error ("Cannot perform pointer math on incomplete types, " - "try casting to a known type, or void *."); + error (_("Cannot perform pointer math on incomplete types, " + "try casting to a known type, or void *.")); else - error ("Cannot perform pointer math on incomplete type \"%s\", " - "try casting to a known type, or void *.", name); + error (_("Cannot perform pointer math on incomplete type \"%s\", " + "try casting to a known type, or void *."), name); } } return sz; @@ -160,9 +160,9 @@ value_sub (struct value *arg1, struct value *arg2) } else { - error ("\ + error (_("\ First argument of `-' is a pointer and second argument is neither\n\ -an integer nor a pointer of the same type."); +an integer nor a pointer of the same type.")); } } @@ -203,7 +203,7 @@ value_subscript (struct value *array, struct value *idx) /* Emit warning unless we have an array of unknown size. An array of unknown size has lowerbound 0 and upperbound -1. */ if (upperbound > -1) - warning ("array or string index out of range"); + warning (_("array or string index out of range")); /* fall doing C stuff */ c_style = 1; } @@ -226,7 +226,7 @@ value_subscript (struct value *array, struct value *idx) LONGEST lowerbound, upperbound; get_discrete_bounds (range_type, &lowerbound, &upperbound); if (index < lowerbound || index > upperbound) - error ("bitstring index out of range"); + error (_("bitstring index out of range")); index -= lowerbound; offset = index / TARGET_CHAR_BIT; byte = *((char *) value_contents (array) + offset); @@ -247,7 +247,7 @@ value_subscript (struct value *array, struct value *idx) if (c_style) return value_ind (value_add (array, idx)); else - error ("not an array or string"); + error (_("not an array or string")); } /* Return the value of EXPR[IDX], expr an aggregate rvalue @@ -265,7 +265,7 @@ value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound struct value *v; if (index < lowerbound || elt_offs >= TYPE_LENGTH (array_type)) - error ("no such vector element"); + error (_("no such vector element")); v = allocate_value (elt_type); if (value_lazy (array)) @@ -358,7 +358,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, arg vector and find the right function to call it with. */ if (TYPE_CODE (check_typedef (value_type (arg1))) != TYPE_CODE_STRUCT) - error ("Can't do that binary op on that type"); /* FIXME be explicit */ + error (_("Can't do that binary op on that type")); /* FIXME be explicit */ argvec = (struct value **) alloca (sizeof (struct value *) * 4); argvec[1] = value_addr (arg1); @@ -444,7 +444,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, break; case BINOP_MOD: /* invalid */ default: - error ("Invalid binary operation specified."); + error (_("Invalid binary operation specified.")); } break; case BINOP_SUBSCRIPT: @@ -470,7 +470,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, break; case BINOP_MOD: /* invalid */ default: - error ("Invalid binary operation specified."); + error (_("Invalid binary operation specified.")); } argvec[0] = value_struct_elt (&arg1, argvec + 1, tstr, &static_memfuncp, "structure"); @@ -491,7 +491,7 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op, } return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1); } - error ("member function %s not found", tstr); + error (_("member function %s not found"), tstr); #ifdef lint return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1); #endif @@ -518,7 +518,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside) arg vector and find the right function to call it with. */ if (TYPE_CODE (check_typedef (value_type (arg1))) != TYPE_CODE_STRUCT) - error ("Can't do that unary op on that type"); /* FIXME be explicit */ + error (_("Can't do that unary op on that type")); /* FIXME be explicit */ argvec = (struct value **) alloca (sizeof (struct value *) * 4); argvec[1] = value_addr (arg1); @@ -564,7 +564,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside) strcpy (ptr, "*"); break; default: - error ("Invalid unary operation specified."); + error (_("Invalid unary operation specified.")); } argvec[0] = value_struct_elt (&arg1, argvec + 1, tstr, &static_memfuncp, "structure"); @@ -586,7 +586,7 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside) } return call_function_by_hand (argvec[0], nargs, argvec + 1); } - error ("member function %s not found", tstr); + error (_("member function %s not found"), tstr); return 0; /* For lint -- never reached */ } @@ -679,11 +679,11 @@ value_concat (struct value *arg1, struct value *arg2) else if (TYPE_CODE (type2) == TYPE_CODE_BITSTRING || TYPE_CODE (type2) == TYPE_CODE_BOOL) { - error ("unimplemented support for bitstring/boolean repeats"); + error (_("unimplemented support for bitstring/boolean repeats")); } else { - error ("can't repeat values of that type"); + error (_("can't repeat values of that type")); } } else if (TYPE_CODE (type1) == TYPE_CODE_STRING @@ -693,7 +693,7 @@ value_concat (struct value *arg1, struct value *arg2) if (TYPE_CODE (type2) != TYPE_CODE_STRING && TYPE_CODE (type2) != TYPE_CODE_CHAR) { - error ("Strings can only be concatenated with other strings."); + error (_("Strings can only be concatenated with other strings.")); } inval1len = TYPE_LENGTH (type1); inval2len = TYPE_LENGTH (type2); @@ -724,14 +724,14 @@ value_concat (struct value *arg1, struct value *arg2) if (TYPE_CODE (type2) != TYPE_CODE_BITSTRING && TYPE_CODE (type2) != TYPE_CODE_BOOL) { - error ("Bitstrings or booleans can only be concatenated with other bitstrings or booleans."); + error (_("Bitstrings or booleans can only be concatenated with other bitstrings or booleans.")); } - error ("unimplemented support for bitstring/boolean concatenation."); + error (_("unimplemented support for bitstring/boolean concatenation.")); } else { /* We don't know how to concatenate these operands. */ - error ("illegal operands for concatenation."); + error (_("illegal operands for concatenation.")); } return (outval); } @@ -758,7 +758,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) if ((TYPE_CODE (type1) != TYPE_CODE_FLT && !is_integral_type (type1)) || (TYPE_CODE (type2) != TYPE_CODE_FLT && !is_integral_type (type2))) - error ("Argument to arithmetic operation not a number or boolean."); + error (_("Argument to arithmetic operation not a number or boolean.")); if (TYPE_CODE (type1) == TYPE_CODE_FLT || @@ -791,11 +791,11 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) case BINOP_EXP: v = pow (v1, v2); if (errno) - error ("Cannot perform exponentiation: %s", safe_strerror (errno)); + error (_("Cannot perform exponentiation: %s"), safe_strerror (errno)); break; default: - error ("Integer-only operation on floating point number."); + error (_("Integer-only operation on floating point number.")); } /* If either arg was long double, make sure that value is also long @@ -840,7 +840,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) break; default: - error ("Invalid operation on booleans."); + error (_("Invalid operation on booleans.")); } val = allocate_value (type1); @@ -929,7 +929,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) case BINOP_EXP: v = pow (v1, v2); if (errno) - error ("Cannot perform exponentiation: %s", safe_strerror (errno)); + error (_("Cannot perform exponentiation: %s"), safe_strerror (errno)); break; case BINOP_REM: @@ -1000,7 +1000,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) break; default: - error ("Invalid binary operation on numbers."); + error (_("Invalid binary operation on numbers.")); } /* This is a kludge to get around the fact that we don't @@ -1044,20 +1044,20 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) if (v2 != 0) v = v1 / v2; else - error ("Division by zero"); + error (_("Division by zero")); break; case BINOP_EXP: v = pow (v1, v2); if (errno) - error ("Cannot perform exponentiation: %s", safe_strerror (errno)); + error (_("Cannot perform exponentiation: %s"), safe_strerror (errno)); break; case BINOP_REM: if (v2 != 0) v = v1 % v2; else - error ("Division by zero"); + error (_("Division by zero")); break; case BINOP_MOD: @@ -1124,7 +1124,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) break; default: - error ("Invalid binary operation on numbers."); + error (_("Invalid binary operation on numbers.")); } /* This is a kludge to get around the fact that we don't @@ -1263,7 +1263,7 @@ value_equal (struct value *arg1, struct value *arg2) } else { - error ("Invalid type combination in equality test."); + error (_("Invalid type combination in equality test.")); return 0; /* For lint -- never reached */ } } @@ -1308,7 +1308,7 @@ value_less (struct value *arg1, struct value *arg2) return value_strcmp (arg1, arg2) < 0; else { - error ("Invalid type combination in ordering comparison."); + error (_("Invalid type combination in ordering comparison.")); return 0; } } @@ -1338,7 +1338,7 @@ value_neg (struct value *arg1) } else { - error ("Argument to negate operation not a number."); + error (_("Argument to negate operation not a number.")); return 0; /* For lint -- never reached */ } } @@ -1354,7 +1354,7 @@ value_complement (struct value *arg1) type = check_typedef (value_type (arg1)); if (!is_integral_type (type)) - error ("Argument to complement operation not an integer or boolean."); + error (_("Argument to complement operation not an integer or boolean.")); /* Perform integral promotion for ANSI C/C++. FIXME: What about FORTRAN ? */ @@ -1397,16 +1397,16 @@ value_in (struct value *element, struct value *set) if (TYPE_CODE (eltype) == TYPE_CODE_RANGE) eltype = TYPE_TARGET_TYPE (eltype); if (TYPE_CODE (settype) != TYPE_CODE_SET) - error ("Second argument of 'IN' has wrong type"); + error (_("Second argument of 'IN' has wrong type")); if (TYPE_CODE (eltype) != TYPE_CODE_INT && TYPE_CODE (eltype) != TYPE_CODE_CHAR && TYPE_CODE (eltype) != TYPE_CODE_ENUM && TYPE_CODE (eltype) != TYPE_CODE_BOOL) - error ("First argument of 'IN' has wrong type"); + error (_("First argument of 'IN' has wrong type")); member = value_bit_index (settype, value_contents (set), value_as_long (element)); if (member < 0) - error ("First argument of 'IN' not in range"); + error (_("First argument of 'IN' not in range")); return value_from_longest (LA_BOOL_TYPE, member); } diff --git a/gdb/valops.c b/gdb/valops.c index 754f801..ddcd646 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -138,7 +138,7 @@ find_function_in_inferior (const char *name) { if (SYMBOL_CLASS (sym) != LOC_BLOCK) { - error ("\"%s\" exists in this program but is not a function.", + error (_("\"%s\" exists in this program but is not a function."), name); } return value_of_variable (sym, NULL); @@ -159,9 +159,9 @@ find_function_in_inferior (const char *name) else { if (!target_has_execution) - error ("evaluation of this expression requires the target program to be active"); + error (_("evaluation of this expression requires the target program to be active")); else - error ("evaluation of this expression requires the program to have a function \"%s\".", name); + error (_("evaluation of this expression requires the program to have a function \"%s\"."), name); } } } @@ -180,9 +180,9 @@ value_allocate_space_in_inferior (int len) if (value_logical_not (val)) { if (!target_has_execution) - error ("No memory available to program now: you need to start the target first"); + error (_("No memory available to program now: you need to start the target first")); else - error ("No memory available to program: call to malloc failed"); + error (_("No memory available to program: call to malloc failed")); } return val; } @@ -233,7 +233,7 @@ value_cast (struct type *type, struct value *arg2) low_bound = 0, high_bound = 0; new_length = val_length / element_length; if (val_length % element_length != 0) - warning ("array element type size does not divide object size in cast"); + warning (_("array element type size does not divide object size in cast")); /* FIXME-type-allocation: need a way to free this type when we are done with it. */ range_type = create_range_type ((struct type *) NULL, @@ -312,7 +312,7 @@ value_cast (struct type *type, struct value *arg2) /* While pointers to methods don't really point to a function */ case TYPE_CODE_METHOD: - error ("Pointers to methods not supported with HP aCC"); + error (_("Pointers to methods not supported with HP aCC")); default: break; /* fall out and go to normal handling */ @@ -354,7 +354,7 @@ value_cast (struct type *type, struct value *arg2) { if (longest >= ((LONGEST) 1 << addr_bit) || longest <= -((LONGEST) 1 << addr_bit)) - warning ("value truncated"); + warning (_("value truncated")); } return value_from_longest (type, longest); } @@ -418,7 +418,7 @@ value_cast (struct type *type, struct value *arg2) } else { - error ("Invalid cast."); + error (_("Invalid cast.")); return 0; } } @@ -452,7 +452,7 @@ value_at (struct type *type, CORE_ADDR addr) struct value *val; if (TYPE_CODE (check_typedef (type)) == TYPE_CODE_VOID) - error ("Attempt to dereference a generic pointer."); + error (_("Attempt to dereference a generic pointer.")); val = allocate_value (type); @@ -472,7 +472,7 @@ value_at_lazy (struct type *type, CORE_ADDR addr) struct value *val; if (TYPE_CODE (check_typedef (type)) == TYPE_CODE_VOID) - error ("Attempt to dereference a generic pointer."); + error (_("Attempt to dereference a generic pointer.")); val = allocate_value (type); @@ -522,7 +522,7 @@ value_assign (struct value *toval, struct value *fromval) struct frame_id old_frame; if (!deprecated_value_modifiable (toval)) - error ("Left operand of assignment is not a modifiable lvalue."); + error (_("Left operand of assignment is not a modifiable lvalue.")); toval = coerce_ref (toval); @@ -573,7 +573,7 @@ value_assign (struct value *toval, struct value *fromval) / HOST_CHAR_BIT; if (changed_len > (int) sizeof (LONGEST)) - error ("Can't handle bitfields which don't fit in a %d bit word.", + error (_("Can't handle bitfields which don't fit in a %d bit word."), (int) sizeof (LONGEST) * HOST_CHAR_BIT); read_memory (VALUE_ADDRESS (toval) + value_offset (toval), @@ -606,7 +606,7 @@ value_assign (struct value *toval, struct value *fromval) value_reg = VALUE_REGNUM (toval); if (!frame) - error ("Value being assigned to is no longer active."); + error (_("Value being assigned to is no longer active.")); if (VALUE_LVAL (toval) == lval_register && CONVERT_REGISTER_P (VALUE_REGNUM (toval), type)) @@ -678,7 +678,7 @@ value_assign (struct value *toval, struct value *fromval) } default: - error ("Left operand of assignment is not an lvalue."); + error (_("Left operand of assignment is not an lvalue.")); } /* Assigning to the stack pointer, frame pointer, and other @@ -746,9 +746,9 @@ value_repeat (struct value *arg1, int count) struct value *val; if (VALUE_LVAL (arg1) != lval_memory) - error ("Only values in memory can be extended with '@'."); + error (_("Only values in memory can be extended with '@'.")); if (count < 1) - error ("Invalid number %d of repetitions.", count); + error (_("Invalid number %d of repetitions."), count); val = allocate_repeat_value (value_enclosing_type (arg1), count); @@ -776,16 +776,16 @@ value_of_variable (struct symbol *var, struct block *b) { if (BLOCK_FUNCTION (b) && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b))) - error ("No frame is currently executing in block %s.", + error (_("No frame is currently executing in block %s."), SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b))); else - error ("No frame is currently executing in specified block"); + error (_("No frame is currently executing in specified block")); } } val = read_var_value (var, frame); if (!val) - error ("Address of symbol \"%s\" is unknown.", SYMBOL_PRINT_NAME (var)); + error (_("Address of symbol \"%s\" is unknown."), SYMBOL_PRINT_NAME (var)); return val; } @@ -819,7 +819,7 @@ value_coerce_array (struct value *arg1) struct type *type = check_typedef (value_type (arg1)); if (VALUE_LVAL (arg1) != lval_memory) - error ("Attempt to take address of value not located in memory."); + error (_("Attempt to take address of value not located in memory.")); return value_from_pointer (lookup_pointer_type (TYPE_TARGET_TYPE (type)), (VALUE_ADDRESS (arg1) + value_offset (arg1))); @@ -834,7 +834,7 @@ value_coerce_function (struct value *arg1) struct value *retval; if (VALUE_LVAL (arg1) != lval_memory) - error ("Attempt to take address of value not located in memory."); + error (_("Attempt to take address of value not located in memory.")); retval = value_from_pointer (lookup_pointer_type (value_type (arg1)), (VALUE_ADDRESS (arg1) + value_offset (arg1))); @@ -862,7 +862,7 @@ value_addr (struct value *arg1) return value_coerce_function (arg1); if (VALUE_LVAL (arg1) != lval_memory) - error ("Attempt to take address of value not located in memory."); + error (_("Attempt to take address of value not located in memory.")); /* Get target memory address */ arg2 = value_from_pointer (lookup_pointer_type (value_type (arg1)), @@ -891,7 +891,7 @@ value_ind (struct value *arg1) base_type = check_typedef (value_type (arg1)); if (TYPE_CODE (base_type) == TYPE_CODE_MEMBER) - error ("not implemented: member types in value_ind"); + error (_("not implemented: member types in value_ind")); /* Allow * on an integer so we can cast it to whatever we want. This returns an int, which seems like the most C-like thing @@ -921,7 +921,7 @@ value_ind (struct value *arg1) return arg2; } - error ("Attempt to take contents of a non-pointer value."); + error (_("Attempt to take contents of a non-pointer value.")); return 0; /* For lint -- never reached */ } @@ -1000,14 +1000,14 @@ value_array (int lowbound, int highbound, struct value **elemvec) nelem = highbound - lowbound + 1; if (nelem <= 0) { - error ("bad array bounds (%d, %d)", lowbound, highbound); + error (_("bad array bounds (%d, %d)"), lowbound, highbound); } typelength = TYPE_LENGTH (value_enclosing_type (elemvec[0])); for (idx = 1; idx < nelem; idx++) { if (TYPE_LENGTH (value_enclosing_type (elemvec[idx])) != typelength) { - error ("array elements must all be the same size"); + error (_("array elements must all be the same size")); } } @@ -1211,14 +1211,14 @@ search_struct_field (char *name, struct value *arg1, int offset, { v = value_static_field (type, i); if (v == 0) - error ("field %s is nonexistent or has been optimised out", + error (_("field %s is nonexistent or has been optimised out"), name); } else { v = value_primitive_field (arg1, offset, i, type); if (v == 0) - error ("there is no field named %s", name); + error (_("there is no field named %s"), name); } return v; } @@ -1286,7 +1286,7 @@ search_struct_field (char *name, struct value *arg1, int offset, VALUE_ADDRESS (arg1) + value_offset (arg1) + offset); if (boffset == -1) - error ("virtual baseclass botch"); + error (_("virtual baseclass botch")); /* The virtual base class pointer might have been clobbered by the user program. Make sure that it still points to a valid memory @@ -1300,7 +1300,7 @@ search_struct_field (char *name, struct value *arg1, int offset, base_addr = VALUE_ADDRESS (arg1) + value_offset (arg1) + boffset; if (target_read_memory (base_addr, value_contents_raw (v2), TYPE_LENGTH (basetype)) != 0) - error ("virtual baseclass botch"); + error (_("virtual baseclass botch")); VALUE_LVAL (v2) = lval_memory; VALUE_ADDRESS (v2) = base_addr; } @@ -1404,7 +1404,7 @@ find_rt_vbase_offset (struct type *type, struct type *basetype, /* Before the constructor is invoked, things are usually zero'd out. */ if (vtbl == 0) - error ("Couldn't find virtual table -- object may not be constructed yet."); + error (_("Couldn't find virtual table -- object may not be constructed yet.")); /* Find virtual base's offset -- jump over entries for primary base @@ -1463,7 +1463,7 @@ search_struct_method (char *name, struct value **arg1p, check_stub_method_group (type, i); if (j > 0 && args == 0) - error ("cannot resolve overloaded method `%s': no arguments supplied", name); + error (_("cannot resolve overloaded method `%s': no arguments supplied"), name); else if (j == 0 && args == 0) { v = value_fn_field (arg1p, f, j, type, offset); @@ -1507,7 +1507,7 @@ search_struct_method (char *name, struct value **arg1p, offset + value_embedded_offset (*arg1p), &base_offset, &skip); if (skip >= 0) - error ("Virtual base class offset not found in vtable"); + error (_("Virtual base class offset not found in vtable")); } else { @@ -1524,7 +1524,7 @@ search_struct_method (char *name, struct value **arg1p, if (target_read_memory (VALUE_ADDRESS (*arg1p) + value_offset (*arg1p) + offset, tmp, TYPE_LENGTH (baseclass)) != 0) - error ("virtual baseclass botch"); + error (_("virtual baseclass botch")); base_valaddr = tmp; } else @@ -1535,7 +1535,7 @@ search_struct_method (char *name, struct value **arg1p, VALUE_ADDRESS (*arg1p) + value_offset (*arg1p) + offset); if (base_offset == -1) - error ("virtual baseclass botch"); + error (_("virtual baseclass botch")); } } else @@ -1598,11 +1598,11 @@ value_struct_elt (struct value **argp, struct value **args, } if (TYPE_CODE (t) == TYPE_CODE_MEMBER) - error ("not implemented: member type in value_struct_elt"); + error (_("not implemented: member type in value_struct_elt")); if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION) - error ("Attempt to extract a component of a value that is not a %s.", err); + error (_("Attempt to extract a component of a value that is not a %s."), err); /* Assume it's not, unless we see that it is. */ if (static_memfuncp) @@ -1622,18 +1622,18 @@ value_struct_elt (struct value **argp, struct value **args, return it as a pointer to a method. */ if (destructor_name_p (name, t)) - error ("Cannot get value of destructor"); + error (_("Cannot get value of destructor")); v = search_struct_method (name, argp, args, 0, static_memfuncp, t); if (v == (struct value *) - 1) - error ("Cannot take address of a method"); + error (_("Cannot take address of a method")); else if (v == 0) { if (TYPE_NFN_FIELDS (t)) - error ("There is no member or method named %s.", name); + error (_("There is no member or method named %s."), name); else - error ("There is no member named %s.", name); + error (_("There is no member named %s."), name); } return v; } @@ -1652,13 +1652,13 @@ value_struct_elt (struct value **argp, struct value **args, f_index, NULL, 0); } if (v == NULL) - error ("could not find destructor function named %s.", name); + error (_("could not find destructor function named %s."), name); else return v; } else { - error ("destructor should not have any argument"); + error (_("destructor should not have any argument")); } } else @@ -1666,7 +1666,7 @@ value_struct_elt (struct value **argp, struct value **args, if (v == (struct value *) - 1) { - error ("One of the arguments you tried to pass to %s could not be converted to what the function wants.", name); + error (_("One of the arguments you tried to pass to %s could not be converted to what the function wants."), name); } else if (v == 0) { @@ -1677,7 +1677,7 @@ value_struct_elt (struct value **argp, struct value **args, } if (!v) - error ("Structure has no component named %s.", name); + error (_("Structure has no component named %s."), name); return v; } @@ -1741,7 +1741,7 @@ find_method_list (struct value **argp, char *method, int offset, offset + value_embedded_offset (*argp), &base_offset, &skip); if (skip >= 0) - error ("Virtual base class offset not found in vtable"); + error (_("Virtual base class offset not found in vtable")); } else { @@ -1752,7 +1752,7 @@ find_method_list (struct value **argp, char *method, int offset, value_contents (*argp) + base_offset, VALUE_ADDRESS (*argp) + base_offset); if (base_offset == -1) - error ("virtual baseclass botch"); + error (_("virtual baseclass botch")); } } else @@ -1797,11 +1797,11 @@ value_find_oload_method_list (struct value **argp, char *method, int offset, } if (TYPE_CODE (t) == TYPE_CODE_MEMBER) - error ("Not implemented: member type in value_find_oload_lis"); + error (_("Not implemented: member type in value_find_oload_lis")); if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION) - error ("Attempt to extract a component of a value that is not a struct or union"); + error (_("Attempt to extract a component of a value that is not a struct or union")); return find_method_list (argp, method, 0, t, num_fns, basetype, boffset); } @@ -1873,7 +1873,7 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method, &num_fns, &basetype, &boffset); if (!fns_ptr || !num_fns) - error ("Couldn't find method %s%s%s", + error (_("Couldn't find method %s%s%s"), obj_type_name, (obj_type_name && *obj_type_name) ? "::" : "", name); @@ -1918,23 +1918,23 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method, if (match_quality == INCOMPATIBLE) { if (method) - error ("Cannot resolve method %s%s%s to any overloaded instance", + error (_("Cannot resolve method %s%s%s to any overloaded instance"), obj_type_name, (obj_type_name && *obj_type_name) ? "::" : "", name); else - error ("Cannot resolve function %s to any overloaded instance", + error (_("Cannot resolve function %s to any overloaded instance"), func_name); } else if (match_quality == NON_STANDARD) { if (method) - warning ("Using non-standard conversion to match method %s%s%s to supplied arguments", + warning (_("Using non-standard conversion to match method %s%s%s to supplied arguments"), obj_type_name, (obj_type_name && *obj_type_name) ? "::" : "", name); else - warning ("Using non-standard conversion to match function %s to supplied arguments", + warning (_("Using non-standard conversion to match function %s to supplied arguments"), func_name); } @@ -2256,7 +2256,7 @@ destructor_name_p (const char *name, const struct type *type) else len = cp - dname; if (strlen (name + 1) != len || strncmp (dname, name + 1, len) != 0) - error ("name of destructor must equal name of class"); + error (_("name of destructor must equal name of class")); else return 1; } @@ -2328,11 +2328,11 @@ check_field (struct value *arg1, const char *name) } if (TYPE_CODE (t) == TYPE_CODE_MEMBER) - error ("not implemented: member type in check_field"); + error (_("not implemented: member type in check_field")); if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION) - error ("Internal error: `this' is not an aggregate"); + error (_("Internal error: `this' is not an aggregate")); return check_field_in (t, name); } @@ -2381,7 +2381,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION) - error ("Internal error: non-aggregate type to value_struct_elt_for_reference"); + error (_("Internal error: non-aggregate type to value_struct_elt_for_reference")); for (i = TYPE_NFIELDS (t) - 1; i >= TYPE_N_BASECLASSES (t); i--) { @@ -2393,12 +2393,12 @@ value_struct_elt_for_reference (struct type *domain, int offset, { v = value_static_field (t, i); if (v == NULL) - error ("static field %s has been optimized out", + error (_("static field %s has been optimized out"), name); return v; } if (TYPE_FIELD_PACKED (t, i)) - error ("pointers to bitfield members not allowed"); + error (_("pointers to bitfield members not allowed")); return value_from_longest (lookup_reference_type (lookup_member_type (TYPE_FIELD_TYPE (t, i), @@ -2413,7 +2413,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, /* Destructors are a special case. */ if (destructor_name_p (name, t)) { - error ("member pointers to destructors not implemented yet"); + error (_("member pointers to destructors not implemented yet")); } /* Perform all necessary dereferencing. */ @@ -2442,14 +2442,14 @@ value_struct_elt_for_reference (struct type *domain, int offset, check_stub_method_group (t, i); if (intype == 0 && j > 1) - error ("non-unique member `%s' requires type instantiation", name); + error (_("non-unique member `%s' requires type instantiation"), name); if (intype) { while (j--) if (TYPE_FN_FIELD_TYPE (f, j) == intype) break; if (j < 0) - error ("no member function matches that type instantiation"); + error (_("no member function matches that type instantiation")); } else j = 0; @@ -2521,7 +2521,7 @@ value_namespace_elt (const struct type *curtype, noside); if (retval == NULL) - error ("No symbol \"%s\" in namespace \"%s\".", name, + error (_("No symbol \"%s\" in namespace \"%s\"."), name, TYPE_TAG_NAME (curtype)); return retval; @@ -2614,7 +2614,7 @@ value_full_object (struct value *argp, struct type *rtype, int xfull, int xtop, /* Check if object is in memory */ if (VALUE_LVAL (argp) != lval_memory) { - warning ("Couldn't retrieve complete object of RTTI type %s; object may be in register(s).", TYPE_NAME (real_type)); + warning (_("Couldn't retrieve complete object of RTTI type %s; object may be in register(s)."), TYPE_NAME (real_type)); return argp; } @@ -2649,7 +2649,7 @@ value_of_local (const char *name, int complain) if (deprecated_selected_frame == 0) { if (complain) - error ("no frame selected"); + error (_("no frame selected")); else return 0; } @@ -2658,7 +2658,7 @@ value_of_local (const char *name, int complain) if (!func) { if (complain) - error ("no `%s' in nameless context", name); + error (_("no `%s' in nameless context"), name); else return 0; } @@ -2667,7 +2667,7 @@ value_of_local (const char *name, int complain) if (dict_empty (BLOCK_DICT (b))) { if (complain) - error ("no args, no `%s'", name); + error (_("no args, no `%s'"), name); else return 0; } @@ -2678,14 +2678,14 @@ value_of_local (const char *name, int complain) if (sym == NULL) { if (complain) - error ("current stack frame does not contain a variable named `%s'", name); + error (_("current stack frame does not contain a variable named `%s'"), name); else return NULL; } ret = read_var_value (sym, deprecated_selected_frame); if (ret == 0 && complain) - error ("`%s' argument unreadable", name); + error (_("`%s' argument unreadable"), name); return ret; } @@ -2717,13 +2717,13 @@ value_slice (struct value *array, int lowbound, int length) if (TYPE_CODE (array_type) != TYPE_CODE_ARRAY && TYPE_CODE (array_type) != TYPE_CODE_STRING && TYPE_CODE (array_type) != TYPE_CODE_BITSTRING) - error ("cannot take slice of non-array"); + error (_("cannot take slice of non-array")); range_type = TYPE_INDEX_TYPE (array_type); if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0) - error ("slice from bad array or bitstring"); + error (_("slice from bad array or bitstring")); if (lowbound < lowerbound || length < 0 || lowbound + length - 1 > upperbound) - error ("slice out of range"); + error (_("slice out of range")); /* FIXME-type-allocation: need a way to free this type when we are done with it. */ slice_range_type = create_range_type ((struct type *) NULL, @@ -2741,7 +2741,7 @@ value_slice (struct value *array, int lowbound, int length) value_contents (array), lowbound + i); if (element < 0) - error ("internal error accessing bitstring"); + error (_("internal error accessing bitstring")); else if (element > 0) { int j = i % TARGET_CHAR_BIT; @@ -2827,7 +2827,7 @@ cast_into_complex (struct type *type, struct value *val) || TYPE_CODE (value_type (val)) == TYPE_CODE_INT) return value_literal_complex (val, value_zero (real_type, not_lval), type); else - error ("cannot cast non-number to complex"); + error (_("cannot cast non-number to complex")); } void diff --git a/gdb/valprint.c b/gdb/valprint.c index dfcd722..62e26fd 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -274,7 +274,7 @@ longest_to_int (LONGEST arg) { if (rtnval != arg) { - error ("Value out of range."); + error (_("Value out of range.")); } } return (rtnval); @@ -492,7 +492,7 @@ print_octal_chars (struct ui_file *stream, const bfd_byte *valaddr, break; default: - error ("Internal error in octal conversion;"); + error (_("Internal error in octal conversion;")); } cycle++; @@ -539,7 +539,7 @@ print_octal_chars (struct ui_file *stream, const bfd_byte *valaddr, break; default: - error ("Internal error in octal conversion;"); + error (_("Internal error in octal conversion;")); } cycle++; @@ -1080,7 +1080,7 @@ set_input_radix_1 (int from_tty, unsigned radix) { /* FIXME: cagney/2002-03-17: This needs to revert the bad radix value. */ - error ("Nonsense input radix ``decimal %u''; input radix unchanged.", + error (_("Nonsense input radix ``decimal %u''; input radix unchanged."), radix); } input_radix = radix; @@ -1116,7 +1116,7 @@ set_output_radix_1 (int from_tty, unsigned radix) default: /* FIXME: cagney/2002-03-17: This needs to revert the bad radix value. */ - error ("Unsupported output radix ``decimal %u''; output radix unchanged.", + error (_("Unsupported output radix ``decimal %u''; output radix unchanged."), radix); } output_radix = radix; diff --git a/gdb/value.c b/gdb/value.c index 9392753..e6a14bb 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -612,14 +612,14 @@ access_value_history (int num) if (absnum <= 0) { if (num == 0) - error ("The history is empty."); + error (_("The history is empty.")); else if (num == 1) - error ("There is only one value in the history."); + error (_("There is only one value in the history.")); else - error ("History does not go back to $$%d.", -num); + error (_("History does not go back to $$%d."), -num); } if (absnum > value_history_count) - error ("History has not yet reached $%d.", absnum); + error (_("History has not yet reached $%d."), absnum); absnum--; @@ -852,7 +852,7 @@ value_as_double (struct value *val) foo = unpack_double (value_type (val), value_contents (val), &inv); if (inv) - error ("Invalid floating value found in program."); + error (_("Invalid floating value found in program.")); return foo; } /* Extract a value as a C pointer. Does not deallocate the value. @@ -1009,10 +1009,10 @@ unpack_long (struct type *type, const char *valaddr) return extract_typed_address (valaddr, type); case TYPE_CODE_MEMBER: - error ("not implemented: member types in unpack_long"); + error (_("not implemented: member types in unpack_long")); default: - error ("Value can't be converted to integer."); + error (_("Value can't be converted to integer.")); } return 0; /* Placate lint. */ } @@ -1132,8 +1132,8 @@ value_static_field (struct type *type, int fieldno) /* SYM should never have a SYMBOL_CLASS which will require read_var_value to use the FRAME parameter. */ if (symbol_read_needs_frame (sym)) - warning ("static field's value depends on the current " - "frame - bad debug info?"); + warning (_("static field's value depends on the current " + "frame - bad debug info?")); retval = read_var_value (sym, NULL); } if (retval && VALUE_LVAL (retval) == lval_memory) @@ -1400,7 +1400,7 @@ modify_field (char *addr, LONGEST fieldval, int bitpos, int bitsize) { /* FIXME: would like to include fieldval in the message, but we don't have a sprintf_longest. */ - warning ("Value does not fit in %d bits.", bitsize); + warning (_("Value does not fit in %d bits."), bitsize); /* Truncate it, otherwise adjoining fields may be corrupted. */ fieldval &= mask; @@ -1449,7 +1449,7 @@ retry: break; default: - error ("Unexpected type (%d) encountered for integer constant.", code); + error (_("Unexpected type (%d) encountered for integer constant."), code); } return val; } @@ -1507,7 +1507,7 @@ value_from_double (struct type *type, DOUBLEST num) store_typed_floating (value_contents_raw (val), base_type, num); } else - error ("Unexpected type encountered for floating constant."); + error (_("Unexpected type encountered for floating constant.")); return val; } @@ -1589,7 +1589,7 @@ using_struct_return (struct type *value_type, int gcc_p) enum type_code code = TYPE_CODE (value_type); if (code == TYPE_CODE_ERROR) - error ("Function return type unknown."); + error (_("Function return type unknown.")); if (code == TYPE_CODE_VOID) /* A void return value is never in memory. See also corresponding diff --git a/gdb/varobj.c b/gdb/varobj.c index 818a31b..4b93161 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -576,7 +576,7 @@ varobj_get_handle (char *objname) cv = cv->next; if (cv == NULL) - error ("Variable object not found"); + error (_("Variable object not found")); return cv->var; } @@ -635,7 +635,7 @@ varobj_delete (struct varobj *var, char ***dellist, int only_children) } if (mycount || (*cp != NULL)) - warning ("varobj_delete: assertion failed - mycount(=%d) <> 0", + warning (_("varobj_delete: assertion failed - mycount(=%d) <> 0"), mycount); } @@ -1011,7 +1011,7 @@ varobj_update (struct varobj **varp, struct varobj ***changelist) *cv = vpop (&result); } if (vleft) - warning ("varobj_update: assertion failed - vleft <> 0"); + warning (_("varobj_update: assertion failed - vleft <> 0")); if (changed > 1) { @@ -1123,7 +1123,7 @@ install_variable (struct varobj *var) cv = cv->next; if (cv != NULL) - error ("Duplicate variable object name"); + error (_("Duplicate variable object name")); /* Add varobj to hash table */ newvl = xmalloc (sizeof (struct vlist)); @@ -2025,7 +2025,7 @@ c_type_of_child (struct varobj *parent, int index) default: /* This should not happen as only the above types have children */ - warning ("Child of parent whose type does not allow children"); + warning (_("Child of parent whose type does not allow children")); /* FIXME: Can we still go on? */ type = NULL; break; diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 6063ab1..1ec3b83 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -478,14 +478,14 @@ psapi_get_dll_name (DWORD BaseAddress, char *dll_name_ret) DllHandle[i], &mi, sizeof (mi))) - error ("Can't get module info"); + error (_("Can't get module info")); len = (*psapi_GetModuleFileNameExA) (current_process_handle, DllHandle[i], dll_name_ret, MAX_PATH); if (len == 0) - error ("Error getting dll name: %u\n", (unsigned) GetLastError ()); + error (_("Error getting dll name: %u."), (unsigned) GetLastError ()); if ((DWORD) (mi.lpBaseOfDll) == BaseAddress) return 1; @@ -718,7 +718,7 @@ handle_unload_dll (void *dummy) xfree(sodel); return 1; } - error ("Error: dll starting at 0x%lx not found.\n", (DWORD) lpBaseOfDll); + error (_("Error: dll starting at 0x%lx not found."), (DWORD) lpBaseOfDll); return 0; } @@ -874,7 +874,7 @@ dll_symbol_command (char *args, int from_tty) dont_repeat (); if (args == NULL) - error ("dll-symbols requires a file name"); + error (_("dll-symbols requires a file name")); n = strlen (args); if (n > 4 && strcasecmp (args + n - 4, ".dll") != 0) @@ -921,7 +921,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus) if (strncmp (s, CYGWIN_SIGNAL_STRING, sizeof (CYGWIN_SIGNAL_STRING) - 1) != 0) { if (strncmp (s, "cYg", 3) != 0) - warning ("%s", s); + warning (("%s"), s); } else { @@ -1600,7 +1600,7 @@ child_attach (char *args, int from_tty) ok = DebugActiveProcess (pid); if (!ok) - error ("Can't attach to process."); + error (_("Can't attach to process.")); } if (has_detach_ability ()) @@ -1637,7 +1637,7 @@ child_detach (char *args, int from_tty) child_continue (DBG_CONTINUE, -1); if (!DebugActiveProcessStop (current_event.dwProcessId)) { - error ("Can't detach process %lu (error %lu)", + error (_("Can't detach process %lu (error %lu)"), current_event.dwProcessId, GetLastError ()); detached = 0; } @@ -1698,7 +1698,7 @@ child_files_info (struct target_ops *ignore) static void child_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } /* Start an inferior win32 child process and sets inferior_ptid to its pid. @@ -1727,7 +1727,7 @@ child_create_inferior (char *exec_file, char *allargs, char **env, int ostdin, ostdout, ostderr; if (!exec_file) - error ("No executable specified, use `target exec'.\n"); + error (_("No executable specified, use `target exec'.")); memset (&si, 0, sizeof (si)); si.cb = sizeof (si); @@ -1882,7 +1882,8 @@ child_create_inferior (char *exec_file, char *allargs, char **env, } if (!ret) - error ("Error creating process %s, (error %d)\n", exec_file, (unsigned) GetLastError ()); + error (_("Error creating process %s, (error %d)."), + exec_file, (unsigned) GetLastError ()); CloseHandle (pi.hThread); CloseHandle (pi.hProcess); @@ -2442,7 +2443,7 @@ fetch_elf_core_registers (char *core_reg_sect, int r; if (core_reg_size < sizeof (CONTEXT)) { - 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; } for (r = 0; r < NUM_REGS; r++) @@ -2488,7 +2489,7 @@ _initialize_check_for_gdb_ini (void) char *newini = alloca (len + 1); sprintf (newini, "%.*s.gdbinit", (int) (len - (sizeof ("gdb.ini") - 1)), oldini); - warning ("obsolete '%s' found. Rename to '%s'.", oldini, newini); + warning (_("obsolete '%s' found. Rename to '%s'."), oldini, newini); } } } diff --git a/gdb/wince.c b/gdb/wince.c index e1f56c5..8c9be07 100644 --- a/gdb/wince.c +++ b/gdb/wince.c @@ -432,7 +432,7 @@ vstub_error (LPCSTR fmt, va_list * args) char buf[4096]; vsprintf (buf, fmt, args); s = -1; - error ("%s", buf); + error (("%s"), buf); } /* The standard way to display an error message and exit. */ @@ -1568,7 +1568,7 @@ child_files_info (struct target_ops *ignore) static void child_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a child process."); + error (_("Use the \"run\" command to start a child process.")); } #define FACTOR (0x19db1ded53ea710LL) @@ -1615,7 +1615,7 @@ upload_to_device (const char *to, const char *from) to = p + 1; if (!*to) - error ("no filename found to upload - %s.", in_to); + error (_("no filename found to upload - %s."), in_to); len = strlen (dir) + strlen (to) + 2; remotefile = (char *) xrealloc (remotefile, len); @@ -1629,7 +1629,7 @@ upload_to_device (const char *to, const char *from) /* Open the source. */ if ((fd = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, (char *) from, O_RDONLY, 0, NULL)) < 0) - error ("couldn't open %s", from); + error (_("couldn't open %s"), from); /* Get the time for later comparison. */ if (fstat (fd, &st)) @@ -1647,7 +1647,7 @@ upload_to_device (const char *to, const char *from) /* Some kind of problem? */ err = CeGetLastError (); if (h == NULL || h == INVALID_HANDLE_VALUE) - error ("error opening file \"%s\". Windows error %d.", + error (_("error opening file \"%s\". Windows error %d."), remotefile, err); CeGetFileTime (h, &crtime, &actime, &wrtime); @@ -1673,13 +1673,13 @@ upload_to_device (const char *to, const char *from) /* Upload the file. */ while ((n = read (fd, buf, sizeof (buf))) > 0) if (!CeWriteFile (h, buf, (DWORD) n, &nbytes, NULL)) - error ("error writing to remote device - %d.", + error (_("error writing to remote device - %d."), CeGetLastError ()); } close (fd); if (!CeCloseHandle (h)) - error ("error closing remote file - %d.", CeGetLastError ()); + error (_("error closing remote file - %d."), CeGetLastError ()); return remotefile; } @@ -1704,8 +1704,7 @@ wince_initialize (void) break; default: CeRapiUninit (); - error ("Can't initialize connection to remote device.\n"); - break; + error (_("Can't initialize connection to remote device.")); } /* Upload the stub to the handheld device. */ @@ -1717,7 +1716,7 @@ wince_initialize (void) strcat (args, " "); hostname = strchr (args, '\0'); if (gethostname (hostname, sizeof (args) - strlen (args))) - error ("couldn't get hostname of this system."); + error (_("couldn't get hostname of this system.")); } /* Get a socket. */ @@ -1736,23 +1735,23 @@ wince_initialize (void) sin.sin_port = htons (7000); /* FIXME: This should be configurable. */ if (bind (s0, (struct sockaddr *) &sin, sizeof (sin))) - error ("couldn't bind socket"); + error (_("couldn't bind socket")); if (listen (s0, 1)) - error ("Couldn't open socket for listening.\n"); + error (_("Couldn't open socket for listening.")); /* Start up the stub on the remote device. */ if (!CeCreateProcess (towide (stub_file_name, NULL), towide (args, NULL), NULL, NULL, 0, 0, NULL, NULL, NULL, &pi)) - error ("Unable to start remote stub '%s'. Windows CE error %d.", + error (_("Unable to start remote stub '%s'. Windows CE error %d."), stub_file_name, CeGetLastError ()); /* Wait for a connection */ if ((s = accept (s0, NULL, NULL)) < 0) - error ("couldn't set up server for connection."); + error (_("couldn't set up server for connection.")); close (s0); } @@ -1773,7 +1772,7 @@ child_create_inferior (char *exec_file, char *args, char **env, char *exec_and_args; if (!exec_file) - error ("No executable specified, use `target exec'.\n"); + error (_("No executable specified, use `target exec'.")); flags = DEBUG_PROCESS; @@ -1799,7 +1798,7 @@ child_create_inferior (char *exec_file, char *args, char **env, memset (&pi, 0, sizeof (pi)); /* Execute the process. */ if (!create_process (exec_file, exec_and_args, flags, &pi)) - error ("Error creating process %s, (error %d)\n", + error (_("Error creating process %s, (error %d)."), exec_file, GetLastError ()); exception_count = 0; @@ -2012,7 +2011,7 @@ set_upload_type (char *ignore, int from_tty) bad_option = remote_upload; replace_upload (UPLOAD_NEWER); - error ("Unknown upload type: %s.", bad_option); + error (_("Unknown upload type: %s."), bad_option); } void diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 6063ab1..1ec3b83 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -478,14 +478,14 @@ psapi_get_dll_name (DWORD BaseAddress, char *dll_name_ret) DllHandle[i], &mi, sizeof (mi))) - error ("Can't get module info"); + error (_("Can't get module info")); len = (*psapi_GetModuleFileNameExA) (current_process_handle, DllHandle[i], dll_name_ret, MAX_PATH); if (len == 0) - error ("Error getting dll name: %u\n", (unsigned) GetLastError ()); + error (_("Error getting dll name: %u."), (unsigned) GetLastError ()); if ((DWORD) (mi.lpBaseOfDll) == BaseAddress) return 1; @@ -718,7 +718,7 @@ handle_unload_dll (void *dummy) xfree(sodel); return 1; } - error ("Error: dll starting at 0x%lx not found.\n", (DWORD) lpBaseOfDll); + error (_("Error: dll starting at 0x%lx not found."), (DWORD) lpBaseOfDll); return 0; } @@ -874,7 +874,7 @@ dll_symbol_command (char *args, int from_tty) dont_repeat (); if (args == NULL) - error ("dll-symbols requires a file name"); + error (_("dll-symbols requires a file name")); n = strlen (args); if (n > 4 && strcasecmp (args + n - 4, ".dll") != 0) @@ -921,7 +921,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus) if (strncmp (s, CYGWIN_SIGNAL_STRING, sizeof (CYGWIN_SIGNAL_STRING) - 1) != 0) { if (strncmp (s, "cYg", 3) != 0) - warning ("%s", s); + warning (("%s"), s); } else { @@ -1600,7 +1600,7 @@ child_attach (char *args, int from_tty) ok = DebugActiveProcess (pid); if (!ok) - error ("Can't attach to process."); + error (_("Can't attach to process.")); } if (has_detach_ability ()) @@ -1637,7 +1637,7 @@ child_detach (char *args, int from_tty) child_continue (DBG_CONTINUE, -1); if (!DebugActiveProcessStop (current_event.dwProcessId)) { - error ("Can't detach process %lu (error %lu)", + error (_("Can't detach process %lu (error %lu)"), current_event.dwProcessId, GetLastError ()); detached = 0; } @@ -1698,7 +1698,7 @@ child_files_info (struct target_ops *ignore) static void child_open (char *arg, int from_tty) { - error ("Use the \"run\" command to start a Unix child process."); + error (_("Use the \"run\" command to start a Unix child process.")); } /* Start an inferior win32 child process and sets inferior_ptid to its pid. @@ -1727,7 +1727,7 @@ child_create_inferior (char *exec_file, char *allargs, char **env, int ostdin, ostdout, ostderr; if (!exec_file) - error ("No executable specified, use `target exec'.\n"); + error (_("No executable specified, use `target exec'.")); memset (&si, 0, sizeof (si)); si.cb = sizeof (si); @@ -1882,7 +1882,8 @@ child_create_inferior (char *exec_file, char *allargs, char **env, } if (!ret) - error ("Error creating process %s, (error %d)\n", exec_file, (unsigned) GetLastError ()); + error (_("Error creating process %s, (error %d)."), + exec_file, (unsigned) GetLastError ()); CloseHandle (pi.hThread); CloseHandle (pi.hProcess); @@ -2442,7 +2443,7 @@ fetch_elf_core_registers (char *core_reg_sect, int r; if (core_reg_size < sizeof (CONTEXT)) { - 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; } for (r = 0; r < NUM_REGS; r++) @@ -2488,7 +2489,7 @@ _initialize_check_for_gdb_ini (void) char *newini = alloca (len + 1); sprintf (newini, "%.*s.gdbinit", (int) (len - (sizeof ("gdb.ini") - 1)), oldini); - warning ("obsolete '%s' found. Rename to '%s'.", oldini, newini); + warning (_("obsolete '%s' found. Rename to '%s'."), oldini, newini); } } } diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 4ecd0a2..0805f80 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1880,7 +1880,7 @@ init_stringtab (bfd *abfd, file_ptr offset, struct objfile *objfile) ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl = NULL; if (bfd_seek (abfd, offset, SEEK_SET) < 0) - error ("cannot seek to string table in %s: %s", + error (_("cannot seek to string table in %s: %s"), bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); val = bfd_bread ((char *) lengthbuf, sizeof lengthbuf, abfd); @@ -1907,10 +1907,10 @@ init_stringtab (bfd *abfd, file_ptr offset, struct objfile *objfile) val = bfd_bread (strtbl + sizeof lengthbuf, length - sizeof lengthbuf, abfd); if (val != length - sizeof lengthbuf) - error ("cannot read string table from %s: %s", + error (_("cannot read string table from %s: %s"), bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); if (strtbl[length - 1] != '\0') - error ("bad symbol file: string table does not end with null character"); + error (_("bad symbol file: string table does not end with null character")); return; } @@ -2292,7 +2292,7 @@ scan_xcoff_symtab (struct objfile *objfile) case XMC_TC0: if (toc_offset) - warning ("More than one XMC_TC0 symbol found."); + warning (_("More than one XMC_TC0 symbol found.")); toc_offset = symbol.n_value; /* Make TOC offset relative to start address of section. */ @@ -2893,7 +2893,7 @@ xcoff_initial_scan (struct objfile *objfile, int mainline) if (!bfd_get_section_contents (abfd, secp, debugsec, (file_ptr) 0, length)) { - error ("Error reading .debug section of `%s': %s", + error (_("Error reading .debug section of `%s': %s"), name, bfd_errmsg (bfd_get_error ())); } } @@ -2907,7 +2907,7 @@ xcoff_initial_scan (struct objfile *objfile, int mainline) access them randomly in read_symbol*. */ val = bfd_seek (abfd, symtab_offset, SEEK_SET); if (val < 0) - error ("Error reading symbols from %s: %s", + error (_("Error reading symbols from %s: %s"), name, bfd_errmsg (bfd_get_error ())); size = coff_data (abfd)->local_symesz * num_symbols; ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl = diff --git a/gdb/xcoffsolib.c b/gdb/xcoffsolib.c index 9dcc3c4..9cf293b 100644 --- a/gdb/xcoffsolib.c +++ b/gdb/xcoffsolib.c @@ -109,7 +109,7 @@ sharedlibrary_command (char *pattern, int from_tty) char *re_err = re_comp (pattern); if (re_err) - error ("Invalid regexp: %s", re_err); + error (_("Invalid regexp: %s"), re_err); } /* Walk the list of currently loaded shared libraries, and read |