return frame_unwind_got_constant (this_frame, regnum, lr);
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unexpected register %d"), regnum);
+      internal_error (_("Unexpected register %d"), regnum);
     }
 }
 
   if (tdep->has_pauth () && regnum == tdep->ra_sign_state_regnum)
     return "";
 
-  internal_error (__FILE__, __LINE__,
-                 _("aarch64_pseudo_register_name: bad register number %d"),
+  internal_error (_("aarch64_pseudo_register_name: bad register number %d"),
                  p_regnum);
 }
 
   if (tdep->has_pauth () && regnum == tdep->ra_sign_state_regnum)
     return builtin_type (gdbarch)->builtin_uint64;
 
-  internal_error (__FILE__, __LINE__,
-                 _("aarch64_pseudo_register_type: bad register number %d"),
+  internal_error (_("aarch64_pseudo_register_type: bad register number %d"),
                  p_regnum);
 }
 
   uint64_t vq = aarch64_get_tdesc_vq (info.target_desc);
 
   if (vq > AARCH64_MAX_SVE_VQ)
-    internal_error (__FILE__, __LINE__, _("VQ out of bounds: %s (max %d)"),
+    internal_error (_("VQ out of bounds: %s (max %d)"),
                    pulongest (vq), AARCH64_MAX_SVE_VQ);
 
   /* If there is already a candidate, use it.  */
 
              write_selectors (par_state, encoded_name + tail_index);
              return NULL;
            default:
-             internal_error (__FILE__, __LINE__,
-                             _("impossible value from ada_parse_renaming"));
+             internal_error (_("impossible value from ada_parse_renaming"));
            }
 
          if (type_sym != NULL)
 
        break;
 
       default:
-       internal_error (__FILE__, __LINE__, _("unexpected catchpoint type"));
+       internal_error (_("unexpected catchpoint type"));
        break;
     }
 
        break;
 
       default:
-       internal_error (__FILE__, __LINE__, _("unexpected catchpoint type"));
+       internal_error (_("unexpected catchpoint type"));
        break;
     }
 
        break;
 
       default:
-       internal_error (__FILE__, __LINE__, _("unexpected catchpoint type"));
+       internal_error (_("unexpected catchpoint type"));
        break;
     }
 }
        break;
 
       default:
-       internal_error (__FILE__, __LINE__, _("unexpected catchpoint type"));
+       internal_error (_("unexpected catchpoint type"));
     }
   print_recreate_thread (fp);
 }
        return (data->exception_info->catch_handlers_sym);
        break;
       default:
-       internal_error (__FILE__, __LINE__,
-                       _("unexpected catchpoint kind (%d)"), ex);
+       internal_error (_("unexpected catchpoint kind (%d)"), ex);
     }
 }
 
 
 addrmap_fixed::set_empty (CORE_ADDR start, CORE_ADDR end_inclusive,
                          void *obj)
 {
-  internal_error (__FILE__, __LINE__,
-                 "addrmap_fixed_set_empty: "
+  internal_error ("addrmap_fixed_set_empty: "
                  "fixed addrmaps can't be changed\n");
 }
 
 addrmap_mutable::relocate (CORE_ADDR offset)
 {
   /* Not needed yet.  */
-  internal_error (__FILE__, __LINE__,
-                 _("addrmap_relocate is not implemented yet "
+  internal_error (_("addrmap_relocate is not implemented yet "
                    "for mutable addrmaps"));
 }
 
 
          break;
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("unknown floating point width"));
+         internal_error (_("unknown floating point width"));
        }
       break;
 
          break;
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("unknown floating point width"));
+         internal_error (_("unknown floating point width"));
        }
       break;
 
          error (_("Cannot set a 128-bit long double return value."));
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("unknown floating point width"));
+         internal_error (_("unknown floating point width"));
        }
       break;
 
          error (_("Cannot set a 128-bit long double return value."));
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("unknown floating point width"));
+         internal_error (_("unknown floating point width"));
        }
       break;
 
 
       }
 
     /* We shouldn't get here.  */
-    internal_error (__FILE__, __LINE__, _("unable to find free reg"));
+    internal_error (_("unable to find free reg"));
   }
 }
 
 
     case bfd_mach_arc_arcv2:
       return ARC_ISA_ARCV2;
     default:
-       internal_error (__FILE__, __LINE__,
-                       _("unknown machine id %lu"), mach);
+       internal_error (_("unknown machine id %lu"), mach);
     }
 }
 
       else if (eclass == ELFCLASS64)
        reg_size = 8;
       else
-       internal_error (__FILE__, __LINE__,
-                       _("unknown ELF header class %d"), eclass);
+       internal_error (_("unknown ELF header class %d"), eclass);
     }
 
   /* MACH from a bfd_arch_info struct is used here.  It should be a safe
 
   else
     /* Should this be an internal error?  I guess so, it is reflecting
        an architectural limitation in the current design.  */
-    internal_error (__FILE__, __LINE__, 
-                   _("No virtual frame pointer available"));
+    internal_error (_("No virtual frame pointer available"));
   *frame_offset = 0;
 }
 
     {
       target_byte_order_user = BFD_ENDIAN_UNKNOWN;
       if (! gdbarch_update_p (info))
-       internal_error (__FILE__, __LINE__,
-                       _("set_endian: architecture update failed"));
+       internal_error (_("set_endian: architecture update failed"));
     }
   else if (set_endian_string == endian_little)
     {
        target_byte_order_user = BFD_ENDIAN_BIG;
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("set_endian: bad value"));
+    internal_error (_("set_endian: bad value"));
 
   show_endian (gdb_stdout, from_tty, NULL, NULL);
 }
     {
       target_architecture_user = NULL;
       if (!gdbarch_update_p (info))
-       internal_error (__FILE__, __LINE__,
-                       _("could not select an architecture automatically"));
+       internal_error (_("could not select an architecture automatically"));
     }
   else
     {
       info.bfd_arch_info = bfd_scan_arch (set_architecture_string);
       if (info.bfd_arch_info == NULL)
-       internal_error (__FILE__, __LINE__,
-                       _("set_architecture: bfd_scan_arch failed"));
+       internal_error (_("set_architecture: bfd_scan_arch failed"));
       if (gdbarch_update_p (info))
        target_architecture_user = info.bfd_arch_info;
       else
        }
 
       if (chosen == NULL)
-       internal_error (__FILE__, __LINE__,
-                       _("initialize_current_architecture: No arch"));
+       internal_error (_("initialize_current_architecture: No arch"));
 
       default_bfd_arch = bfd_scan_arch (chosen);
       if (default_bfd_arch == NULL)
-       internal_error (__FILE__, __LINE__,
-                       _("initialize_current_architecture: Arch not found"));
+       internal_error (_("initialize_current_architecture: Arch not found"));
     }
 
   gdbarch_info info;
   info.byte_order_for_code = info.byte_order;
 
   if (! gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__,
-                   _("initialize_current_architecture: Selection of "
+    internal_error (_("initialize_current_architecture: Selection of "
                      "initial architecture failed"));
 
   /* Create the ``set architecture'' command appending ``auto'' to the
       const struct bfd_arch_info *ap
        = bfd_lookup_arch (rego->bfd_architecture, 0);
       if (ap == nullptr)
-       internal_error (__FILE__, __LINE__,
-                       _("gdbarch_architecture_names: multi-arch unknown"));
+       internal_error (_("gdbarch_architecture_names: multi-arch unknown"));
       do
        {
          arches.push_back (ap->printable_name);
   bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
   if (bfd_arch_info == NULL)
     {
-      internal_error (__FILE__, __LINE__,
-                     _("gdbarch: Attempt to register "
+      internal_error (_("gdbarch: Attempt to register "
                        "unknown architecture (%d)"),
                      bfd_architecture);
     }
        curr = &(*curr)->next)
     {
       if (bfd_architecture == (*curr)->bfd_architecture)
-       internal_error (__FILE__, __LINE__,
-                       _("gdbarch: Duplicate registration "
+       internal_error (_("gdbarch: Duplicate registration "
                          "of architecture (%s)"),
                        bfd_arch_info->printable_name);
     }
 
        return 0;
 
       default:
-       internal_error (__FILE__, __LINE__, _("bad value in switch"));
+       internal_error (_("bad value in switch"));
       }
 }
 
 
       break;
     default:
       internal_error
-       (__FILE__, __LINE__,
-        _("arm_linux_init_abi: Floating point model not supported"));
+       (_("arm_linux_init_abi: Floating point model not supported"));
       break;
     }
   tdep->jb_elt_size = ARM_LINUX_JB_ELEMENT_SIZE;
 
       break;
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("arm_gdbarch_init: bad byte order for float format"));
+      internal_error (_("arm_gdbarch_init: bad byte order for float format"));
     }
 
   tdep->jb_pc = ARM_NBSD_JB_PC;
 
       return cache;
     }
 
-  internal_error (__FILE__, __LINE__, _("While unwinding an exception frame, "
-                                       "found unexpected Link Register value "
-                                       "%s.  This should not happen and may "
-                                       "be caused by corrupt data or a bug in"
-                                       " GDB."),
+  internal_error (_("While unwinding an exception frame, "
+                   "found unexpected Link Register value "
+                   "%s.  This should not happen and may "
+                   "be caused by corrupt data or a bug in"
+                   " GDB."),
                  phex (lr, ARM_INT_REGISTER_SIZE));
 }
 
       return frame_unwind_got_constant (this_frame, regnum, val);
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Unexpected register %d"), regnum);
+  internal_error (_("Unexpected register %d"), regnum);
 }
 
 /* Implement the stack_frame_destroyed_p gdbarch method.  */
     case VFP_CPRC_VEC128:
       return 16;
     default:
-      internal_error (__FILE__, __LINE__, _("Invalid VFP CPRC type: %d."),
+      internal_error (_("Invalid VFP CPRC type: %d."),
                      (int) b);
     }
 }
     case VFP_CPRC_VEC128:
       return 'q';
     default:
-      internal_error (__FILE__, __LINE__, _("Invalid VFP CPRC type: %d."),
+      internal_error (_("Invalid VFP CPRC type: %d."),
                      (int) b);
     }
 }
     return SIM_ARM_FPS_REGNUM + reg;
   reg -= NUM_SREGS;
 
-  internal_error (__FILE__, __LINE__, _("Bad REGNUM %d"), regnum);
+  internal_error (_("Bad REGNUM %d"), regnum);
 }
 
 static const unsigned char op_lit0 = DW_OP_lit0;
          break;
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("Invalid argument to displaced_write_reg"));
+         internal_error (_("Invalid argument to displaced_write_reg"));
        }
 
       dsc->wrote_to_pc = 1;
   opcode = ((op2 << 2) | (op1 & 0x1) | ((op1 & 0x4) >> 1)) - 4;
 
   if (opcode < 0)
-    internal_error (__FILE__, __LINE__,
-                   _("copy_extra_ld_st: instruction decode error"));
+    internal_error (_("copy_extra_ld_st: instruction decode error"));
 
   dsc->tmp[0] = displaced_read_reg (regs, dsc, 0);
   dsc->tmp[1] = displaced_read_reg (regs, dsc, 1);
     }
 
   if (err)
-    internal_error (__FILE__, __LINE__,
-                   _("thumb_process_displaced_16bit_insn: Instruction decode error"));
+    internal_error (_("thumb_process_displaced_16bit_insn: Instruction decode error"));
 }
 
 static int
     }
 
   if (err)
-    internal_error (__FILE__, __LINE__,
-                   _("thumb_process_displaced_32bit_insn: Instruction decode error"));
+    internal_error (_("thumb_process_displaced_32bit_insn: Instruction decode error"));
 
 }
 
     }
 
   if (err)
-    internal_error (__FILE__, __LINE__,
-                   _("arm_process_displaced_insn: Instruction decode error"));
+    internal_error (_("arm_process_displaced_insn: Instruction decode error"));
 }
 
 /* Actually set up the scratch space for a displaced instruction.  */
          break;
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("arm_extract_return_value: "
+         internal_error (_("arm_extract_return_value: "
                            "Floating point model not supported"));
          break;
        }
          break;
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("arm_store_return_value: Floating "
+         internal_error (_("arm_store_return_value: Floating "
                            "point model not supported"));
          break;
        }
   /* Update the architecture.  */
   gdbarch_info info;
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("could not update architecture"));
+    internal_error (_("could not update architecture"));
 }
 
 static void
       }
 
   if (fp_model == ARM_FLOAT_LAST)
-    internal_error (__FILE__, __LINE__, _("Invalid fp model accepted: %s."),
+    internal_error (_("Invalid fp model accepted: %s."),
                    current_fp_model);
 
   arm_update_current_architecture ();
       }
 
   if (arm_abi == ARM_ABI_LAST)
-    internal_error (__FILE__, __LINE__, _("Invalid ABI accepted: %s."),
+    internal_error (_("Invalid ABI accepted: %s."),
                    arm_abi_string);
 
   arm_update_current_architecture ();
       break;
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("arm_gdbarch_init: bad byte order for float format"));
+      internal_error (_("arm_gdbarch_init: bad byte order for float format"));
     }
 
   /* On ARM targets char defaults to unsigned.  */
 
       store_unsigned_integer (buf, 4, gdbarch_byte_order (gdbarch), val);
       return status;
     default:
-      internal_error (__FILE__, __LINE__, _("invalid regnum"));
+      internal_error (_("invalid regnum"));
     }
 }
 
       regcache_raw_write_unsigned (regcache, AVR_PC_REGNUM, val);
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("invalid regnum"));
+      internal_error (_("invalid regnum"));
     }
 }
 
 
             implementing something we should be (this code's fault).
             In any case, it's a bug the user shouldn't see.  */
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("gen_fetch: strange size"));
+         internal_error (_("gen_fetch: strange size"));
        }
 
       gen_sign_extend (ax, type);
       break;
 
     case LOC_CONST_BYTES:
-      internal_error (__FILE__, __LINE__,
-                     _("gen_var_ref: LOC_CONST_BYTES "
+      internal_error (_("gen_var_ref: LOC_CONST_BYTES "
                        "symbols are not supported"));
 
       /* Variable at a fixed location in memory.  Easy.  */
   /* The caller should check the type, because several operators use
      this, and we don't know what error message to generate.  */
   if (!value->type->is_pointer_or_reference ())
-    internal_error (__FILE__, __LINE__,
-                   _("gen_deref: expected a pointer"));
+    internal_error (_("gen_deref: expected a pointer"));
 
   /* We've got an rvalue now, which is a pointer.  We want to yield an
      lvalue, whose address is exactly that pointer.  So we don't
 
   /* Can we fetch the number of bits requested at all?  */
   if ((end - start) > ((1 << num_ops) * 8))
-    internal_error (__FILE__, __LINE__,
-                   _("gen_bitfield_ref: bitfield too wide"));
+    internal_error (_("gen_bitfield_ref: bitfield too wide"));
 
   /* Note that we know here that we only need to try each opcode once.
      That may not be true on machines with weird byte sizes.  */
            }
 #if 0 /* is this right? */
          if (this_name[0] == '\0')
-           internal_error (__FILE__, __LINE__,
-                           _("find_field: anonymous unions not supported"));
+           internal_error (_("find_field: anonymous unions not supported"));
 #endif
        }
     }
 
   if (t->code () != TYPE_CODE_STRUCT
       && t->code () != TYPE_CODE_UNION)
