]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] Add missing i18n support to warning strings (part 1)
authorTom de Vries <tdevries@suse.de>
Tue, 9 Jun 2026 20:14:07 +0000 (22:14 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 9 Jun 2026 20:14:07 +0000 (22:14 +0200)
Add missing i18n support to some warning strings.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.cc" \
    | egrep -v /testsuite/ \
    | xargs sed -i \
        's/\([ \t]\)warning (\("[^"]*"\));/\1warning (_(\2));/'
...

Approved-By: Tom Tromey <tom@tromey.com>
gdb/elfread.c
gdb/nat/fork-inferior.c
gdbserver/linux-low.cc
gdbserver/mem-break.cc
gdbserver/thread-db.cc
gdbserver/tracepoint.cc

index 7e2f4fe8f3f60923664a049a75c07e690841a053..fd4d045d27a3c654a65fb4353d0e47163702e909 100644 (file)
@@ -1281,10 +1281,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
      an included file XCOFF info is useless.  */
 
   if (ei.mdebugsect)
-    warning ("mdebug debug information is not supported.");
+    warning (_("mdebug debug information is not supported."));
 
   if (ei.stabsect)
-    warning ("stabs debug information is not supported.");
+    warning (_("stabs debug information is not supported."));
 
   /* Read the CTF section only if there is no DWARF info.  */
   if (always_read_ctf && ei.ctfsect)
index e25eb778d34d12f5668403ba4ff9b815952b1c04..8718d2d43dedae7ff65beeef09679cfb959f1c95 100644 (file)
@@ -526,7 +526,7 @@ trace_start_error (const char *fmt, ...)
   va_list ap;
 
   va_start (ap, fmt);
-  warning ("Could not trace the inferior process.");
+  warning (_("Could not trace the inferior process."));
   vwarning (fmt, ap);
   va_end (ap);
 
index d3a8a7c1f8547c4fb40ab3f536eff8b1fb94e8d7..ac1cf8ca4b30a208b710679742cac74f3f751029 100644 (file)
@@ -4077,7 +4077,7 @@ linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step,
          if (fast_tp_collecting == fast_tpoint_collect_result::not_collecting)
            {
              if (step == 0)
-               warning ("BAD - reinserting but not stepping.");
+               warning (_("BAD - reinserting but not stepping."));
              if (lwp->suspended)
                warning ("BAD - reinserting and suspended(%d).",
                                 lwp->suspended);
@@ -5894,7 +5894,7 @@ linux_process_target::async (bool enable)
            {
              gdb_sigmask (SIG_UNBLOCK, &mask, NULL);
 
-             warning ("creating event pipe failed.");
+             warning (_("creating event pipe failed."));
              return previous;
            }
 
index 134a856a3db72065f8f160389b986fd3829c0b4b..4e944ff1df2e5b8d213f650b3d8ea37f64387dab 100644 (file)
@@ -604,7 +604,7 @@ delete_fast_tracepoint_jump (struct fast_tracepoint_jump *todel)
        }
     }
 
-  warning ("Could not find fast tracepoint jump in list.");
+  warning (_("Could not find fast tracepoint jump in list."));
   return ENOENT;
 }
 
@@ -902,7 +902,7 @@ delete_raw_breakpoint (struct process_info *proc, struct raw_breakpoint *todel)
        }
     }
 
-  warning ("Could not find raw breakpoint in list.");
+  warning (_("Could not find raw breakpoint in list."));
   return ENOENT;
 }
 
@@ -956,7 +956,7 @@ delete_breakpoint_1 (struct process_info *proc, struct breakpoint *todel)
        }
     }
 
-  warning ("Could not find breakpoint in list.");
+  warning (_("Could not find breakpoint in list."));
   return ENOENT;
 }
 
@@ -1206,7 +1206,7 @@ add_breakpoint_condition (struct gdb_breakpoint *bp, const char **condition)
 
   if (cond == NULL)
     {
-      warning ("Condition evaluation failed. Assuming unconditional.");
+      warning (_("Condition evaluation failed. Assuming unconditional."));
       return 0;
     }
 
@@ -1305,7 +1305,7 @@ add_breakpoint_commands (struct gdb_breakpoint *bp, const char **command,
 
   if (cmd == NULL)
     {
-      warning ("Command evaluation failed. Disabling.");
+      warning (_("Command evaluation failed. Disabling."));
       return 0;
     }
 
@@ -1653,7 +1653,7 @@ check_breakpoints (CORE_ADDR stop_pc)
        {
          if (!raw->inserted)
            {
-             warning ("Hit a removed breakpoint?");
+             warning (_("Hit a removed breakpoint?"));
              return;
            }
 
index 24b7c84d90726c0f6e5fa6704fd475bc11e2b62b..96ad2ae28d01001614c7df0ff042a72e3cf56d94 100644 (file)
@@ -884,5 +884,5 @@ thread_db_notice_clone (thread_info *parent_thr, ptid_t child_ptid)
   switch_to_thread (parent_thr);
 
   if (!find_one_thread (child_ptid))
-    warning ("Cannot find thread after clone.");
+    warning (_("Cannot find thread after clone."));
 }
index 9ffab6c24e42831d18973fa21022aa1384478f27..e86d3dc0c20d57676d0ad774e04136f4b6f40723 100644 (file)
@@ -5197,7 +5197,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
       tpoint = fast_tracepoint_from_jump_pad_address (stop_pc);
       if (tpoint == NULL)
        {
-         warning ("in jump pad, but no matching tpoint?");
+         warning (_("in jump pad, but no matching tpoint?"));
          return fast_tpoint_collect_result::not_collecting;
        }
       else
@@ -5225,7 +5225,7 @@ fast_tracepoint_collecting (CORE_ADDR thread_area,
       tpoint = fast_tracepoint_from_trampoline_address (stop_pc);
       if (tpoint == NULL)
        {
-         warning ("in trampoline, but no matching tpoint?");
+         warning (_("in trampoline, but no matching tpoint?"));
          return fast_tpoint_collect_result::not_collecting;
        }
       else
@@ -6279,7 +6279,7 @@ gdb_agent_helper_thread (void *arg)
 
       if (listen_fd == -1)
        {
-         warning ("could not create sync socket");
+         warning (_("could not create sync socket"));
          break;
        }