-    internal_error (__FILE__, __LINE__,
-                   _("non-aggregate type to gen_struct_elt_for_reference"));
+    internal_error (_("non-aggregate type to gen_struct_elt_for_reference"));
 
   for (i = t->num_fields () - 1; i >= TYPE_N_BASECLASSES (t); i--)
     {
       return gen_namespace_elt (ax, value, type, field);
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("non-aggregate type in gen_aggregate_elt_ref"));
+      internal_error (_("non-aggregate type in gen_aggregate_elt_ref"));
     }
 
   return 0;
 
   reg = user_reg_map_name_to_regnum (ax->gdbarch, name, len);
   if (reg == -1)
-    internal_error (__FILE__, __LINE__,
-                   _("Register $%s not available"), name);
+    internal_error (_("Register $%s not available"), name);
   /* No support for tracing user registers yet.  */
   if (reg >= gdbarch_num_cooked_regs (ax->gdbarch))
     error (_("'%s' is a user-register; "
     default:
       /* We should only list operators in the outer case statement
         that we actually handle in the inner case statement.  */
-      internal_error (__FILE__, __LINE__,
-                     _("gen_expr: op case sets don't match"));
+      internal_error (_("gen_expr: op case sets don't match"));
     }
 }
 
   else
     /* If this `if' chain doesn't handle it, then the case list
        shouldn't mention it, and we shouldn't be here.  */
-    internal_error (__FILE__, __LINE__,
-                   _("gen_expr: unhandled struct case"));
+    internal_error (_("gen_expr: unhandled struct case"));
 }
 
 /* A helper function that emits a unary operation.  */
 
 {
   /* Make sure the tsv number is in range.  */
   if (num < 0 || num > 0xffff)
-    internal_error (__FILE__, __LINE__, 
-                   _("ax-general.c (ax_tsv): variable "
+    internal_error (_("ax-general.c (ax_tsv): variable "
                      "number is %d, out of range"), num);
 
   grow_expr (x, 3);
 
   /* Make sure the string length is reasonable.  */
   if (slen < 0 || slen > 0xffff)
-    internal_error (__FILE__, __LINE__, 
-                   _("ax-general.c (ax_string): string "
+    internal_error (_("ax-general.c (ax_string): string "
                      "length is %d, out of allowed range"), slen);
 
   grow_expr (x, 2 + slen + 1);
 
   enum register_status status;
 
   if (regnum != BFIN_CC_REGNUM)
-    internal_error (__FILE__, __LINE__,
-                   _("invalid register number %d"), regnum);
+    internal_error (_("invalid register number %d"), regnum);
 
   /* Extract the CC bit from the ASTAT register.  */
   status = regcache->raw_read (BFIN_ASTAT_REGNUM, buf);
   gdb_byte buf[BFIN_MAX_REGISTER_SIZE];
 
   if (regnum != BFIN_CC_REGNUM)
-    internal_error (__FILE__, __LINE__,
-                   _("invalid register number %d"), regnum);
+    internal_error (_("invalid register number %d"), regnum);
 
   /* Overlay the CC bit in the ASTAT register.  */
   regcache->raw_read (BFIN_ASTAT_REGNUM, buf);
 
 
       /* It's an internal error if we exit the above loop without finding
         the range.  */
-      internal_error (__FILE__, __LINE__,
-                     _("Entry block not found in find_function_entry_range_from_pc"));
+      internal_error (_("Entry block not found in find_function_entry_range_from_pc"));
     }
 
   return status;
 
       break;
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("print_bp_stop_message: unrecognized enum value"));
+      internal_error (_("print_bp_stop_message: unrecognized enum value"));
       break;
     }
 }
          /* Tracepoint hits should not be reported back to GDB, and
             if one got through somehow, it should have been filtered
             out already.  */
-         internal_error (__FILE__, __LINE__,
-                         _("bpstat_what: tracepoint encountered"));
+         internal_error (_("bpstat_what: tracepoint encountered"));
          break;
        case bp_gnu_ifunc_resolver:
          /* Step over it (and insert bp_gnu_ifunc_resolver_return).  */
          break;
 
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("bpstat_what: unhandled bptype %d"), (int) bptype);
+         internal_error (_("bpstat_what: unhandled bptype %d"), (int) bptype);
        }
 
       retval.main_action = std::max (retval.main_action, this_action);
 
   if (((int) type >= (sizeof (bptypes) / sizeof (bptypes[0])))
       || ((int) type != bptypes[(int) type].type))
-    internal_error (__FILE__, __LINE__,
-                   _("bptypes table does not describe type #%d."),
+    internal_error (_("bptypes table does not describe type #%d."),
                    (int) type);
 
   return bptypes[(int) type].description;
     case bp_static_marker_tracepoint:
       return bp_loc_other;
     default:
-      internal_error (__FILE__, __LINE__, _("unknown breakpoint type"));
+      internal_error (_("unknown breakpoint type"));
     }
 }
 
        }
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid dprintf style."));
+    internal_error (_("Invalid dprintf style."));
 
   gdb_assert (printf_line != NULL);
 
       tuple_name = "hw-awpt";
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid hardware watchpoint type."));
+      internal_error (_("Invalid hardware watchpoint type."));
     }
 
   ui_out_emit_tuple tuple_emitter (uiout, tuple_name);
       gdb_printf (fp, "awatch");
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid watchpoint type."));
+      internal_error (_("Invalid watchpoint type."));
     }
 
   gdb_printf (fp, " %s", exp_string.get ());
           async_reason_lookup (EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER));
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid hardware watchpoint type."));
+      internal_error (_("Invalid hardware watchpoint type."));
     }
 
   mention (b);
       tuple_name = "hw-awpt";
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid hardware watchpoint type."));
+      internal_error (_("Invalid hardware watchpoint type."));
     }
 
   ui_out_emit_tuple tuple_emitter (uiout, tuple_name);
       gdb_printf (fp, "awatch");
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid hardware watchpoint type."));
+      internal_error (_("Invalid hardware watchpoint type."));
     }
 
   gdb_printf (fp, " %s mask 0x%s", exp_string.get (),
   else if (type == bp_hardware_breakpoint)
     gdb_printf (fp, "hbreak");
   else
-    internal_error (__FILE__, __LINE__,
-                   _("unhandled breakpoint type %d"), (int) type);
+    internal_error (_("unhandled breakpoint type %d"), (int) type);
 
   gdb_printf (fp, " %s", locspec->to_string ());
 
       gdb_printf (_(" %d"), number);
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("unhandled tracepoint type %d"), (int) type);
+      internal_error (_("unhandled tracepoint type %d"), (int) type);
     }
 
   say_where (this);
   else if (type == bp_tracepoint)
     gdb_printf (fp, "trace");
   else
-    internal_error (__FILE__, __LINE__,
-                   _("unhandled tracepoint type %d"), (int) type);
+    internal_error (_("unhandled tracepoint type %d"), (int) type);
 
   gdb_printf (fp, " %s", locspec->to_string ());
   print_recreate_thread (fp);
 
                          const struct btrace_data_pt *btrace,
                          std::vector<unsigned int> &gaps)
 {
-  internal_error (__FILE__, __LINE__, _("Unexpected branch trace format."));
+  internal_error (_("Unexpected branch trace format."));
 }
 
 #endif /* defined (HAVE_LIBIPT)  */
       return;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unknown branch trace format."));
+  internal_error (_("Unknown branch trace format."));
 }
 
 static void
       return -1;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unknown branch trace format."));
+  internal_error (_("Unknown branch trace format."));
 }
 
 /* Clear the branch trace histories in BTINFO.  */
 
                                  break;
                                default:
                                  /* internal error */
-                                 internal_error (__FILE__, __LINE__,
-                                                 "unrecognized type in string concatenation");
+                                 internal_error ("unrecognized type in string concatenation");
                                }
                            }
 
     default:
       return NAME;
     }
-  internal_error (__FILE__, __LINE__, _("not reached"));
+  internal_error (_("not reached"));
 }
 
 /* The outer level of a two-level lexer.  This calls the inner lexer
 
       else
        return "UTF-32LE";
     }
-  internal_error (__FILE__, __LINE__, _("unhandled c_string_type"));
+  internal_error (_("unhandled c_string_type"));
 }
 
 /* Classify ELTTYPE according to what kind of character it is.  Return
       type = lookup_typename (exp->language_defn, "char32_t", NULL, 0);
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("unhandled c_string_type"));
+      internal_error (_("unhandled c_string_type"));
     }
 
   /* Ensure TYPE_LENGTH is valid for TYPE.  */
 
          break;
        default:
          /* Should never come here as hookc would be 0.  */
-         internal_error (__FILE__, __LINE__, _("bad switch"));
+         internal_error (_("bad switch"));
        }
     }
 }
 script_from_file (FILE *stream, const char *file)
 {
   if (stream == NULL)
-    internal_error (__FILE__, __LINE__, _("called with NULL file pointer!"));
+    internal_error (_("called with NULL file pointer!"));
 
   scoped_restore restore_line_number
     = make_scoped_restore (&source_line_number, 0);
 
   if (aux_entry->x_file.x_n.x_n.x_zeroes == 0)
     {
       if (strlen (stringtab + aux_entry->x_file.x_n.x_n.x_offset) >= BUFSIZ)
-       internal_error (__FILE__, __LINE__, _("coff file name too long"));
+       internal_error (_("coff file name too long"));
       strcpy (buffer, stringtab + aux_entry->x_file.x_n.x_n.x_offset);
     }
   else
 
       mode = "DI";
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("Invalid GCC mode size %d."), size);
+      internal_error (_("Invalid GCC mode size %d."), size);
     }
 
   return mode;
 
                 sym.symbol->print_name ());
 
        case LOC_UNDEF:
-         internal_error (__FILE__, __LINE__, _("LOC_UNDEF found for \"%s\"."),
+         internal_error (_("LOC_UNDEF found for \"%s\"."),
                          sym.symbol->print_name ());
 
        case LOC_COMMON_BLOCK:
 
                 sym.symbol->print_name ());
 
        case LOC_UNDEF:
-         internal_error (__FILE__, __LINE__, _("LOC_UNDEF found for \"%s\"."),
+         internal_error (_("LOC_UNDEF found for \"%s\"."),
                          sym.symbol->print_name ());
 
        case LOC_COMMON_BLOCK:
 
              /* This shouldn't happen since we are not attempting to
                 loop over user input.  This name is generated by GDB
                 from debug info.  */
-             internal_error (__FILE__, __LINE__,
-                             _("malformed TYPE_NAME during parsing"));
+             internal_error (_("malformed TYPE_NAME during parsing"));
            }
        }
     }
 
       expect_return_type = builtin_type (target_gdbarch ())->builtin_void;
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("invalid scope %d"), scope);
+      internal_error (_("invalid scope %d"), scope);
     }
   if (func_type->num_fields () != expect_parameters)
     error (_("Invalid %d parameters of function \"%s\" in compiled "
 
       return string_printf (_("Memory at address %s unavailable."),
                            paddress (gdbarch, memaddr));
     default:
-      internal_error (__FILE__, __LINE__,
-                     "unhandled target_xfer_status: %s (%s)",
+      internal_error ("unhandled target_xfer_status: %s (%s)",
                      target_xfer_status_to_string (err),
                      plongest (err));
     }
 
 register_cp_abi (struct cp_abi_ops *abi)
 {
   if (num_cp_abis == CP_ABI_MAX)
-    internal_error (__FILE__, __LINE__,
-                   _("Too many C++ ABIs, please increase "
+    internal_error (_("Too many C++ ABIs, please increase "
                      "CP_ABI_MAX in cp-abi.c"));
 
   cp_abis[num_cp_abis++] = abi;
   struct cp_abi_ops *abi = find_cp_abi (short_name);
 
   if (abi == NULL)
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot find C++ ABI \"%s\" to set it as auto default."),
+    internal_error (_("Cannot find C++ ABI \"%s\" to set it as auto default."),
                    short_name);
 
   xfree ((char *) auto_cp_abi.longname);
 
       return {};
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("cp_lookup_nested_symbol called "
+      internal_error (_("cp_lookup_nested_symbol called "
                        "on a non-aggregate type."));
     }
 }
 
   
   /* Update the current architecture, if needed.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, 
-                   _("cris_gdbarch_update: failed to update architecture."));
+    internal_error (_("cris_gdbarch_update: failed to update architecture."));
 }
 
 static void
 
   /* Update the current architecture, if needed.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, 
-                   "cris_gdbarch_update: failed to update architecture.");
+    internal_error ("cris_gdbarch_update: failed to update architecture.");
 }
 
 static void
 
   /* Update the current architecture, if needed.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, 
-                   _("cris_gdbarch_update: failed to update architecture."));
+    internal_error (_("cris_gdbarch_update: failed to update architecture."));
 }
 
 static struct gdbarch *
 
          case N_ROSYM:
            goto case_N_ROSYM;
          default:
-           internal_error (__FILE__, __LINE__,
-                           _("failed internal consistency check"));
+           internal_error (_("failed internal consistency check"));
          }
       }
 
 
 static void
 add_symbol_nonexpandable (struct dictionary *dict, struct symbol *sym)
 {
-  internal_error (__FILE__, __LINE__,
-                 _("dict_add_symbol: non-expandable dictionary"));
+  internal_error (_("dict_add_symbol: non-expandable dictionary"));
 }
 
 /* Functions for DICT_HASHED and DICT_HASHED_EXPANDABLE.  */
     {
     case DICT_HASHED:
     case DICT_LINEAR:
-      internal_error (__FILE__, __LINE__,
-                     _("create_new_language_dictionary: attempted to expand "
+      internal_error (_("create_new_language_dictionary: attempted to expand "
                        "non-expandable multidictionary"));
 
     case DICT_HASHED_EXPANDABLE:
 
     this->build_arg_exprs (gdbarch);
 
   if (n > m_args.size ())
-    internal_error (__FILE__, __LINE__,
-                   _("Probe '%s' has %d arguments, but GDB is requesting\n"
+    internal_error (_("Probe '%s' has %d arguments, but GDB is requesting\n"
                      "argument %u.  This should not happen.  Please\n"
                      "report this bug."),
                    this->get_name ().c_str (),
 
        cu_header->unit_type = DW_UT_type;
        break;
       default:
-       internal_error (__FILE__, __LINE__,
-                       _("read_comp_unit_head: invalid section_kind"));
+       internal_error (_("read_comp_unit_head: invalid section_kind"));
       }
   else
     {
     }
   signed_addr = bfd_get_sign_extend_vma (abfd);
   if (signed_addr < 0)
-    internal_error (__FILE__, __LINE__,
-                   _("read_comp_unit_head: dwarf from non elf file"));
+    internal_error (_("read_comp_unit_head: dwarf from non elf file"));
   cu_header->signed_addr_p = signed_addr;
 
   bool header_has_signature = section_kind == rcuh_kind::TYPE
          retval = bfd_get_signed_64 (abfd, buf);
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("read_address: bad switch, signed [in module %s]"),
+         internal_error (_("read_address: bad switch, signed [in module %s]"),
                          bfd_get_filename (abfd));
        }
     }
          retval = bfd_get_64 (abfd, buf);
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("read_address: bad switch, "
+         internal_error (_("read_address: bad switch, "
                            "unsigned [in module %s]"),
                          bfd_get_filename (abfd));
        }
 
   else
     {
       if (value_type (v) != value_enclosing_type (v))
-       internal_error (__FILE__, __LINE__,
-                       _("Should not be able to create a lazy value with "
+       internal_error (_("Should not be able to create a lazy value with "
                          "an enclosing type"));
       if (check_optimized)
        v_contents = nullptr;
          break;
 
        default:
-         internal_error (__FILE__, __LINE__, _("invalid location type"));
+         internal_error (_("invalid location type"));
        }
 
       offset += this_size_bits;
          /* DWARF_VALUE_OPTIMIZED_OUT can't occur in this context --
             it can only be encountered when making a piece.  */
        default:
-         internal_error (__FILE__, __LINE__, _("invalid location type"));
+         internal_error (_("invalid location type"));
        }
     }
 
                result_val = value_from_ulongest (address_type, result);
                break;
              default:
-               internal_error (__FILE__, __LINE__,
-                               _("Can't be reached."));
+               internal_error (_("Can't be reached."));
              }
          }
          break;
 
                           insn);
                }
              else
-               internal_error (__FILE__, __LINE__,
-                               _("Unknown CFI encountered."));
+               internal_error (_("Unknown CFI encountered."));
            }
        }
     }
       return 0;
 
     default:
-      internal_error (__FILE__, __LINE__, _("Unknown CFA rule."));
+      internal_error (_("Unknown CFA rule."));
     }
 }
 
          break;
 
        default:
-         internal_error (__FILE__, __LINE__, _("Unknown CFA rule."));
+         internal_error (_("Unknown CFA rule."));
        }
     }
   catch (const gdb_exception_error &ex)
       return cache->reg[regnum].loc.fn (this_frame, this_cache, regnum);
 
     default:
-      internal_error (__FILE__, __LINE__, _("Unknown register rule."));
+      internal_error (_("Unknown register rule."));
     }
 }
 
     case 8:
       return DW_EH_PE_udata8;
     default:
-      internal_error (__FILE__, __LINE__, _("Unsupported address size"));
+      internal_error (_("Unsupported address size"));
     }
 }
 
   /* GCC currently doesn't generate DW_EH_PE_indirect encodings for
      FDE's.  */
   if (encoding & DW_EH_PE_indirect)
-    internal_error (__FILE__, __LINE__, 
-                   _("Unsupported encoding: DW_EH_PE_indirect"));
+    internal_error (_("Unsupported encoding: DW_EH_PE_indirect"));
 
   *bytes_read_ptr = 0;
 
        }
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid or unsupported encoding"));
+      internal_error (_("Invalid or unsupported encoding"));
     }
 
   if ((encoding & 0x07) == 0x00)
       *bytes_read_ptr += 8;
       return (base + bfd_get_signed_64 (unit->abfd, (bfd_byte *) buf));
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid or unsupported encoding"));
+      internal_error (_("Invalid or unsupported encoding"));
     }
 }
 \f
 
       retval = bfd_get_64 (abfd, buf);
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("read_offset_1: bad switch [in module %s]"),
+      internal_error (_("read_offset_1: bad switch [in module %s]"),
                      bfd_get_filename (abfd));
     }
 
 
       break;
 
     default:
-      internal_error (__FILE__, __LINE__, _("invalid call site target kind"));
+      internal_error (_("invalid call site target kind"));
     }
 }
 
     {
       int targ = offsets[dw_labels[i]];
       if (targ == -1)
-       internal_error (__FILE__, __LINE__, _("invalid label"));
+       internal_error (_("invalid label"));
       ax_label (expr, patches[i], targ);
     }
 }
 
          delete_breakpoint (b);
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("handle_inferior_event: Invalid "
+         internal_error (_("handle_inferior_event: Invalid "
                            "gnu-indirect-function breakpoint type %d"),
                          (int) b->type);
        }
 
       struct ui *ui = current_ui;
 
       if (ui->prompt_state == PROMPTED)
-       internal_error (__FILE__, __LINE__, _("double prompt"));
+       internal_error (_("double prompt"));
       else if (ui->prompt_state == PROMPT_BLOCKED)
        {
          /* This is to trick readline into not trying to display the
 
       annotate_error ();
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("Bad switch."));
+      internal_error (_("Bad switch."));
     }
 }
 
 
          return;
        }
       if (mode == exec_file_mismatch_off)
-       internal_error (__FILE__, __LINE__,
-                       _("Unrecognized exec-file-mismatch setting: \"%s\""),
+       internal_error (_("Unrecognized exec-file-mismatch setting: \"%s\""),
                        exec_file_mismatch);
     }
 }
 
   if (enable)
     {
       if (!async_file_open ())
-       internal_error (__FILE__, __LINE__, "failed to create event pipe.");
+       internal_error ("failed to create event pipe.");
 
       add_file_handler (async_wait_fd (), handle_target_event, NULL, "fbsd-nat");
 
 
      However, system call catching requires this function to be
      set.  */
 
-  internal_error (__FILE__, __LINE__, _("fbsd_get_sycall_number called"));
+  internal_error (_("fbsd_get_sycall_number called"));
 }
 
 /* Read an integer symbol value from the current target.  */
 
 extract_typed_address (const gdb_byte *buf, struct type *type)
 {
   if (!type->is_pointer_or_reference ())
-    internal_error (__FILE__, __LINE__,
-                   _("extract_typed_address: "
+    internal_error (_("extract_typed_address: "
                    "type is not a pointer or reference"));
 
   return gdbarch_pointer_to_address (type->arch (), type, buf);
 store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr)
 {
   if (!type->is_pointer_or_reference ())
-    internal_error (__FILE__, __LINE__,
-                   _("store_typed_address: "
+    internal_error (_("store_typed_address: "
                    "type is not a pointer or reference"));
 
   gdbarch_address_to_pointer (type->arch (), type, buf, addr);
 
     if (frame_unwind_try_unwinder (this_frame, this_cache, entry->unwinder))
       return;
 
-  internal_error (__FILE__, __LINE__, _("frame_unwind_find_by_frame failed"));
+  internal_error (_("frame_unwind_find_by_frame failed"));
 }
 
 /* A default frame sniffer which always accepts the frame.  Used by
 
   else if (this_frame->prev_pc.status == CC_NOT_SAVED)
     throw_error (OPTIMIZED_OUT_ERROR, _("PC not saved"));
   else
-    internal_error (__FILE__, __LINE__,
-                   "unexpected prev_pc status: %d",
+    internal_error ("unexpected prev_pc status: %d",
                    (int) this_frame->prev_pc.status);
 }
 
 #undef SET
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     "Invalid frame stop reason");
+      internal_error ("Invalid frame stop reason");
     }
 }
 
 #undef SET
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     "Invalid frame stop reason");
+      internal_error ("Invalid frame stop reason");
     }
 }
 
 
          sc_addr += 24;
        }
       else
-       internal_error (__FILE__, __LINE__, _("not a signal trampoline"));
+       internal_error (_("not a signal trampoline"));
 
       if (sc_addr_cache_ptr)
        *sc_addr_cache_ptr = sc_addr;
 
        return SIM_FRV_SPR0_REGNUM + spr_reg_offset;
     }
 
-  internal_error (__FILE__, __LINE__, _("Bad register number %d"), reg);
+  internal_error (_("Bad register number %d"), reg);
 }
 
 constexpr gdb_byte frv_break_insn[] = {0xc0, 0x70, 0x00, 0x01};
       store_unsigned_integer ((bfd_byte *) valbuf + 4, 4, byte_order, regval);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Illegal return value length: %d"), len);
+    internal_error (_("Illegal return value length: %d"), len);
 }
 
 static CORE_ADDR
       regcache->cooked_write (9, (bfd_byte *) valbuf + 4);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Don't know how to return a %d-byte value."), len);
+    internal_error (_("Don't know how to return a %d-byte value."), len);
 }
 
 static enum return_value_convention
 
   /* Skip verify of get_pc_address_flags, invalid_p == 0 */
   /* Skip verify of read_core_file_mappings, invalid_p == 0 */
   if (!log.empty ())
-    internal_error (__FILE__, __LINE__,
-                   _("verify_gdbarch: the following are invalid ...%s"),
+    internal_error (_("verify_gdbarch: the following are invalid ...%s"),
                    log.c_str ());
 }
 
 
             # here.
             raise Exception("unhandled case when generating gdbarch validation")
     print("  if (!log.empty ())", file=f)
-    print("    internal_error (__FILE__, __LINE__,", file=f)
-    print("""              _("verify_gdbarch: the following are invalid ...%s"),""", file=f)
+    print(
+        """    internal_error (_("verify_gdbarch: the following are invalid ...%s"),""",
+        file=f,
+    )
     print("                log.c_str ());", file=f)
     print("}", file=f)
     print(file=f)
 
              }
              break;
            default:
-             internal_error (__FILE__, __LINE__, _("Unsupported field kind "
+             internal_error (_("Unsupported field kind "
                                                    "%d by check_types_equal"),
                              field1->loc_kind ());
            }
                (type->field (i).loc_dwarf_block ());
               break;
            default:
-             internal_error (__FILE__, __LINE__,
-                             _("Unexpected type field location kind: %d"),
+             internal_error (_("Unexpected type field location kind: %d"),
                              type->field (i).loc_kind ());
            }
        }
 
                                                                   regno))
     i387_supply_fsave (regcache, regno, &npx);
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid register no. %d in fetch_register."), regno);
+    internal_error (_("Invalid register no. %d in fetch_register."), regno);
 }
 
 void
                                                                   regno))
     i387_collect_fsave (regcache, regno, &npx);
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid register no. %d in store_register."), regno);
+    internal_error (_("Invalid register no. %d in store_register."), regno);
 }
 
 void
 
   /* Init command line storage.  */
   if (redir_debug_init (&child_cmd) == -1)
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot allocate redirection storage: "
+    internal_error (_("Cannot allocate redirection storage: "
                      "not enough memory.\n"));
 
   /* Parse the command line and create redirections.  */
 go32_set_dr (int i, CORE_ADDR addr)
 {
   if (i < 0 || i > 3)
-    internal_error (__FILE__, __LINE__, 
-                   _("Invalid register %d in go32_set_dr.\n"), i);
+    internal_error (_("Invalid register %d in go32_set_dr.\n"), i);
   D_REGS[i] = addr;
 }
 
 go32_get_dr (int i)
 {
   if (i < 0 || i > 3)
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid register %d in go32_get_dr.\n"), i);
+    internal_error (_("Invalid register %d in go32_get_dr.\n"), i);
   return D_REGS[i];
 }
 
 
   /* Initialize child's command line storage.  */
   if (redir_debug_init (&child_cmd) == -1)
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot allocate redirection storage: "
+    internal_error (_("Cannot allocate redirection storage: "
                      "not enough memory.\n"));
 
   /* We are always processing GCC-compiled programs.  */
 
 h8300_register_type (struct gdbarch *gdbarch, int regno)
 {
   if (regno < 0 || regno >= gdbarch_num_cooked_regs (gdbarch))
-    internal_error (__FILE__, __LINE__,
-                   _("h8300_register_type: illegal register number %d"),
+    internal_error (_("h8300_register_type: illegal register number %d"),
                    regno);
   else
     {
 
                                           hppa64_cannot_fetch_register);
        break;
       default:
-       internal_error (__FILE__, __LINE__, _("Unsupported address size: %d"),
+       internal_error (_("Unsupported address size: %d"),
                        tdep->bytes_per_address);
     }
 
       set_gdbarch_frame_align (gdbarch, hppa64_frame_align);
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
       
   /* Struct return methods.  */
       set_gdbarch_return_value (gdbarch, hppa64_return_value);
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
       
   set_gdbarch_breakpoint_kind_from_pc (gdbarch, hppa_breakpoint::kind_from_pc);
 
       return;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Got request for bad register number %d."), regno);
+  internal_error (_("Got request for bad register number %d."), regno);
 }
 
 /* Store register REGNO back into the child process.  If REGNO is -1,
       return;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Got request to store bad register number %d."), regno);
+  internal_error (_("Got request to store bad register number %d."), regno);
 }
 \f
 
 
   else if (i386_word_regnum_p (gdbarch, regnum))
     return i386_word_names[regnum - tdep->ax_regnum];
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 /* Convert a dbx register number REG to the appropriate register
          memcpy (valbuf + low_size, buf, len - low_size);
        }
       else
-       internal_error (__FILE__, __LINE__,
-                       _("Cannot extract return value of %d bytes long."),
+       internal_error (_("Cannot extract return value of %d bytes long."),
                        len);
     }
 }
                                    valbuf + low_size);
        }
       else
-       internal_error (__FILE__, __LINE__,
-                       _("Cannot store return value of %d bytes long."), len);
+       internal_error (_("Cannot store return value of %d bytes long."), len);
     }
 }
 \f
        return bt->builtin_int64;
     }
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 /* Map a cooked register onto a raw register or memory.  For the i386,
            memcpy (buf, raw_buf, 1);
        }
       else
-       internal_error (__FILE__, __LINE__, _("invalid regnum"));
+       internal_error (_("invalid regnum"));
     }
 }
 
          regcache->raw_write (gpnum % 4, raw_buf);
        }
       else
-       internal_error (__FILE__, __LINE__, _("invalid regnum"));
+       internal_error (_("invalid regnum"));
     }
 }
 
       return 0;
     }
   else
-    internal_error (__FILE__, __LINE__, _("invalid regnum"));
+    internal_error (_("invalid regnum"));
   return 1;
 }
 \f
 
           || regnum == I387_MXCSR_REGNUM (tdep))
     regclass = x87_ctrl_or_mxcsr;
   else
-    internal_error (__FILE__, __LINE__, _("invalid i387 regnum %d"), regnum);
+    internal_error (_("invalid i387 regnum %d"), regnum);
 
   if (gcore)
     {
       switch (regclass)
        {
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("invalid i387 regclass"));
+         internal_error (_("invalid i387 regclass"));
 
        case pkeys:
          /* This is a PKEYS register.  */
 
      a single instance by update_global_location_list.  */
   instr_breakpoint = slotN_contents (bundle, slotnum);
   if (instr_breakpoint == IA64_BREAKPOINT)
-    internal_error (__FILE__, __LINE__,
-                   _("Address %s already contains a breakpoint."),
+    internal_error (_("Address %s already contains a breakpoint."),
                    paddress (gdbarch, bp_tgt->placed_address));
   replace_slotN_contents (bundle, IA64_BREAKPOINT, slotnum);
 
 
        break;
       }
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 
   /* Coerce the arguments and handle pass-by-reference.
 
       value = NULL;
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 
   return value;
 
       rv->type = function->type ()->target_type ();
       if (rv->type == NULL)
-       internal_error (__FILE__, __LINE__,
-                       _("finish_command: function has no target type"));
+       internal_error (_("finish_command: function has no target type"));
 
       if (check_typedef (rv->type)->code () != TYPE_CODE_VOID)
        {
 
       /* Nothing to follow.  */
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     "Unexpected pending_follow.kind %d\n",
+      internal_error ("Unexpected pending_follow.kind %d\n",
                      tp->pending_follow.kind ());
       break;
     }
          || tp->resumed ()
          || tp->executing ())
        {
-         internal_error (__FILE__, __LINE__,
-                         "[%s] has inconsistent state: "
+         internal_error ("[%s] has inconsistent state: "
                          "trap_expected=%d, resumed=%d, executing=%d\n",
                          tp->ptid.to_string ().c_str (),
                          tp->control.trap_expected,
            return;
          }
 
-       internal_error (__FILE__, __LINE__,
-                       _("unhandled stop_soon: %d"), (int) stop_soon);
+       internal_error (_("unhandled stop_soon: %d"), (int) stop_soon);
       }
 
     case TARGET_WAITKIND_SPURIOUS:
         above.  */
       if (thread_still_needs_step_over (tp))
        {
-         internal_error (__FILE__, __LINE__,
-                         "thread [%s] needs a step-over, but not in "
+         internal_error ("thread [%s] needs a step-over, but not in "
                          "step-over queue\n",
                          tp->ptid.to_string ().c_str ());
        }
       do_frame_printing = 0;
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("Unknown value."));
+      internal_error (_("Unknown value."));
     }
 
   /* The behavior of this routine with respect to the source
     gdb_printf (out, _("Reverse.\n"));
     break;
   default:
-    internal_error (__FILE__, __LINE__,
-                   _("bogus execution_direction value: %d"),
+    internal_error (_("bogus execution_direction value: %d"),
                    (int) execution_direction);
   }
 }
 
   for (const interp_factory &f : interpreter_factories)
     if (strcmp (f.name, name) == 0)
       {
-       internal_error (__FILE__, __LINE__,
-                       _("interpreter factory already registered: \"%s\"\n"),
+       internal_error (_("interpreter factory already registered: \"%s\"\n"),
                        name);
       }
 
 
        }
     }
 
-  internal_error (__FILE__, __LINE__,
-                 "Couldn't find language `%s' in known languages list.",
+  internal_error ("Couldn't find language `%s' in known languages list.",
                  language);
 }
 
          tmp = "warn";
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         "Unrecognized range check setting.");
+         internal_error ("Unrecognized range check setting.");
        }
 
       gdb_printf (file,
     }
   else
     {
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized range check setting: \"%s\""), range);
+      internal_error (_("Unrecognized range check setting: \"%s\""), range);
     }
   if (range_check == range_check_warn
       || ((range_check == range_check_on)
          tmp = "off";
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         "Unrecognized case-sensitive setting.");
+         internal_error ("Unrecognized case-sensitive setting.");
        }
 
       gdb_printf (file,
      }
    else
      {
-       internal_error (__FILE__, __LINE__,
-                      "Unrecognized case-sensitive setting: \"%s\"",
+       internal_error ("Unrecognized case-sensitive setting: \"%s\"",
                       case_sensitive);
      }
 
       gdb_printf (gdb_stderr, "\n");
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
   va_end (args);
 }
 
                 gdb_signal_to_string (signo));
        }
 
-      internal_error (__FILE__, __LINE__,
-                     _("unexpected status %d for PID %ld"),
+      internal_error (_("unexpected status %d for PID %ld"),
                      status, (long) ptid.lwp ());
     }
 
          if (ret == -1)
            perror_with_name (_("waiting for new child"));
          else if (ret != new_pid)
-           internal_error (__FILE__, __LINE__,
-                           _("wait returned unexpected PID %d"), ret);
+           internal_error (_("wait returned unexpected PID %d"), ret);
          else if (!WIFSTOPPED (status))
-           internal_error (__FILE__, __LINE__,
-                           _("wait returned unexpected status 0x%x"), status);
+           internal_error (_("wait returned unexpected status 0x%x"), status);
        }
 
       ptid_t child_ptid (new_pid, new_pid);
        return 0;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("unknown ptrace event %d"), event);
+  internal_error (_("unknown ptrace event %d"), event);
 }
 
 /* Suspend waiting for a signal.  We're mostly interested in
   if (enable)
     {
       if (!async_file_open ())
-       internal_error (__FILE__, __LINE__, "creating event pipe failed.");
+       internal_error ("creating event pipe failed.");
 
       add_file_handler (async_wait_fd (), handle_target_event, NULL,
                        "linux-nat");
 
       else if (eclass == ELFCLASS64)
        features.xlen = 8;
       else
-       internal_error (__FILE__, __LINE__,
-                       _("unknown ELF header class %d"), eclass);
+       internal_error (_("unknown ELF header class %d"), eclass);
 
       if (EF_LOONGARCH_IS_SINGLE_FLOAT (e_flags))
        features.fputype = SINGLE_FLOAT;
 
   m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
   
   if (!find_pc_partial_function (pc, &name, &func_addr, &func_end))
-    internal_error (__FILE__, __LINE__,
-                   _("No virtual frame pointer available"));
+    internal_error (_("No virtual frame pointer available"));
 
   m32c_analyze_prologue (gdbarch, func_addr, pc, &p);
   switch (p.kind)
     }
   /* Sanity check */
   if (*frame_regnum > gdbarch_num_regs (gdbarch))
-    internal_error (__FILE__, __LINE__,
-                   _("No virtual frame pointer available"));
+    internal_error (_("No virtual frame pointer available"));
 }
 
 \f
 
       return;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Got request for bad register number %d."), regno);
+  internal_error (_("Got request for bad register number %d."), regno);
 }
 
 /* Store register REGNO back into the child process.  If REGNO is -1,
       return;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Got request to store bad register number %d."), regno);
+  internal_error (_("Got request to store bad register number %d."), regno);
 }
 
 void _initialize_m32r_linux_nat ();
 
       return;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Got request for bad register number %d."), regno);
+  internal_error (_("Got request for bad register number %d."), regno);
 }
 
 /* Store register REGNO back into the child process.  If REGNO is -1,
       return;
     }
 
-  internal_error (__FILE__, __LINE__,
-                 _("Got request to store bad register number %d."), regno);
+  internal_error (_("Got request to store bad register number %d."), regno);
 }
 \f
 
 
       regcache->raw_read (M68K_D1_REGNUM, valbuf + (len - 4));
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot extract return value of %d bytes long."), len);
+    internal_error (_("Cannot extract return value of %d bytes long."), len);
 }
 
 static void
       regcache->raw_write (M68K_D1_REGNUM, valbuf + (len - 4));
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot store return value of %d bytes long."), len);
+    internal_error (_("Cannot store return value of %d bytes long."), len);
 }
 
 static void
 
   if (tdep->jb_pc < 0)
     {
-      internal_error (__FILE__, __LINE__,
-                     _("m68k_get_longjmp_target: not implemented"));
+      internal_error (_("m68k_get_longjmp_target: not implemented"));
       return 0;
     }
 
 
 
   /* As far as I know, there's no case where inserting a space isn't
      enough to prevent a splice.  */
-  internal_error (__FILE__, __LINE__,
-                 _("unable to avoid splicing tokens during macro expansion"));
+  internal_error (_("unable to avoid splicing tokens during macro expansion"));
 }
 
 /* Stringify an argument, and insert it into DEST.  ARG is the text to
       return 1;
     }
   else
-    internal_error (__FILE__, __LINE__, _("bad macro definition kind"));
+    internal_error (_("bad macro definition kind"));
 }
 
 
 
 static void
 maintenance_internal_error (const char *args, int from_tty)
 {
-  internal_error (__FILE__, __LINE__, "%s", (args == NULL ? "" : args));
+  internal_error ("%s", (args == NULL ? "" : args));
 }
 
 /* Stimulate the internal error mechanism that GDB uses when an
 static void
 maintenance_internal_warning (const char *args, int from_tty)
 {
-  internal_warning (__FILE__, __LINE__, "%s", (args == NULL ? "" : args));
+  internal_warning ("%s", (args == NULL ? "" : args));
 }
 
 /* Stimulate the internal error mechanism that GDB uses when an
 
       name_of_result = "variables";
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     "unexpected what_to_list: %d", (int) what);
+      internal_error ("unexpected what_to_list: %d", (int) what);
     }
 
   ui_out_emit_list list_emitter (uiout, name_of_result);
 
 
   /* We assume that argv/argc are ok.  */
   if (*oind > argc || *oind < 0)
-    internal_error (__FILE__, __LINE__,
-                   _("mi_getopt_long: oind out of bounds"));
+    internal_error (_("mi_getopt_long: oind out of bounds"));
   if (*oind == argc)
     return -1;
   arg = argv[*oind];
 
       break;
 
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 }
 
       break;
 
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 
   m_suppress_field_separator = false;
 
        memcpy (valbuf, buf, type->length ());
        return;
       default:
-       internal_error (__FILE__, __LINE__, 
-                       _("Unsupported return value size requested"));
+       internal_error (_("Unsupported return value size requested"));
     }
 }
 
 
 static void
 stub_gnu_ifunc_resolver_stop (code_breakpoint *b)
 {
-  internal_error (__FILE__, __LINE__,
-                 _("elf_gnu_ifunc_resolver_stop cannot be reached."));
+  internal_error (_("elf_gnu_ifunc_resolver_stop cannot be reached."));
 }
 
 /* See elf_gnu_ifunc_resolver_return_stop for its real implementation.  */
 static void
 stub_gnu_ifunc_resolver_return_stop (code_breakpoint *b)
 {
-  internal_error (__FILE__, __LINE__,
-                 _("elf_gnu_ifunc_resolver_return_stop cannot be reached."));
+  internal_error (_("elf_gnu_ifunc_resolver_return_stop cannot be reached."));
 }
 
 /* See elf_gnu_ifunc_fns for its real implementation.  */
 
     case MIPS_ABI_UNKNOWN:
     case MIPS_ABI_LAST:
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 }
 
       reg_offset = 0;
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
   if (mips_debug)
     gdb_printf (gdb_stderr,
       return "";
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("mips_register_name: bad register number %d"), rawnum);
+    internal_error (_("mips_register_name: bad register number %d"), rawnum);
 }
 
 /* Return the groups that a MIPS register can be categorised into.  */
        }
     }
   else
-    internal_error (__FILE__, __LINE__, _("bad register size"));
+    internal_error (_("bad register size"));
 }
 
 static void
        }
     }
   else
-    internal_error (__FILE__, __LINE__, _("bad register size"));
+    internal_error (_("bad register size"));
 }
 
 static int
        }
     }
   else
-    internal_error (__FILE__, __LINE__, _("bad register size"));
+    internal_error (_("bad register size"));
 
   return 0;
 }
     }
   else
     {
-      internal_error (__FILE__, __LINE__,
-                     _("mips_register_to_value: unrecognized case"));
+      internal_error (_("mips_register_to_value: unrecognized case"));
     }
 }
 
     }
   else
     {
-      internal_error (__FILE__, __LINE__,
-                     _("mips_value_to_register: unrecognized case"));
+      internal_error (_("mips_value_to_register: unrecognized case"));
     }
 }
 
     case AUTO_BOOLEAN_AUTO:
       return tdep->default_mask_address_p;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("mips_mask_address_p: bad switch"));
+      internal_error (_("mips_mask_address_p: bad switch"));
       return -1;
     }
 }
       instlen = MIPS_INSN32_SIZE;
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("invalid ISA"));
+      internal_error (_("invalid ISA"));
       break;
     }
   err = target_read_memory (addr, buf, instlen);
     case ISA_MIPS:
        return MIPS_INSN32_SIZE;
     }
-  internal_error (__FILE__, __LINE__, _("invalid ISA"));
+  internal_error (_("invalid ISA"));
 }
 
 static LONGEST
        break;
       }
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
   upk->offset = offset;
   upk->regx = regx;
                                  readbuf, writebuf, 4);
              break;
            default:
-             internal_error (__FILE__, __LINE__, _("bad switch"));
+             internal_error (_("bad switch"));
            }
        }
       if (fval_reg != mips_fval_fpr)
       int rawnum = regno % gdbarch_num_regs (gdbarch);
 
       if ((rawnum - mips_regnum (gdbarch)->fp0) & 1)
-       internal_error (__FILE__, __LINE__,
-                       _("mips_read_fp_register_double: bad access to "
+       internal_error (_("mips_read_fp_register_double: bad access to "
                        "odd-numbered FP register"));
 
       /* mips_read_fp_register_single will find the correct 32 bits from
       fpu = "absent (none)";
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
   if (mips_fpu_type_auto)
     gdb_printf ("The MIPS floating-point coprocessor "
      instead of relying on globals.  Doing that would let generic code
      handle the search for this specific architecture.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("set mipsfpu failed"));
+    internal_error (_("set mipsfpu failed"));
 }
 
 static void
      instead of relying on globals.  Doing that would let generic code
      handle the search for this specific architecture.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("set mipsfpu failed"));
+    internal_error (_("set mipsfpu failed"));
 }
 
 static void
      instead of relying on globals.  Doing that would let generic code
      handle the search for this specific architecture.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("set mipsfpu failed"));
+    internal_error (_("set mipsfpu failed"));
 }
 
 static void
     if (mips_abi_strings[i] == mips_abi_string)
       return (enum mips_abi) i;
 
-  internal_error (__FILE__, __LINE__, _("unknown ABI string"));
+  internal_error (_("unknown ABI string"));
 }
 
 /* Return the default compressed instruction set, either of MIPS16
     if (mips_compression_strings[i] == mips_compression_string)
       return (enum mips_isa) i;
 
-  internal_error (__FILE__, __LINE__, _("unknown compressed ISA string"));
+  internal_error (_("unknown compressed ISA string"));
 }
 
 static void
       set_gdbarch_long_double_format (gdbarch, floatformats_ibm_long_double);
       break;
     default:
-      internal_error (__FILE__, __LINE__, _("unknown ABI in switch"));
+      internal_error (_("unknown ABI in switch"));
     }
 
   /* GCC creates a pseudo-section whose name specifies the size of
              set_gdbarch_ptr_bit (gdbarch, long_bit);
              break;
            default:
-             internal_error (__FILE__, __LINE__, _("unknown ABI in switch"));
+             internal_error (_("unknown ABI in switch"));
            }
        }
     }
   mips_abi_string = mips_abi_strings[MIPS_ABI_UNKNOWN];
   if (MIPS_ABI_LAST + 1
       != sizeof (mips_abi_strings) / sizeof (mips_abi_strings[0]))
-    internal_error (__FILE__, __LINE__, _("mips_abi_strings out of sync"));
+    internal_error (_("mips_abi_strings out of sync"));
 
   gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep);
 
 
       return mn10300_type_align (check_typedef (type));
 
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 }
 
       regcache->raw_write_part (reg + 1, 0, len - regsz, valbuf + regsz);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot store return value %d bytes long."), len);
+    internal_error (_("Cannot store return value %d bytes long."), len);
 }
 
 static void
       memcpy ((char *) valbuf + regsz, buf, len - regsz);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Cannot extract return value %d bytes long."), len);
+    internal_error (_("Cannot extract return value %d bytes long."), len);
 }
 
 /* Determine, for architecture GDBARCH, how a return value of TYPE
       set_gdbarch_fp0_regnum (gdbarch, 32);
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("mn10300_gdbarch_init: Unknown mn10300 variant"));
+      internal_error (_("mn10300_gdbarch_init: Unknown mn10300 variant"));
       break;
     }
 
 
            code_model = MSP_LARGE_CODE_MODEL;
            break;
          default:
-           internal_error (__FILE__, __LINE__,
-                           _("Unknown msp430x code memory model"));
+           internal_error (_("Unknown msp430x code memory model"));
            break;
          }
        break;
 
       return BTRACE_ERR_NONE;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unknown btrace read type."));
+  internal_error (_("Unknown btrace read type."));
 }
 
 /* See linux-btrace.h.  */
       return linux_read_pt (&btrace->variant.pt, tinfo, type);
     }
 
-  internal_error (__FILE__, __LINE__, _("Unkown branch trace format."));
+  internal_error (_("Unkown branch trace format."));
 }
 
 /* See linux-btrace.h.  */
 
          if (errno == ECHILD)
            warning (_("mount namespace helper vanished?"));
          else
-           internal_warning (__FILE__, __LINE__,
-                             _("unhandled error %d"), errno);
+           internal_warning (_("unhandled error %d"), errno);
        }
       else if (pid == helper->pid)
        {
            warning (_("mount namespace helper killed by signal %d"),
                     WTERMSIG (status));
          else
-           internal_warning (__FILE__, __LINE__,
-                             _("unhandled status %d"), status);
+           internal_warning (_("unhandled status %d"), status);
        }
       else
-       internal_warning (__FILE__, __LINE__,
-                         _("unknown pid %d"), pid);
+       internal_warning (_("unknown pid %d"), pid);
 
       /* Something unrecoverable happened.  */
       helper->pid = -1;
 
     case pt_watch_style_mips64:
       return regs->mips64.watch_masks[n] & IRW_MASK;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
     case pt_watch_style_mips64:
       return regs->mips64.watch_masks[n] & ~IRW_MASK;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
     case pt_watch_style_mips64:
       return regs->mips64.num_valid;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
     case pt_watch_style_mips64:
       return regs->mips64.watchlo[n];
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
       regs->mips64.watchlo[n] = value;
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
     case pt_watch_style_mips64:
       return regs->mips64.watchhi[n];
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
       regs->mips64.watchhi[n] = value;
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Unrecognized watch register style"));
+      internal_error (_("Unrecognized watch register style"));
     }
 }
 
 
        rw = DR_RW_WRITE;
        break;
       case hw_read:
-       internal_error (__FILE__, __LINE__,
-                       _("The i386 doesn't support "
+       internal_error (_("The i386 doesn't support "
                          "data-read watchpoints.\n"));
       case hw_access:
        rw = DR_RW_READ;
        break;
 #endif
       default:
-       internal_error (__FILE__, __LINE__, _("\
+       internal_error (_("\
 Invalid hardware breakpoint type %d in x86_length_and_rw_bits.\n"),
                        (int) type);
     }
          return (DR_LEN_8 | rw);
        /* FALL THROUGH */
       default:
-       internal_error (__FILE__, __LINE__, _("\
+       internal_error (_("\
 Invalid hardware breakpoint length %d in x86_length_and_rw_bits.\n"), len);
     }
 }
          else if (what == WP_REMOVE)
            retval = x86_remove_aligned_watchpoint (state, addr, len_rw);
          else
-           internal_error (__FILE__, __LINE__, _("\
+           internal_error (_("\
 Invalid value %d of operation in x86_handle_nonaligned_watchpoint.\n"),
                            (int) what);
          if (retval)
 
                  break;
                default:
                  /* Long double?  */
-                 internal_error (__FILE__, __LINE__,
-                                 "Do not know how to handle %d-byte double.\n",
+                 internal_error ("Do not know how to handle %d-byte double.\n",
                                  len);
                  break;
                }
       else if (len == 8)
        regcache->cooked_read (NDS32_FD0_REGNUM, valbuf);
       else
-       internal_error (__FILE__, __LINE__,
-                       _("Cannot extract return value of %d bytes "
+       internal_error (_("Cannot extract return value of %d bytes "
                          "long floating-point."), len);
     }
   else
       else if (len == 8)
        regcache->cooked_write (NDS32_FD0_REGNUM, valbuf);
       else
-       internal_error (__FILE__, __LINE__,
-                       _("Cannot store return value of %d bytes "
+       internal_error (_("Cannot store return value of %d bytes "
                          "long floating-point."), len);
     }
   else
 
      However, system call catching requires this function to be
      set.  */
 
-  internal_error (__FILE__, __LINE__, _("nbsd_get_sycall_number called"));
+  internal_error (_("nbsd_get_sycall_number called"));
 }
 
 /* See netbsd-tdep.h.  */
 
 
 #define SECT_OFF_DATA(objfile) \
      ((objfile->sect_index_data == -1) \
-      ? (internal_error (__FILE__, __LINE__, \
-                        _("sect_index_data not initialized")), -1)     \
+      ? (internal_error (_("sect_index_data not initialized")), -1)    \
       : objfile->sect_index_data)
 
 #define SECT_OFF_RODATA(objfile) \
      ((objfile->sect_index_rodata == -1) \
-      ? (internal_error (__FILE__, __LINE__, \
-                        _("sect_index_rodata not initialized")), -1)   \
+      ? (internal_error (_("sect_index_rodata not initialized")), -1)  \
       : objfile->sect_index_rodata)
 
 #define SECT_OFF_TEXT(objfile) \
      ((objfile->sect_index_text == -1) \
-      ? (internal_error (__FILE__, __LINE__, \
-                        _("sect_index_text not initialized")), -1)     \
+      ? (internal_error (_("sect_index_text not initialized")), -1)    \
       : objfile->sect_index_text)
 
 /* Sometimes the .bss section is missing from the objfile, so we don't
 
   if (osabi == GDB_OSABI_UNKNOWN)
     {
       internal_error
-       (__FILE__, __LINE__,
-        _("gdbarch_register_osabi: An attempt to register a handler for "
+       (_("gdbarch_register_osabi: An attempt to register a handler for "
         "OS ABI \"%s\" for architecture %s was made.  The handler will "
         "not be registered"),
         gdbarch_osabi_name (osabi),
          && (*handler_p)->osabi == osabi)
        {
          internal_error
-           (__FILE__, __LINE__,
-            _("gdbarch_register_osabi: A handler for OS ABI \"%s\" "
+           (_("gdbarch_register_osabi: A handler for OS ABI \"%s\" "
             "has already been registered for architecture %s"),
             gdbarch_osabi_name (osabi),
             arch_info->printable_name);
          if (osabi < GDB_OSABI_UNKNOWN || osabi >= GDB_OSABI_INVALID)
            {
              internal_error
-               (__FILE__, __LINE__,
-                _("gdbarch_lookup_osabi: invalid OS ABI (%d) from sniffer "
+               (_("gdbarch_lookup_osabi: invalid OS ABI (%d) from sniffer "
                 "for architecture %s flavour %d"),
                 (int) osabi,
                 bfd_printable_arch_mach (bfd_get_arch (abfd), 0),
                   || (!match_specific && sniffer->arch == bfd_arch_unknown))
                    {
                      internal_error
-                       (__FILE__, __LINE__,
-                        _("gdbarch_lookup_osabi: multiple %sspecific OS ABI "
+                       (_("gdbarch_lookup_osabi: multiple %sspecific OS ABI "
                         "match for architecture %s flavour %d: first "
                         "match \"%s\", second match \"%s\""),
                         match_specific ? "" : "non-",
            }
        }
       if (i == GDB_OSABI_INVALID)
-       internal_error (__FILE__, __LINE__,
-                       _("Invalid OS ABI \"%s\" passed to command handler."),
+       internal_error (_("Invalid OS ABI \"%s\" passed to command handler."),
                        set_osabi_string);
     }
 
      graceful here.  */
   gdbarch_info info;
   if (! gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("Updating OS ABI failed."));
+    internal_error (_("Updating OS ABI failed."));
 }
 
 static void
 {
   if (strcmp (gdb_osabi_names[GDB_OSABI_INVALID].pretty, "<invalid>") != 0)
     internal_error
-      (__FILE__, __LINE__,
-       _("_initialize_gdb_osabi: gdb_osabi_names[] is inconsistent"));
+      (_("_initialize_gdb_osabi: gdb_osabi_names[] is inconsistent"));
 
   /* Register a generic sniffer for ELF flavoured files.  */
   gdbarch_register_osabi_sniffer (bfd_arch_unknown,
 
       regcache->raw_supply (regno, buf + padding);
     }
   else 
-    internal_error (__FILE__, __LINE__,
-                   _("fetch_register: unexpected byte order: %d"),
+    internal_error (_("fetch_register: unexpected byte order: %d"),
                    gdbarch_byte_order (gdbarch));
 }
 
 
       record_tdep->size_time_t = 4;
     }
   else
-    internal_error (__FILE__, __LINE__, _("unexpected wordsize"));
+    internal_error (_("unexpected wordsize"));
 
   /* These values are the second argument of system call "sys_fcntl"
      and "sys_fcntl64".  They are obtained from Linux Kernel source.  */
 
     }
   else
     /* Can't happen.  */
-    internal_error (__FILE__, __LINE__, _("Unknown decimal float size."));
+    internal_error (_("Unknown decimal float size."));
 
   return RETURN_VALUE_REGISTER_CONVENTION;
 }
 
        size = 'h';
       else
        /* Bad value for gdbarch_ptr_bit.  */
-       internal_error (__FILE__, __LINE__,
-                       _("failed internal consistency check"));
+       internal_error (_("failed internal consistency check"));
     }
 
   if (size == 'b')
            DIAGNOSTIC_POP
            break;
          default:
-           internal_error (__FILE__, __LINE__,
-                           _("failed internal consistency check"));
+           internal_error (_("failed internal consistency check"));
          }
        /* Maybe advance to the next argument.  */
        if (piece.argclass != literal_piece)
 
   inferior *inf = find_inferior_ptid (this, ptid);
 
   if (inf == NULL || inf->aspace == NULL)
-    internal_error (__FILE__, __LINE__,
-                   _("Can't determine the current "
+    internal_error (_("Can't determine the current "
                      "address space of thread %s\n"),
                    target_pid_to_str (ptid).c_str ());
 
 
     {
       if (cs_pst->readin_p (ofp))
        {
-         internal_error (__FILE__, __LINE__,
-                         _("select_source_symtab: "
+         internal_error (_("select_source_symtab: "
                          "readin pst found and no symtabs."));
        }
       else
 
       return;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unknown branch trace format."));
+  internal_error (_("Unknown branch trace format."));
 }
 
 /* The info_record method of target record-btrace.  */
   switch (flags)
     {
     default:
-      internal_error (__FILE__, __LINE__, _("invalid stepping type."));
+      internal_error (_("invalid stepping type."));
 
     case BTHR_STOP:
       return btrace_step_stopped_on_request ();
 
       pc_val = gdbarch_addr_bits_remove (gdbarch, raw_val);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("regcache_read_pc: Unable to find PC"));
+    internal_error (_("regcache_read_pc: Unable to find PC"));
   return pc_val;
 }
 
     regcache_cooked_write_unsigned (regcache,
                                    gdbarch_pc_regnum (gdbarch), pc);
   else
-    internal_error (__FILE__, __LINE__,
-                   _("regcache_write_pc: Unable to update PC"));
+    internal_error (_("regcache_write_pc: Unable to update PC"));
 
   /* Writing the PC (for instance, from "load") invalidates the
      current frame.  */
 
          type = "internal";
          break;
        default:
-         internal_error (__FILE__, __LINE__, _("bad switch"));
+         internal_error (_("bad switch"));
        }
 
       /* Note: If you change this, be sure to also update the
 
                                     tmp.data (), regsize);
 
       if (nr_bytes > 0 && nr_bytes != regsize)
-       internal_error (__FILE__, __LINE__,
-                       _("Register size different to expected"));
+       internal_error (_("Register size different to expected"));
       if (nr_bytes < 0)
-       internal_error (__FILE__, __LINE__,
-                       _("Register %d not updated"), regno);
+       internal_error (_("Register %d not updated"), regno);
       if (nr_bytes == 0)
        warning (_("Register %s not updated"),
                 gdbarch_register_name (gdbarch, regno));
 
                  "the remote target to interrupt the execution "
                  "of Linux kernel.\n"));
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid value for interrupt_sequence_mode: %s."),
+    internal_error (_("Invalid value for interrupt_sequence_mode: %s."),
                    interrupt_sequence_mode);
 }
 
 
   if (config->detect != AUTO_BOOLEAN_TRUE
       && config->support == PACKET_DISABLE)
-    internal_error (__FILE__, __LINE__,
-                   _("packet_ok: attempt to use a disabled packet"));
+    internal_error (_("packet_ok: attempt to use a disabled packet"));
 
   result = packet_check_result (buf);
   switch (result)
          return;
        }
     }
-  internal_error (__FILE__, __LINE__, _("Could not find config for %s"),
+  internal_error (_("Could not find config for %s"),
                  c->name);
 }
 
   struct gdb_ext_thread_info threadinfo;
 
   if (rs->remote_desc == 0)            /* paranoia */
-    internal_error (__FILE__, __LINE__,
-                   _("remote_threads_extra_info"));
+    internal_error (_("remote_threads_extra_info"));
 
   if (tp->ptid == magic_null_ptid
       || (tp->ptid.pid () != 0 && tp->ptid.lwp () == 0))
       remote_serial_write ("g", 1);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid value for interrupt_sequence_mode: %s."),
+    internal_error (_("Invalid value for interrupt_sequence_mode: %s."),
                    interrupt_sequence_mode);
 }
 
     {
       if (p[0] == 0 || p[1] == 0)
        /* This shouldn't happen - we adjusted sizeof_g_packet above.  */
-       internal_error (__FILE__, __LINE__,
-                       _("unexpected end of 'g' packet reply"));
+       internal_error (_("unexpected end of 'g' packet reply"));
 
       if (p[0] == 'x' && p[1] == 'x')
        regs[i] = 0;            /* 'x' */
        {
          if ((r->offset + reg_size) * 2 > strlen (rs->buf.data ()))
            /* This shouldn't happen - we adjusted in_g_packet above.  */
-           internal_error (__FILE__, __LINE__,
-                           _("unexpected end of 'g' packet reply"));
+           internal_error (_("unexpected end of 'g' packet reply"));
          else if (rs->buf[r->offset * 2] == 'x')
            {
              gdb_assert (r->offset * 2 < strlen (rs->buf.data ()));
     case PACKET_UNKNOWN:
       return 0;
     default:
-      internal_error (__FILE__, __LINE__, _("Bad result from packet_ok"));
+      internal_error (_("Bad result from packet_ok"));
     }
 }
 
   int payload_length_bytes;
 
   if (packet_format != 'X' && packet_format != 'M')
-    internal_error (__FILE__, __LINE__,
-                   _("remote_write_bytes_aux: bad packet format"));
+    internal_error (_("remote_write_bytes_aux: bad packet format"));
 
   if (len_units == 0)
     return TARGET_XFER_EOF;
     }
 
   if (todo_units <= 0)
-    internal_error (__FILE__, __LINE__,
-                   _("minimum packet size too small to write data"));
+    internal_error (_("minimum packet size too small to write data"));
 
   /* If we already need another packet, then try to align the end
      of this packet to a useful boundary.  */
       packet_format = "M";
       break;
     case PACKET_SUPPORT_UNKNOWN:
-      internal_error (__FILE__, __LINE__,
-                     _("remote_write_bytes: bad internal state"));
+      internal_error (_("remote_write_bytes: bad internal state"));
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 
   return remote_write_bytes_aux (packet_format,
   va_end (ap);
 
   if (size >= max_size)
-    internal_error (__FILE__, __LINE__, _("Too long remote packet."));
+    internal_error (_("Too long remote packet."));
 
   if (putpkt (rs->buf) < 0)
     error (_("Communication problem with target."));
     case PACKET_UNKNOWN:
       return -1;
     default:
-      internal_error (__FILE__, __LINE__, _("Bad result from packet_ok"));
+      internal_error (_("Bad result from packet_ok"));
     }
 }
 
       return Z_PACKET_ACCESS_WP;
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("hw_bp_to_z: bad watchpoint type %d"), type);
+      internal_error (_("hw_bp_to_z: bad watchpoint type %d"), type);
     }
 }
 
     case PACKET_OK:
       return 0;
     }
-  internal_error (__FILE__, __LINE__,
-                 _("remote_insert_watchpoint: reached end of function"));
+  internal_error (_("remote_insert_watchpoint: reached end of function"));
 }
 
 bool
     case PACKET_OK:
       return 0;
     }
-  internal_error (__FILE__, __LINE__,
-                 _("remote_remove_watchpoint: reached end of function"));
+  internal_error (_("remote_remove_watchpoint: reached end of function"));
 }
 
 
     case PACKET_OK:
       return 0;
     }
-  internal_error (__FILE__, __LINE__,
-                 _("remote_insert_hw_breakpoint: reached end of function"));
+  internal_error (_("remote_insert_hw_breakpoint: reached end of function"));
 }
 
 
     case PACKET_OK:
       return 0;
     }
-  internal_error (__FILE__, __LINE__,
-                 _("remote_remove_hw_breakpoint: reached end of function"));
+  internal_error (_("remote_remove_hw_breakpoint: reached end of function"));
 }
 
 /* Verify memory using the "qCRC:" request.  */
 
   for (const remote_g_packet_guess &guess : data->guesses)
     if (guess.bytes == bytes)
-      internal_error (__FILE__, __LINE__,
-                     _("Duplicate g packet description added for size %d"),
+      internal_error (_("Duplicate g packet description added for size %d"),
                      bytes);
 
   data->guesses.emplace_back (bytes, tdesc);
          else
            /* If it passed validation at definition but fails now,
               something is very wrong.  */
-           internal_error (__FILE__, __LINE__,
-                           _("Fast tracepoint not "
-                             "valid during download"));
+           internal_error (_("Fast tracepoint not valid during download"));
        }
       else
        /* Fast tracepoints are functionally identical to regular
       annex = "delta";
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Bad branch tracing read type: %u."),
+      internal_error (_("Bad branch tracing read type: %u."),
                      (unsigned int) type);
     }
 
 
   inferior *inf = find_inferior_pid (this, pid);
   if (inf == NULL)
-    internal_error (__FILE__, __LINE__,
-                   _("not currently attached to process %d"), pid);
+    internal_error (_("not currently attached to process %d"), pid);
 
   if (!inf->fake_pid_p)
     {
 
       else if (eclass == ELFCLASS64)
        features.xlen = 8;
       else
-       internal_error (__FILE__, __LINE__,
-                       _("unknown ELF header class %d"), eclass);
+       internal_error (_("unknown ELF header class %d"), eclass);
 
       if (e_flags & EF_RISCV_FLOAT_ABI_DOUBLE)
        features.flen = 8;
 
       case RL78_Reg_MEM:
        return RL78_MEM_REGNUM;
       default:
-       internal_error (__FILE__, __LINE__,
-                       _("Undefined mapping for opc reg %d"),
+       internal_error (_("Undefined mapping for opc reg %d"),
                        opcreg);
     }
 
 
   info.abfd = current_program_space->exec_bfd ();
 
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__,
-                   _("rs6000_create_inferior: failed "
+    internal_error (_("rs6000_create_inferior: failed "
                      "to select architecture"));
 }
 \f
 
     /* POWER7 Extended FP pseudo-registers.  */
     return builtin_type (gdbarch)->builtin_double;
   else
-    internal_error (__FILE__, __LINE__,
-                   _("rs6000_pseudo_register_type: "
+    internal_error (_("rs6000_pseudo_register_type: "
                      "called on unexpected register '%s' (%d)"),
                    gdbarch_register_name (gdbarch, regnum), regnum);
 }
           || IS_CEFP_PSEUDOREG (tdep, reg_nr))
     return efp_pseudo_register_read (gdbarch, regcache, reg_nr, buffer);
   else
-    internal_error (__FILE__, __LINE__,
-                   _("rs6000_pseudo_register_read: "
+    internal_error (_("rs6000_pseudo_register_read: "
                    "called on unexpected register '%s' (%d)"),
                    gdbarch_register_name (gdbarch, reg_nr), reg_nr);
 }
           || IS_CEFP_PSEUDOREG (tdep, reg_nr))
     efp_pseudo_register_write (gdbarch, regcache, reg_nr, buffer);
   else
-    internal_error (__FILE__, __LINE__,
-                   _("rs6000_pseudo_register_write: "
+    internal_error (_("rs6000_pseudo_register_write: "
                    "called on unexpected register '%s' (%d)"),
                    gdbarch_register_name (gdbarch, reg_nr), reg_nr);
 }
       efp_ax_pseudo_register_collect (gdbarch, ax, reg_nr);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("rs6000_pseudo_register_collect: "
+    internal_error (_("rs6000_pseudo_register_collect: "
                    "called on unexpected register '%s' (%d)"),
                    gdbarch_register_name (gdbarch, reg_nr), reg_nr);
   return 0;
 
   /* Update the architecture.  */
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("could not update architecture"));
+    internal_error (_("could not update architecture"));
 }
 
 static void
       }
 
   if (vector_abi == POWERPC_VEC_LAST)
-    internal_error (__FILE__, __LINE__, _("Invalid vector ABI accepted: %s."),
+    internal_error (_("Invalid vector ABI accepted: %s."),
                    powerpc_vector_abi_string);
 
   /* Update the architecture.  */
   gdbarch_info info;
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, _("could not update architecture"));
+    internal_error (_("could not update architecture"));
 }
 
 /* Show the current setting of the exact watchpoints flag.  */
 
       return full_name[regnum - tdep->v0_full_regnum];
     }
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 /* Implement pseudo_register_type tdesc method.  */
   if (regnum_is_vxr_full (tdep, regnum))
     return tdesc_register_type (gdbarch, S390_V16_REGNUM);
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 /* Implement pseudo_register_read gdbarch method.  */
       return status;
     }
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 /* Implement pseudo_register_write gdbarch method.  */
       return;
     }
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 /* Register groups.  */
     }
   else
     {
-      internal_error (__FILE__, __LINE__, _("invalid regnum"));
+      internal_error (_("invalid regnum"));
     }
   return 0;
 }
     }
   else
     {
-      internal_error (__FILE__, __LINE__, _("invalid regnum"));
+      internal_error (_("invalid regnum"));
     }
   return 0;
 }
        }
     }
   else
-    internal_error (__FILE__, __LINE__, _("invalid return type"));
+    internal_error (_("invalid return type"));
 }
 
 /* Implement the 'return_value' gdbarch method.  */
 
   /* The sentinel frame is used as a starting point for creating the
      previous (inner most) frame.  That frame's THIS_ID method will be
      called to determine the inner most frame's ID.  Not this one.  */
-  internal_error (__FILE__, __LINE__, _("sentinel_frame_this_id called"));
+  internal_error (_("sentinel_frame_this_id called"));
 }
 
 static struct gdbarch *
 
     int fds[2];
 
     if (gdb_pipe_cloexec (fds) == -1)
-      internal_error (__FILE__, __LINE__,
-                     "creating serial event pipe failed.");
+      internal_error ("creating serial event pipe failed.");
 
     fcntl (fds[0], F_SETFL, O_NONBLOCK);
     fcntl (fds[1], F_SETFL, O_NONBLOCK);
 
       state.fParity = TRUE;
       break;
     default:
-      internal_warning (__FILE__, __LINE__,
-                       "Incorrect parity value: %d", parity);
+      internal_warning ("Incorrect parity value: %d", parity);
       return -1;
     }
 
 
       newparity = PARENB;
       break;
     default:
-      internal_warning (__FILE__, __LINE__,
-                       "Incorrect parity value: %d", parity);
+      internal_warning ("Incorrect parity value: %d", parity);
       return -1;
     }
 
 
   /* FIXME: cagney/1999-10-11: Don't enable this check until the ASYNC
      code is finished.  */
   if (0 && serial_is_async_p (scb) && timeout < 0)
-    internal_error (__FILE__, __LINE__,
-                   _("serial_readchar: blocking read in async mode"));
+    internal_error (_("serial_readchar: blocking read in async mode"));
 
   ch = scb->ops->readchar (scb, timeout);
   if (serial_logfp != NULL)
 
   else if (filename_display_string == filename_display_relative)
     return symtab->filename;
   else
-    internal_error (__FILE__, __LINE__, _("invalid filename_display_string"));
+    internal_error (_("invalid filename_display_string"));
 }
 
 \f
 
   if (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM)
     return builtin_type (gdbarch)->builtin_double;
 
-  internal_error (__FILE__, __LINE__,
-                 _("sparc32_pseudo_register_type: bad register number %d"),
+  internal_error (_("sparc32_pseudo_register_type: bad register number %d"),
                  regnum);
 }
 
 
   if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q60_REGNUM)
     return builtin_type (gdbarch)->builtin_long_double;
 
-  internal_error (__FILE__, __LINE__,
-                 _("sparc64_pseudo_register_type: bad register number %d"),
+  internal_error (_("sparc64_pseudo_register_type: bad register number %d"),
                  regnum);
 }
 
   if (regnum >= gdbarch_num_regs (gdbarch))
     return sparc64_pseudo_register_type (gdbarch, regnum);
 
-  internal_error (__FILE__, __LINE__, _("invalid regnum"));
+  internal_error (_("invalid regnum"));
 }
 
 static enum register_status
 
     if (print_frame_info == print_frame_info_choices[i])
       return print_frame_info_print_what[i];
 
-  internal_error (__FILE__, __LINE__,
-                 "Unexpected print frame-info value `%s'.",
+  internal_error ("Unexpected print frame-info value `%s'.",
                  print_frame_info);
 }
 
 
 
     gdb_assert (m_have_parsed_args);
     if (m_parsed_args.empty ())
-      internal_error (__FILE__, __LINE__,
-                     _("Probe '%s' apparently does not have arguments, but \n"
+      internal_error (_("Probe '%s' apparently does not have arguments, but \n"
                        "GDB is requesting its argument number %u anyway.  "
                        "This should not happen.  Please report this bug."),
                      this->get_name ().c_str (), n);
 
     if (n > m_parsed_args.size ())
-      internal_error (__FILE__, __LINE__,
-                     _("Probe '%s' has %d arguments, but GDB is requesting\n"
+      internal_error (_("Probe '%s' has %d arguments, but GDB is requesting\n"
                        "argument %u.  This should not happen.  Please\n"
                        "report this bug."),
                      this->get_name ().c_str (),
                                                newregname.size ());
 
          if (regnum == -1)
-           internal_error (__FILE__, __LINE__,
-                           _("Invalid register name '%s' after replacing it"
+           internal_error (_("Invalid register name '%s' after replacing it"
                              " (previous name was '%s')"),
                            newregname.c_str (), regname.c_str ());
 
 
               should occur, we'd like to know about it, so error out,
               fatally.  */
            if (mfunsym.value_address () == pc)
-             internal_error (__FILE__, __LINE__,
-               _("Infinite recursion detected in find_pc_sect_line;"
+             internal_error (_("Infinite recursion detected in find_pc_sect_line;"
                  "please file a bug report"));
 
            return find_pc_line (mfunsym.value_address (), 0);
 
          return;
        }
 
-      internal_error (__FILE__, __LINE__,
-                     "Type \"%s\" has an unknown kind %d",
+      internal_error ("Type \"%s\" has an unknown kind %d",
                      e->name.c_str (), e->kind);
     }
 
          return;
        }
 
-      internal_error (__FILE__, __LINE__,
-                     "Type \"%s\" has an unknown kind %d",
+      internal_error ("Type \"%s\" has an unknown kind %d",
                      e->name.c_str (), e->kind);
     }
 
 
   gdbarch_info info;
   if (!gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__,
-                   _("Could not remove target-supplied description"));
+    internal_error (_("Could not remove target-supplied description"));
 }
 
 /* Return the global current target description.  This should only be
        }
 
       if (arch_reg->type == NULL)
-       internal_error (__FILE__, __LINE__,
-                       "Register \"%s\" has an unknown type \"%s\"",
+       internal_error ("Register \"%s\" has an unknown type \"%s\"",
                        reg->name.c_str (), reg->type.c_str ());
     }
 
 
   for (const tdesc_compatible_info_up &compat : target_desc->compatible)
     if (compat->arch () == compatible)
-      internal_error (__FILE__, __LINE__,
-                     _("Attempted to add duplicate "
+      internal_error (_("Attempted to add duplicate "
                        "compatible architecture \"%s\""),
                      compatible->printable_name);
 
   gdb_assert (key != NULL && value != NULL);
 
   if (tdesc_property (target_desc, key) != NULL)
-    internal_error (__FILE__, __LINE__,
-                   _("Attempted to add duplicate property \"%s\""), key);
+    internal_error (_("Attempted to add duplicate property \"%s\""), key);
 
   target_desc->properties.emplace_back (key, value);
 }
 
 
   auto &func_slot = target_factories[&t];
   if (func_slot != nullptr)
-    internal_error (__FILE__, __LINE__,
-                   _("target already added (\"%s\")."), t.shortname);
+    internal_error (_("target already added (\"%s\")."), t.shortname);
   func_slot = func;
 
   if (targetlist == NULL)
   strata stratum = t->stratum ();
 
   if (stratum == dummy_stratum)
-    internal_error (__FILE__, __LINE__,
-                   _("Attempt to unpush the dummy target"));
+    internal_error (_("Attempt to unpush the dummy target"));
 
   /* Look for the specified target.  Note that a target can only occur
      once in the target stack.  */
       gdb_printf (gdb_stderr,
                  "pop_all_targets couldn't find target %s\n",
                  target->shortname ());
-      internal_error (__FILE__, __LINE__,
-                     _("failed internal consistency check"));
+      internal_error (_("failed internal consistency check"));
     }
 }
 
                     bool follow_child, bool detach_fork)
 {
   /* Some target returned a fork event, but did not know how to follow it.  */
-  internal_error (__FILE__, __LINE__,
-                 _("could not find a target to follow fork"));
+  internal_error (_("could not find a target to follow fork"));
 }
 
 /* See target.h.  */
 static void
 default_mourn_inferior (struct target_ops *self)
 {
-  internal_error (__FILE__, __LINE__,
-                 _("could not find a target to follow mourn inferior"));
+  internal_error (_("could not find a target to follow mourn inferior"));
 }
 
 void
   /* This function is only called if the target is running.  In that
      case there should have been a process_stratum target and it
      should either know how to create inferiors, or not...  */
-  internal_error (__FILE__, __LINE__, _("No targets found"));
+  internal_error (_("No targets found"));
 }
 
 /* Whether GDB is allowed to fall back to the default run target for
 set_native_target (target_ops *target)
 {
   if (the_native_target != NULL)
-    internal_error (__FILE__, __LINE__,
-                   _("native target already set (\"%s\")."),
+    internal_error (_("native target already set (\"%s\")."),
                    the_native_target->longname ());
 
   the_native_target = target;
 
            return 16;
        }
       else
-       internal_error (__FILE__, __LINE__, _("unexpected length %d of type"),
+       internal_error (_("unexpected length %d of type"),
                        len);
     }
 }
 
                }
              else
-               internal_error (__FILE__, __LINE__,
-                               _("unexpected type %d of arg %d"),
+               internal_error (_("unexpected type %d of arg %d"),
                                typecode, argnum);
            }
          else
-           internal_error (__FILE__, __LINE__,
-                           _("unexpected length %d of arg %d"), len, argnum);
+           internal_error (_("unexpected length %d of arg %d"), len, argnum);
 
          addr = sp + stack_offset;
          write_memory (addr, val, len);
 
                        found = 1;
                      break;
                    default:
-                     internal_error (__FILE__, __LINE__, _("unknown tfind type"));
+                     internal_error (_("unknown tfind type"));
                    }
                }
            }
 
                    found = 1;
                  break;
                default:
-                 internal_error (__FILE__, __LINE__, _("unknown tfind type"));
+                 internal_error (_("unknown tfind type"));
                }
            }
        }
 
   /* All of the "flaws" are serious bytecode generation issues that
      should never occur.  */
   if (aexpr->flaw != agent_flaw_none)
-    internal_error (__FILE__, __LINE__, _("expression is malformed"));
+    internal_error (_("expression is malformed"));
 
   /* If analysis shows a stack underflow, GDB must have done something
      badly wrong in its bytecode generation.  */
   if (aexpr->min_height < 0)
-    internal_error (__FILE__, __LINE__,
-                   _("expression has min height < 0"));
+    internal_error (_("expression has min height < 0"));
 
   /* Issue this error if the stack is predicted to get too deep.  The
      limit is rather arbitrary; a better scheme might be for the
                        i = user_reg_map_name_to_regnum (target_gdbarch (),
                                                         name, strlen (name));
                        if (i == -1)
-                         internal_error (__FILE__, __LINE__,
-                                         _("Register $%s not available"),
+                         internal_error (_("Register $%s not available"),
                                          name);
                        if (info_verbose)
                          gdb_printf ("OP_REGISTER: ");
 
 gdb_exception
 tui_interp::exec (const char *command_str)
 {
-  internal_error (__FILE__, __LINE__, _("tui_exec called"));
+  internal_error (_("tui_exec called"));
 }
 
 
 
 void ui_out_table::start_body ()
 {
   if (m_state != state::HEADERS)
-    internal_error (__FILE__, __LINE__,
-                   _("extra table_body call not allowed; there must be only "
+    internal_error (_("extra table_body call not allowed; there must be only "
                      "one table_body after a table_begin and before a "
                      "table_end."));
 
   /* Check if the number of defined headers matches the number of expected
      columns.  */
   if (m_headers.size () != m_nr_cols)
-    internal_error (__FILE__, __LINE__,
-                   _("number of headers differ from number of table "
+    internal_error (_("number of headers differ from number of table "
                      "columns."));
 
   m_state = state::BODY;
                                  const std::string &col_hdr)
 {
   if (m_state != state::HEADERS)
-    internal_error (__FILE__, __LINE__,
-                   _("table header must be specified after table_begin and "
+    internal_error (_("table header must be specified after table_begin and "
                      "before table_body."));
 
   std::unique_ptr<ui_out_hdr> header (new ui_out_hdr (m_headers.size () + 1,
 ui_out::table_begin (int nr_cols, int nr_rows, const std::string &tblid)
 {
   if (m_table_up != nullptr)
-    internal_error (__FILE__, __LINE__,
-                   _("tables cannot be nested; table_begin found before \
+    internal_error (_("tables cannot be nested; table_begin found before \
 previous table_end."));
 
   m_table_up.reset (new ui_out_table (level () + 1, nr_cols, tblid));
                      const std::string &col_name, const std::string &col_hdr)
 {
   if (m_table_up == nullptr)
-    internal_error (__FILE__, __LINE__,
-                   _("table_header outside a table is not valid; it must be \
+    internal_error (_("table_header outside a table is not valid; it must be \
 after a table_begin and before a table_body."));
 
   m_table_up->append_header (width, alignment, col_name, col_hdr);
 ui_out::table_body ()
 {
   if (m_table_up == nullptr)
-    internal_error (__FILE__, __LINE__,
-                   _("table_body outside a table is not valid; it must be "
+    internal_error (_("table_body outside a table is not valid; it must be "
                      "after a table_begin and before a table_end."));
 
   m_table_up->start_body ();
 ui_out::table_end ()
 {
   if (m_table_up == nullptr)
-    internal_error (__FILE__, __LINE__,
-                   _("misplaced table_end or missing table_begin."));
+    internal_error (_("misplaced table_end or missing table_begin."));
 
   do_table_end ();
 
          call_do_message (style, current_substring, 0);
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         _("failed internal consistency check"));
+         internal_error (_("failed internal consistency check"));
        }
     }
 }
   if (m_table_up != nullptr
       && m_table_up->current_state () != ui_out_table::state::BODY)
     {
-      internal_error (__FILE__, __LINE__,
-                     _("table_body missing; table fields must be \
+      internal_error (_("table_body missing; table fields must be \
 specified after table_body and inside a list."));
     }
 
       && m_table_up->get_next_header (fldno, width, align, &text))
     {
       if (*fldno != current->field_count ())
-       internal_error (__FILE__, __LINE__,
-                       _("ui-out internal error in handling headers."));
+       internal_error (_("ui-out internal error in handling headers."));
     }
   else
     {
 
   else if (problem->should_quit == internal_problem_no)
     quit_p = 0;
   else
-    internal_error (__FILE__, __LINE__, _("bad switch"));
+    internal_error (_("bad switch"));
 
   gdb_puts (_("\nThis is a bug, please report it."), gdb_stderr);
   if (REPORT_BUGS_TO[0])
   else if (problem->should_dump_core == internal_problem_no)
     dump_core_p = 0;
   else
-    internal_error (__FILE__, __LINE__, _("bad switch"));
+    internal_error (_("bad switch"));
 
   if (quit_p)
     {
 {
   if (size > 0)
     {
-      internal_error (__FILE__, __LINE__,
-                     _("virtual memory exhausted: can't allocate %ld bytes."),
+      internal_error (_("virtual memory exhausted: can't allocate %ld bytes."),
                      size);
     }
   else
     {
-      internal_error (__FILE__, __LINE__, _("virtual memory exhausted."));
+      internal_error (_("virtual memory exhausted."));
     }
 }
 
 
       return enum_constant_from_type (curtype, name);
 
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("non-aggregate type in value_aggregate_elt"));
+      internal_error (_("non-aggregate type in value_aggregate_elt"));
     }
 }
 
       else if (type->code () == TYPE_CODE_PTR)
        real_type = lookup_pointer_type (real_type);
       else
-       internal_error (__FILE__, __LINE__, _("Unexpected value type."));
+       internal_error (_("Unexpected value type."));
 
       /* Copy qualifiers to the pointer/reference.  */
       real_type = make_cv_type (TYPE_CONST (type), TYPE_VOLATILE (type),
 
     case 'o':
       val = int_string (val_long, 8, 0, 0, use_c_format); break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("failed internal consistency check"));
+      internal_error (_("failed internal consistency check"));
     } 
   gdb_puts (val, stream);
 }
 
       break;
 
     default:
-      internal_error (__FILE__, __LINE__, _("bad kind"));
+      internal_error (_("bad kind"));
     }
 
   /* Change the VALUE_LVAL to lval_internalvar so that future operations
 
     default:
       /* We can never get a component of any other kind.  */
-      internal_error (__FILE__, __LINE__, _("set_internalvar_component"));
+      internal_error (_("set_internalvar_component"));
     }
 }
 
       if (VALUE_LVAL (new_val) == lval_register
          && value_lazy (new_val)
          && VALUE_NEXT_FRAME_ID (new_val) == next_frame_id)
-       internal_error (__FILE__, __LINE__,
-                       _("infinite loop while fetching a register"));
+       internal_error (_("infinite loop while fetching a register"));
     }
 
   /* If it's still lazy (for instance, a saved register on the
           && value_computed_funcs (val)->read != NULL)
     value_computed_funcs (val)->read (val);
   else
-    internal_error (__FILE__, __LINE__, _("Unexpected lazy value type."));
+    internal_error (_("Unexpected lazy value type."));
 
   set_value_lazy (val, 0);
 }
 
 cygwin_set_dr (int i, CORE_ADDR addr)
 {
   if (i < 0 || i > 3)
-    internal_error (__FILE__, __LINE__,
-                   _("Invalid register %d in cygwin_set_dr.\n"), i);
+    internal_error (_("Invalid register %d in cygwin_set_dr.\n"), i);
   windows_process.dr[i] = addr;
 
   for (auto &th : windows_process.thread_list)
 
 
       text = fetch_xml_builtin (parser->dtd_name ());
       if (text == NULL)
-       internal_error (__FILE__, __LINE__,
-                       _("could not locate built-in DTD %s"),
+       internal_error (_("could not locate built-in DTD %s"),
                        parser->dtd_name ());
     }
   else
   /* Even if no DTD is provided, use the built-in DTD anyway.  */
   err = XML_UseForeignDTD (m_expat_parser, XML_TRUE);
   if (err != XML_ERROR_NONE)
-    internal_error (__FILE__, __LINE__,
-                   _("XML_UseForeignDTD failed: %s"),
+    internal_error (_("XML_UseForeignDTD failed: %s"),
                    XML_ErrorString (err));
 }
 
 
       else if (strcmp (attr.name, "groups") == 0)
        groups = (char *) attr.value.get ();
       else
-       internal_error (__FILE__, __LINE__,
-                       _("Unknown attribute name '%s'."), attr.name);
+       internal_error (_("Unknown attribute name '%s'."), attr.name);
     }
 
   gdb_assert (name);
 
       return reg->ctype;
     }
 
-  internal_error (__FILE__, __LINE__, _("invalid register number %d"), regnum);
+  internal_error (_("invalid register number %d"), regnum);
   return 0;
 }
 
       return regcache->raw_read (regnum, buffer);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("invalid register number %d"), regnum);
+    internal_error (_("invalid register number %d"), regnum);
 }
 
 
       regcache->raw_write (regnum, buffer);
     }
   else
-    internal_error (__FILE__, __LINE__,
-                   _("invalid register number %d"), regnum);
+    internal_error (_("invalid register number %d"), regnum);
 }
 
 static const reggroup *xtensa_ar_reggroup;
 
       /* On Xtensa, we can return up to 4 words (or 2 for call12).  */
       if (len > (callsize > 8 ? 8 : 16))
-       internal_error (__FILE__, __LINE__,
-                       _("cannot extract return value of %d bytes long"),
+       internal_error (_("cannot extract return value of %d bytes long"),
                        len);
 
       /* Get the register offset of the return
       callsize = extract_call_winsize (gdbarch, pc);
 
       if (len > (callsize > 8 ? 8 : 16))
-       internal_error (__FILE__, __LINE__,
-                       _("unimplemented for this length: %s"),
+       internal_error (_("unimplemented for this length: %s"),
                        pulongest (type->length ()));
       areg = arreg_number (gdbarch,
                           tdep->a0_base + 2 + callsize, wb);
     log.printf (_("\n\ta0_base: No Ax registers"));
 
   if (!log.empty ())
-    internal_error (__FILE__, __LINE__,
-                   _("the following are invalid: %s"), log.c_str ());
+    internal_error (_("the following are invalid: %s"), log.c_str ());
 }
 
 
 
                top = cnv.u8.val;
                break;
              default:
-               internal_error (__FILE__, __LINE__,
-                               "unhandled register size");
+               internal_error ("unhandled register size");
              }
          }
          break;
 
            }
            break;
          default:
-           internal_error (__FILE__, __LINE__,
-                           "unhandled register size: %d",
+           internal_error ("unhandled register size: %d",
                            x86_64_st_collect_regmap[i].size);
            break;
          }
 {
   if (idx >= X86_TDESC_LAST)
     {
-      internal_error (__FILE__, __LINE__,
-                     "unknown ipa tdesc index: %d", idx);
+      internal_error ("unknown ipa tdesc index: %d", idx);
     }
 
 #if defined __ILP32__
   return amd64_linux_read_description (idx2mask[idx], false);
 #endif
 
-  internal_error (__FILE__, __LINE__,
-                 "unknown ipa tdesc index: %d", idx);
+  internal_error ("unknown ipa tdesc index: %d", idx);
 }
 
 /* Allocate buffer for the jump pads.  The branch instruction has a
 
   arm_linux_hwbp_cap.bp_count = (unsigned char)(val & 0xff);
 
   if (arm_linux_hwbp_cap.wp_count > MAX_WPTS)
-    internal_error (__FILE__, __LINE__, "Unsupported number of watchpoints");
+    internal_error ("Unsupported number of watchpoints");
   if (arm_linux_hwbp_cap.bp_count > MAX_BPTS)
-    internal_error (__FILE__, __LINE__, "Unsupported number of breakpoints");
+    internal_error ("Unsupported number of breakpoints");
 }
 
 /* How many hardware breakpoints are available?  */
 
            }
            break;
          default:
-           internal_error (__FILE__, __LINE__, "unhandled register size: %d",
+           internal_error ("unhandled register size: %d",
                            i386_st_collect_regmap[i].size);
          }
       }
 {
   if (idx >= X86_TDESC_LAST)
     {
-      internal_error (__FILE__, __LINE__,
-                     "unknown ipa tdesc index: %d", idx);
+      internal_error ("unknown ipa tdesc index: %d", idx);
     }
   return i386_linux_read_description (idx2mask[idx]);
 }
 
       return 0;
     }
 
-  internal_error (__FILE__, __LINE__, _("unknown ptrace event %d"), event);
+  internal_error (_("unknown ptrace event %d"), event);
 }
 
 CORE_ADDR
     {
       struct thread_info *thread = get_lwp_thread (lwp);
 
-      internal_error (__FILE__, __LINE__,
-                     "unsuspend LWP %ld, suspended=%d\n", lwpid_of (thread),
+      internal_error ("unsuspend LWP %ld, suspended=%d\n", lwpid_of (thread),
                      lwp->suspended);
     }
 }
       if (requested_child->suspended
          && requested_child->status_pending_p)
        {
-         internal_error (__FILE__, __LINE__,
-                         "requesting an event out of a"
+         internal_error ("requesting an event out of a"
                          " suspended child?");
        }
 
 
   if (lwp->suspended != 0)
     {
-      internal_error (__FILE__, __LINE__,
-                     "LWP %ld is suspended, suspended=%d\n",
+      internal_error ("LWP %ld is suspended, suspended=%d\n",
                      lwpid_of (thread), lwp->suspended);
     }
   gdb_assert (lwp->stopped);
 
   if (lwp->suspended != 0)
     {
-      internal_error (__FILE__, __LINE__,
-                     "LWP %ld is suspended, suspended=%d\n",
+      internal_error ("LWP %ld is suspended, suspended=%d\n",
                      lwpid_of (thread), lwp->suspended);
     }
   gdb_assert (lwp->stopped);
        step = 1;
       else
        {
-         internal_error (__FILE__, __LINE__,
-                         "moving out of jump pad single-stepping"
+         internal_error ("moving out of jump pad single-stepping"
                          " not implemented on this target");
        }
     }
 
   if (lwp->suspended != 0)
     {
-      internal_error (__FILE__, __LINE__,
-                     "LWP %ld suspended=%d\n", lwpid_of (thread),
+      internal_error ("LWP %ld suspended=%d\n", lwpid_of (thread),
                      lwp->suspended);
     }
 
 
       return tdesc_powerpc_e500l;
 #endif
     default:
-      internal_error (__FILE__, __LINE__,
-                    "unknown ipa tdesc index: %d", idx);
+      internal_error ("unknown ipa tdesc index: %d", idx);
 #ifdef __powerpc64__
       return tdesc_powerpc_64l;
 #else
 
       return tdesc_s390_gs_linux64;
 #endif
     default:
-      internal_error (__FILE__, __LINE__,
-                     "unknown ipa tdesc index: %d", idx);
+      internal_error ("unknown ipa tdesc index: %d", idx);
 #ifdef __s390x__
       return tdesc_s390x_linux64;
 #else
 
     case raw_bkpt_type_access_wp:
       return hw_access;
     default:
-      internal_error (__FILE__, __LINE__,
-                     "bad raw breakpoint type %d", (int) raw_type);
+      internal_error ("bad raw breakpoint type %d", (int) raw_type);
     }
 }
 
 
       if (strcmp (name, find_register_by_number (tdesc, i).name) == 0)
        return i;
     }
-  internal_error (__FILE__, __LINE__, "Unknown register %s requested",
+  internal_error ("Unknown register %s requested",
                  name);
 }
 
 
       ((struct sockaddr_in6 *) iter->ai_addr)->sin6_addr = in6addr_any;
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("Invalid 'ai_family' %d\n"), iter->ai_family);
+      internal_error (_("Invalid 'ai_family' %d\n"), iter->ai_family);
     }
 
   if (bind (listen_desc, iter->ai_addr, iter->ai_addrlen) != 0)
 
       if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_jump_pad_buffer,
                                      &gdb_jump_pad_head))
        {
-         internal_error (__FILE__, __LINE__,
-                         "error extracting jump_pad_buffer");
+         internal_error ("error extracting jump_pad_buffer");
        }
     }
 
       if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_trampoline_buffer,
                                      &trampoline_buffer_tail))
        {
-         internal_error (__FILE__, __LINE__,
-                         "error extracting trampoline_buffer");
+         internal_error ("error extracting trampoline_buffer");
        }
 
       if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_trampoline_buffer_end,
                                      &trampoline_buffer_head))
        {
-         internal_error (__FILE__, __LINE__,
-                         "error extracting trampoline_buffer_end");
+         internal_error ("error extracting trampoline_buffer_end");
        }
     }
 
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_trampoline_buffer_end,
                                  &trampoline_end))
     {
-      internal_error (__FILE__, __LINE__,
-                     "error extracting trampoline_buffer_end");
+      internal_error ("error extracting trampoline_buffer_end");
     }
   
   if (buf)
       if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_trampoline_buffer_error,
                                  &errbuf))
        {
-         internal_error (__FILE__, __LINE__,
-                         "error extracting errbuf");
+         internal_error ("error extracting errbuf");
        }
 
       read_inferior_memory (errbuf, (unsigned char *) buf, 100);
 
     }
   else
-    internal_error (__FILE__, __LINE__, "Unknown tracepoint type");
+    internal_error ("Unknown tracepoint type");
 
   if (tpoint->handle == NULL)
     {
     {
       if (write_inferior_integer (ipa_sym_addrs.addr_tracing, 1))
        {
-         internal_error (__FILE__, __LINE__,
-                         "Error setting tracing variable in lib");
+         internal_error ("Error setting tracing variable in lib");
        }
 
       if (write_inferior_data_pointer (ipa_sym_addrs.addr_stopping_tracepoint,
                                       0))
        {
-         internal_error (__FILE__, __LINE__,
-                         "Error clearing stopping_tracepoint variable"
+         internal_error ("Error clearing stopping_tracepoint variable"
                          " in lib");
        }
 
       if (write_inferior_integer (ipa_sym_addrs.addr_trace_buffer_is_full, 0))
        {
-         internal_error (__FILE__, __LINE__,
-                         "Error clearing trace_buffer_is_full variable"
+         internal_error ("Error clearing trace_buffer_is_full variable"
                          " in lib");
        }
 
     {
       if (write_inferior_integer (ipa_sym_addrs.addr_tracing, 0))
        {
-         internal_error (__FILE__, __LINE__,
-                         "Error clearing tracing variable in lib");
+         internal_error ("Error clearing tracing variable in lib");
        }
     }
 
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_jump_pad_buffer,
                                  &ipa_gdb_jump_pad_buffer))
     {
-      internal_error (__FILE__, __LINE__,
-                     "error extracting `gdb_jump_pad_buffer'");
+      internal_error ("error extracting `gdb_jump_pad_buffer'");
     }
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_jump_pad_buffer_end,
                                  &ipa_gdb_jump_pad_buffer_end))
     {
-      internal_error (__FILE__, __LINE__,
-                     "error extracting `gdb_jump_pad_buffer_end'");
+      internal_error ("error extracting `gdb_jump_pad_buffer_end'");
     }
 
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_trampoline_buffer,
                                  &ipa_gdb_trampoline_buffer))
     {
-      internal_error (__FILE__, __LINE__,
-                     "error extracting `gdb_trampoline_buffer'");
+      internal_error ("error extracting `gdb_trampoline_buffer'");
     }
   if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_trampoline_buffer_end,
                                  &ipa_gdb_trampoline_buffer_end))
     {
-      internal_error (__FILE__, __LINE__,
-                     "error extracting `gdb_trampoline_buffer_end'");
+      internal_error ("error extracting `gdb_trampoline_buffer_end'");
     }
 
   if (ipa_gdb_jump_pad_buffer <= stop_pc
       if (read_inferior_data_pointer (ipa_sym_addrs.addr_gdb_tp_heap_buffer,
                                      &target_tp_heap))
        {
-         internal_error (__FILE__, __LINE__,
-                         "couldn't get target heap head pointer");
+         internal_error ("couldn't get target heap head pointer");
        }
     }
 
                                      + offsetof (struct tracepoint, next),
                                      &tp_prev_target_next_addr))
        {
-         internal_error (__FILE__, __LINE__,
-                         "error reading `tp_prev->next'");
+         internal_error ("error reading `tp_prev->next'");
        }
 
       /* tpoint->next = tp_prev->next */
 
       if (ipa_tframe.tpnum == 0)
        {
-         internal_error (__FILE__, __LINE__,
-                         "Uploading: No (more) fast traceframes, but"
+         internal_error ("Uploading: No (more) fast traceframes, but"
                          " ipa_traceframe_count == %u??\n",
                          ipa_traceframe_write_count
                          - ipa_traceframe_read_count);
 
       return _("Intel Processor Trace");
     }
 
-  internal_error (__FILE__, __LINE__, _("Unknown branch trace format"));
+  internal_error (_("Unknown branch trace format"));
 }
 
 /* See btrace-common.h.  */
       return "pt";
     }
 
-  internal_error (__FILE__, __LINE__, _("Unknown branch trace format"));
+  internal_error (_("Unknown branch trace format"));
 }
 
 /* See btrace-common.h.  */
       return;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unkown branch trace format."));
+  internal_error (_("Unkown branch trace format."));
 }
 
 /* See btrace-common.h.  */
       return (variant.pt.size == 0);
     }
 
-  internal_error (__FILE__, __LINE__, _("Unkown branch trace format."));
+  internal_error (_("Unkown branch trace format."));
 }
 
 /* See btrace-common.h.  */
       return 0;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unkown branch trace format."));
+  internal_error (_("Unkown branch trace format."));
 }
 
          catchers.front ().state = CATCHER_RUNNING;
          return 1;
        default:
-         internal_error (__FILE__, __LINE__, _("bad state"));
+         internal_error (_("bad state"));
        }
     case CATCHER_RUNNING:
       switch (action)
          /* See also throw_exception.  */
          return 1;
        default:
-         internal_error (__FILE__, __LINE__, _("bad switch"));
+         internal_error (_("bad switch"));
        }
     case CATCHER_RUNNING_1:
       switch (action)
          /* See also throw_exception.  */
          return 1;
        default:
-         internal_error (__FILE__, __LINE__, _("bad switch"));
+         internal_error (_("bad switch"));
        }
     case CATCHER_ABORTING:
       switch (action)
            return 0;
          }
        default:
-         internal_error (__FILE__, __LINE__, _("bad state"));
+         internal_error (_("bad state"));
        }
     default:
-      internal_error (__FILE__, __LINE__, _("bad switch"));
+      internal_error (_("bad switch"));
     }
 }
 
 
      status (the printed length) with a non-NULL buffer should never
      happen, but just to be sure.  */
   if (ret == NULL || status < 0)
-    internal_error (__FILE__, __LINE__, _("vasprintf call failed"));
+    internal_error (_("vasprintf call failed"));
   return gdb::unique_xmalloc_ptr<char> (ret);
 }
 
 
 /* See gdbsupport/errors.h.  */
 
 void
-internal_error (const char *file, int line, const char *fmt, ...)
+internal_error_loc (const char *file, int line, const char *fmt, ...)
 {
   va_list ap;
 
 /* See gdbsupport/errors.h.  */
 
 void
-internal_warning (const char *file, int line, const char *fmt, ...)
+internal_warning_loc (const char *file, int line, const char *fmt, ...)
 {
   va_list ap;
 
 
    functions do not return.  An error message is constructed using
    a printf- or vprintf-style argument list.  FILE and LINE
    indicate the file and line number where the programming error
-   was detected.  The function "internal_verror" must be provided
+   was detected.  Most client code should call the internal_error
+   wrapper macro instead, which expands the source location
+   automatically.  The function "internal_verror" must be provided
    by the client.  */
 
-extern void internal_error (const char *file, int line,
-                           const char *fmt, ...)
+extern void internal_error_loc (const char *file, int line,
+                               const char *fmt, ...)
      ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 4);
 
+#define internal_error(fmt, ...)                               \
+  internal_error_loc (__FILE__, __LINE__, fmt, ##__VA_ARGS__)
+
 extern void internal_verror (const char *file, int line,
                             const char *fmt, va_list args)
      ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0);
    argument list.  The function "internal_vwarning" must be provided
    by the client.  */
 
-extern void internal_warning (const char *file, int line,
-                             const char *fmt, ...)
+extern void internal_warning_loc (const char *file, int line,
+                                 const char *fmt, ...)
      ATTRIBUTE_PRINTF (3, 4);
 
+#define internal_warning(fmt, ...)                             \
+  internal_warning_loc (__FILE__, __LINE__, fmt, ##__VA_ARGS__)
+
 extern void internal_vwarning (const char *file, int line,
                               const char *fmt, va_list args)
      ATTRIBUTE_PRINTF (3, 0);
 
          res = check_async_event_handlers ();
          break;
        default:
-         internal_error (__FILE__, __LINE__,
-                         "unexpected event_source_head %d",
+         internal_error ("unexpected event_source_head %d",
                          event_source_head);
        }
 
 
 /* This prints an "Assertion failed" message, asking the user if they
    want to continue, dump core, or just exit.  */
 #define gdb_assert_fail(assertion, file, line, function)                      \
-  internal_error (file, line, _("%s: Assertion `%s' failed."),                \
-                 function, assertion)
+  internal_error_loc (file, line, _("%s: Assertion `%s' failed."),                \
+                     function, assertion)
 
 /* The canonical form of gdb_assert (0).
    MESSAGE is a string to include in the error message.  */
 
 #define gdb_assert_not_reached(message, ...) \
-  internal_error (__FILE__, __LINE__, _("%s: " message), __func__, \
-                 ##__VA_ARGS__)
+  internal_error_loc (__FILE__, __LINE__, _("%s: " message), __func__, \
+                     ##__VA_ARGS__)
 
 #endif /* COMMON_GDB_ASSERT_H */
 
                 temp[2], temp[1], temp[0]);
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("failed internal consistency check"));
+      internal_error (_("failed internal consistency check"));
     }
 
   return str;
                 temp[2], temp[1], temp[0]);
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("failed internal consistency check"));
+      internal_error (_("failed internal consistency check"));
     }
 
   return str;
   if (hex_len > width)
     width = hex_len;
   if (width + 2 >= PRINT_CELL_SIZE)
-    internal_error (__FILE__, __LINE__, _("\
+    internal_error (_("\
 hex_string_custom: insufficient space to store result"));
 
   strcpy (result_end - width - 2, "0x");
          return result + 1;
       }
     default:
-      internal_error (__FILE__, __LINE__,
-                     _("failed internal consistency check"));
+      internal_error (_("failed internal consistency check"));
     }
 }