internal_verror().
+Wed Feb 7 19:41:21 2001 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (internal_error, internal_verror): Add __FILE__ and
+ __LINE__ parameter.
+ * utils.c (internal_error, internal_verror): Update.
+
+ * v850-tdep.c: Update calls to internal_error.
+ * utils.c: Ditto.
+ * ui-out.c: Ditto.
+ * ui-file.c: Ditto.
+ * target.h: Ditto.
+ * symtab.h: Ditto.
+ * symm-nat.c: Ditto.
+ * sparc-tdep.c: Ditto.
+ * source.c: Ditto.
+ * serial.c: Ditto.
+ * rs6000-tdep.c: Ditto.
+ * rs6000-nat.c: Ditto.
+ * remote.c: Ditto.
+ * remote-vx.c: Ditto.
+ * remote-sim.c: Ditto.
+ * remote-mips.c: Ditto.
+ * regcache.c: Ditto.
+ * objfiles.h: Ditto.
+ * objfiles.c: Ditto.
+ * mn10300-tdep.c: Ditto.
+ * mips-tdep.c: Ditto.
+ * maint.c: Ditto.
+ * m68k-tdep.c: Ditto.
+ * m3-nat.c: Ditto.
+ * language.c: Ditto.
+ * infptrace.c: Ditto.
+ * inferior.h: Ditto.
+ * infcmd.c: Ditto.
+ * ia64-tdep.c: Ditto.
+ * i386-tdep.c: Ditto.
+ * i386-linux-nat.c: Ditto.
+ * hppah-nat.c: Ditto.
+ * go32-nat.c: Ditto.
+ * findvar.c: Ditto.
+ * f-lang.c: Ditto.
+ * elfread.c: Ditto.
+ * event-loop.c: Ditto.
+ * dwarf2read.c: Ditto.
+ * dsrec.c: Ditto.
+ * d30v-tdep.c: Ditto.
+ * d10v-tdep.c: Ditto.
+ * cli/cli-setshow.c: Ditto.
+ * cli/cli-script.c: Ditto.
+ * ch-exp.c: Ditto.
+ * breakpoint.c: Ditto.
+ * ax-gdb.c: Ditto.
+ * arch-utils.c: Ditto.
+ * a29k-tdep.c: Ditto.
+ * gdb_assert.h: Ditto.
+ * gdbarch.sh: Ditto.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
2001-02-07 Andrew Cagney <ac131313@redhat.com>
From Mark Kettenis <kettenis@gnu.org>:
--
-Add __LINE__ and __FILE__ to internal_error().
-
---
-
GDB probably doesn't build on FreeBSD pre 2.2.x
http://sourceware.cygnus.com/ml/gdb-patches/2000-05/msg00378.html
/* Target-machine dependent code for the AMD 29000
- Copyright 1990, 1991, 1992, 1993, 1994, 1995
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon.
frame = create_new_frame (argv[0], argv[1]);
if (!frame)
- internal_error ("create_new_frame returned invalid frame id");
+ internal_error (__FILE__, __LINE__,
+ "create_new_frame returned invalid frame id");
/* Creating a new frame munges the `frame' value from the current
GR1, so we restore it again here. FIXME, untangle all this
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998-1999, Free Software Foundation, Inc.
+ Copyright 1998-1999, 2001 Free Software Foundation, Inc.
This file is part of GDB.
else
return names[i];
#else
- internal_error ("legacy_register_name: called.");
+ internal_error (__FILE__, __LINE__,
+ "legacy_register_name: called.");
return NULL;
#endif
}
case LITTLE_ENDIAN:
return &floatformat_ieee_single_little;
default:
- internal_error ("default_float_format: bad byte order");
+ internal_error (__FILE__, __LINE__,
+ "default_float_format: bad byte order");
}
}
case LITTLE_ENDIAN:
return &floatformat_ieee_double_little;
default:
- internal_error ("default_double_format: bad byte order");
+ internal_error (__FILE__, __LINE__,
+ "default_double_format: bad byte order");
}
}
}
}
else
- internal_error ("set_endian: bad value");
+ internal_error (__FILE__, __LINE__,
+ "set_endian: bad value");
show_endian (NULL, from_tty);
}
set_endian_from_file (bfd *abfd)
{
if (GDB_MULTI_ARCH)
- internal_error ("set_endian_from_file: not for multi-arch");
+ internal_error (__FILE__, __LINE__,
+ "set_endian_from_file: not for multi-arch");
if (TARGET_BYTE_ORDER_SELECTABLE_P)
{
int want;
arch_ok (const struct bfd_arch_info *arch)
{
if (GDB_MULTI_ARCH)
- internal_error ("arch_ok: not multi-arched");
+ internal_error (__FILE__, __LINE__,
+ "arch_ok: not multi-arched");
/* Should be performing the more basic check that the binary is
compatible with GDB. */
/* Check with the target that the architecture is valid. */
enum set_arch type)
{
if (GDB_MULTI_ARCH)
- internal_error ("set_arch: not multi-arched");
+ internal_error (__FILE__, __LINE__,
+ "set_arch: not multi-arched");
switch (type)
{
case set_arch_auto:
{
const struct bfd_arch_info *wanted = bfd_lookup_arch (arch, mach);
if (GDB_MULTI_ARCH)
- internal_error ("set_architecture_from_arch_mach: not multi-arched");
+ internal_error (__FILE__, __LINE__,
+ "set_architecture_from_arch_mach: not multi-arched");
if (wanted != NULL)
set_arch (wanted, set_arch_manual);
else
- internal_error ("gdbarch: hardwired architecture/machine not recognized");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: hardwired architecture/machine not recognized");
}
/* Set the architecture from a BFD (deprecated) */
{
const struct bfd_arch_info *wanted = bfd_get_arch_info (abfd);
if (GDB_MULTI_ARCH)
- internal_error ("set_architecture_from_file: not multi-arched");
+ internal_error (__FILE__, __LINE__,
+ "set_architecture_from_file: not multi-arched");
if (target_architecture_auto)
{
set_arch (wanted, set_arch_auto);
memset (&info, 0, sizeof info);
info.bfd_arch_info = bfd_scan_arch (set_architecture_string);
if (info.bfd_arch_info == NULL)
- internal_error ("set_architecture: bfd_scan_arch failed");
+ internal_error (__FILE__, __LINE__,
+ "set_architecture: bfd_scan_arch failed");
if (gdbarch_update_p (info))
target_architecture_auto = 0;
else
const struct bfd_arch_info *arch
= bfd_scan_arch (set_architecture_string);
if (arch == NULL)
- internal_error ("set_architecture: bfd_scan_arch failed");
+ internal_error (__FILE__, __LINE__,
+ "set_architecture: bfd_scan_arch failed");
set_arch (arch, set_arch_manual);
}
show_architecture (NULL, from_tty);
chosen = *arch;
}
if (chosen == NULL)
- internal_error ("initialize_current_architecture: No arch");
+ internal_error (__FILE__, __LINE__,
+ "initialize_current_architecture: No arch");
info.bfd_arch_info = bfd_scan_arch (chosen);
if (info.bfd_arch_info == NULL)
- internal_error ("initialize_current_architecture: Arch not found");
+ internal_error (__FILE__, __LINE__,
+ "initialize_current_architecture: Arch not found");
}
/* take several guesses at a byte order. */
{
if (! gdbarch_update_p (info))
{
- internal_error ("initialize_current_architecture: Selection of initial architecture failed");
+ internal_error (__FILE__, __LINE__,
+ "initialize_current_architecture: Selection of initial architecture failed");
}
}
/* GDB-specific functions for operating on agent expressions
- Copyright 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
implementing something we should be (this code's fault).
In any case, it's a bug the user shouldn't see. */
default:
- internal_error ("ax-gdb.c (gen_fetch): strange size");
+ internal_error (__FILE__, __LINE__,
+ "gen_fetch: strange size");
}
gen_sign_extend (ax, type);
pointer (other code's fault), or we're not implementing
something we should be (this code's fault). In any case,
it's a bug the user shouldn't see. */
- internal_error ("ax-gdb.c (gen_fetch): bad type code");
+ internal_error (__FILE__, __LINE__,
+ "gen_fetch: bad type code");
}
}
break;
case LOC_CONST_BYTES:
- internal_error ("ax-gdb.c (gen_var_ref): LOC_CONST_BYTES symbols are not supported");
+ internal_error (__FILE__, __LINE__,
+ "gen_var_ref: LOC_CONST_BYTES symbols are not supported");
/* Variable at a fixed location in memory. Easy. */
case LOC_STATIC:
/* The caller should check the type, because several operators use
this, and we don't know what error message to generate. */
if (value->type->code != TYPE_CODE_PTR)
- internal_error ("ax-gdb.c (gen_deref): expected a pointer");
+ internal_error (__FILE__, __LINE__,
+ "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
/* Make sure this isn't C++. */
if (TYPE_N_BASECLASSES (type) != 0)
- internal_error ("ax-gdb.c (find_field): derived classes supported");
+ internal_error (__FILE__, __LINE__,
+ "find_field: derived classes supported");
for (i = 0; i < TYPE_NFIELDS (type); i++)
{
return i;
if (this_name[0] == '\0')
- internal_error ("ax-gdb.c (find_field): anonymous unions not supported");
+ internal_error (__FILE__, __LINE__,
+ "find_field: anonymous unions not supported");
}
error ("Couldn't find member named `%s' in struct/union `%s'",
/* Can we fetch the number of bits requested at all? */
if ((end - start) > ((1 << num_ops) * 8))
- internal_error ("ax-gdb.c (gen_bitfield_ref): bitfield too wide");
+ internal_error (__FILE__, __LINE__,
+ "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. */
default:
/* We should only list operators in the outer case statement
that we actually handle in the inner case statement. */
- internal_error ("ax-gdb.c (gen_expr): op case sets don't match");
+ internal_error (__FILE__, __LINE__,
+ "gen_expr: op case sets don't match");
}
break;
the given type, and dereference it. */
if (value->kind != axs_rvalue)
/* This would be weird. */
- internal_error ("ax-gdb.c (gen_expr): OP_MEMVAL operand isn't an rvalue???");
+ internal_error (__FILE__, __LINE__,
+ "gen_expr: OP_MEMVAL operand isn't an rvalue???");
value->type = type;
value->kind = axs_lvalue_memory;
}
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 ("ax-gdb.c (gen_expr): unhandled struct case");
+ internal_error (__FILE__, __LINE__,
+ "gen_expr: unhandled struct case");
}
break;
return print_it_typical (bs);
break;
default:
- internal_error ("print_bp_stop_message: unrecognized enum value");
+ internal_error (__FILE__, __LINE__,
+ "print_bp_stop_message: unrecognized enum value");
break;
}
}
annotate_field (1);
if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0])))
|| ((int) b->type != bptypes[(int) b->type].type))
- internal_error ("bptypes table does not describe type #%d.",
+ internal_error (__FILE__, __LINE__,
+ "bptypes table does not describe type #%d.",
(int) b->type);
#ifdef UI_OUT
ui_out_field_string (uiout, "type", bptypes[(int) b->type].description);
switch (b->type)
{
case bp_none:
- internal_error ("print_one_breakpoint: bp_none encountered\n");
+ internal_error (__FILE__, __LINE__,
+ "print_one_breakpoint: bp_none encountered\n");
break;
case bp_watchpoint:
/* Permanent breakpoint should always be inserted. */
if (! perm_bp->inserted)
- internal_error ("allegedly permanent breakpoint is not "
+ internal_error (__FILE__, __LINE__,
+ "allegedly permanent breakpoint is not "
"actually inserted");
ALL_BREAKPOINTS (b)
if (b != perm_bp)
{
if (b->inserted)
- internal_error ("another breakpoint was inserted on top of "
+ internal_error (__FILE__, __LINE__,
+ "another breakpoint was inserted on top of "
"a permanent breakpoint");
if (b->enable != disabled
If there is a permanent breakpoint somewhere, it should
always be the only one inserted. */
if (b->enable == permanent)
- internal_error ("another breakpoint was inserted on top of "
+ internal_error (__FILE__, __LINE__,
+ "another breakpoint was inserted on top of "
"a permanent breakpoint");
if (b->type == bp_hardware_breakpoint)
/* Parser for GNU CHILL (CCITT High-Level Language) -*- C -*-
- Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1995, 2001 Free Software Foundation, Inc.
This file is part of GDB.
peek_token_ (int i)
{
if (i > MAX_LOOK_AHEAD)
- internal_error ("ch-exp.c - too much lookahead");
+ internal_error (__FILE__, __LINE__,
+ "too much lookahead");
if (terminal_buffer[i] == TOKEN_NOT_READ)
{
terminal_buffer[i] = ch_lex ();
{
int i;
if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
- internal_error ("ch-exp.c - cannot pushback token");
+ internal_error (__FILE__, __LINE__,
+ "cannot pushback token");
for (i = MAX_LOOK_AHEAD; i > 0; i--)
{
terminal_buffer[i] = terminal_buffer[i - 1];
{
if (PEEK_TOKEN () != token)
{
- internal_error ("ch-exp.c - expected token %d", (int) token);
+ internal_error (__FILE__, __LINE__,
+ "expected token %d", (int) token);
}
FORWARD_TOKEN ();
}
error ("Symbol \"%s\" names no location.", inputname);
break;
default:
- internal_error ("unhandled SYMBOL_CLASS in ch_lex()");
+ internal_error (__FILE__, __LINE__,
+ "unhandled SYMBOL_CLASS in ch_lex()");
break;
}
}
/* GDB CLI command scripting.
- Copyright 1986-2000 Free Software Foundation, Inc.
+ Copyright 1986-2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
{
struct user_args *oargs = user_args;
if (!user_args)
- internal_error ("Internal error, arg_cleanup called with no user args.\n");
+ internal_error (__FILE__, __LINE__,
+ "arg_cleanup called with no user args.\n");
user_args = user_args->next;
xfree (oargs);
break;
default:
/* Should never come here as hookc would be 0. */
- internal_error ("%s:%d: bad switch", __FILE__, __LINE__);
+ internal_error (__FILE__, __LINE__, "bad switch");
}
}
}
if (stream == NULL)
{
- internal_error ("called with NULL file pointer!");
+ internal_error (__FILE__, __LINE__, "called with NULL file pointer!");
}
old_cleanups = make_cleanup (do_fclose_cleanup, stream);
/* Handle set and show GDB commands.
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
fputs_filtered ("auto", stb->stream);
break;
default:
- internal_error ("do_setshow_command: invalid var_auto_boolean");
+ internal_error (__FILE__, __LINE__,
+ "do_setshow_command: invalid var_auto_boolean");
break;
}
break;
fputs_filtered ("auto", gdb_stdout);
break;
default:
- internal_error ("do_setshow_command: invalid var_auto_boolean");
+ internal_error (__FILE__, __LINE__,
+ "do_setshow_command: invalid var_auto_boolean");
break;
}
break;
/* Target-dependent code for Mitsubishi D10V, for GDB.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
{
/* If there's no disassembler, something is very wrong. */
if (tm_print_insn == NULL)
- internal_error ("print_insn: no disassembler");
+ internal_error (__FILE__, __LINE__,
+ "print_insn: no disassembler");
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
tm_print_insn_info.endian = BFD_ENDIAN_BIG;
set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_little);
break;
default:
- internal_error ("d10v_gdbarch_init: bad byte order for float format");
+ internal_error (__FILE__, __LINE__,
+ "d10v_gdbarch_init: bad byte order for float format");
}
set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
/* Target-dependent code for Mitsubishi D30V, for GDB.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
{
/* If there's no disassembler, something is very wrong. */
if (tm_print_insn == NULL)
- internal_error ("print_insn: no disassembler");
+ internal_error (__FILE__, __LINE__,
+ "print_insn: no disassembler");
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
tm_print_insn_info.endian = BFD_ENDIAN_BIG;
message. */
extern char *error_last_message (void);
-extern NORETURN void internal_verror (const char *, va_list ap) ATTR_NORETURN;
+extern NORETURN void internal_verror (const char *file, int line,
+ const char *, va_list ap) ATTR_NORETURN;
-extern NORETURN void internal_error (char *, ...) ATTR_NORETURN;
+extern NORETURN void internal_error (const char *file, int line,
+ const char *, ...) ATTR_NORETURN ATTR_FORMAT (printf, 3, 4);
extern NORETURN void nomem (long) ATTR_NORETURN;
/* S-record download support for GDB, the GNU debugger.
- Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
This file is part of GDB.
else if (tmp & SREC_4_BYTE_ADDR)
addr_size = 4;
else
- internal_error ("make_srec: Bad address (0x%x), or bad flags (0x%x).",
+ internal_error (__FILE__, __LINE__,
+ "make_srec: Bad address (0x%x), or bad flags (0x%x).",
targ_addr, flags);
/* Now that we know the address size, we can figure out how much
/* DWARF 2 debugging format support for GDB.
- Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 2001
+ Free Software Foundation, Inc.
Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
Inc. with support from Florida State University (under contract
info_ptr += 1;
signed_addr = bfd_get_sign_extend_vma (abfd);
if (signed_addr < 0)
- internal_error ("read_comp_unit_head: dwarf from non elf file");
+ internal_error (__FILE__, __LINE__,
+ "read_comp_unit_head: dwarf from non elf file");
cu_header->signed_addr_p = signed_addr;
return info_ptr;
}
retval = bfd_get_signed_64 (abfd, (bfd_byte *) buf);
break;
default:
- internal_error ("read_address: bad switch, signed");
+ internal_error (__FILE__, __LINE__,
+ "read_address: bad switch, signed");
}
}
else
retval = bfd_get_64 (abfd, (bfd_byte *) buf);
break;
default:
- internal_error ("read_address: bad switch, unsigned");
+ internal_error (__FILE__, __LINE__,
+ "read_address: bad switch, unsigned");
}
}
*bytes_read = 8;
break;
default:
- internal_error ("read_offset: bad switch");
+ internal_error (__FILE__, __LINE__,
+ "read_offset: bad switch");
}
return retval;
/* Read ELF (Executable and Linking Format) object files for GDB.
- Copyright 1991, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
+ Copyright 1991, 92, 93, 94, 95, 96, 1998, 2001
+ Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support.
This file is part of GDB.
}
}
else
- internal_error ("Section index uninitialized.");
+ internal_error (__FILE__, __LINE__,
+ "Section index uninitialized.");
/* Bfd symbols are section relative. */
symaddr = sym->value + sym->section->vma;
/* Relocate non-absolute symbols by the section offset. */
if (index != -1)
sectinfo->sections[index] = symaddr;
else
- internal_error ("Section index uninitialized.");
+ internal_error (__FILE__, __LINE__,
+ "Section index uninitialized.");
/* The special local symbols don't go in the
minimal symbol table, so ignore this one. */
continue;
if (poll (&fds, 1, 0) == 1 && (fds.revents & POLLNVAL))
use_poll = 0;
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
if (use_poll)
#ifdef HAVE_POLL
create_file_handler (fd, POLLIN, proc, client_data);
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif
}
else
(gdb_notifier.poll_fds + gdb_notifier.num_fds - 1)->events = mask;
(gdb_notifier.poll_fds + gdb_notifier.num_fds - 1)->revents = 0;
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
else
gdb_notifier.poll_fds = new_poll_fds;
gdb_notifier.num_fds--;
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
else
else
file_ptr->error = 0;
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
else
if (num_found == -1 && errno != EINTR)
perror_with_name ("Poll");
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
else
file_ptr->ready_mask = (gdb_notifier.poll_fds + i)->revents;
}
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
else
#ifdef HAVE_POLL
gdb_notifier.poll_timeout = delta.tv_sec * 1000;
#else
- internal_error ("event-loop.c : use_poll without HAVE_POLL");
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
#endif /* HAVE_POLL */
}
else
/* Fortran language support routines for GDB, the GNU debugger.
- Copyright 1993, 1994, 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 2000, 2001 Free Software Foundation, Inc.
Contributed by Motorola. Adapted from the C parser by Farooq Butt
(fmbutt@engage.sps.mot.com).
item at the head of the queue is the one you want) */
if (saved_bf_list == NULL)
- internal_error ("cannot get .bf node off empty list");
+ internal_error (__FILE__, __LINE__,
+ "cannot get .bf node off empty list");
if (current_head_bf_list != NULL)
if (current_head_bf_list->symnum_fcn == the_function)
/* Find a variable's value in memory, for GDB, the GNU debugger.
- Copyright 1986, 87, 89, 91, 94, 95, 96, 1998
+ Copyright 1986, 87, 89, 91, 94, 95, 96, 1998, 2001
Free Software Foundation, Inc.
This file is part of GDB.
{
if (TYPE_CODE (type) != TYPE_CODE_PTR
&& TYPE_CODE (type) != TYPE_CODE_REF)
- internal_error ("findvar.c (extract_typed_address): "
+ internal_error (__FILE__, __LINE__,
+ "extract_typed_address: "
"type is not a pointer or reference");
return POINTER_TO_ADDRESS (type, buf);
{
if (TYPE_CODE (type) != TYPE_CODE_PTR
&& TYPE_CODE (type) != TYPE_CODE_REF)
- internal_error ("findvar.c (store_typed_address): "
+ internal_error (__FILE__, __LINE__,
+ "store_typed_address: "
"type is not a pointer or reference");
ADDRESS_TO_POINTER (type, buf, addr);
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
REGISTER_RAW_SIZE (regnum));
else
- internal_error ("Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
+ internal_error (__FILE__, __LINE__,
+ "Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",
REGISTER_NAME (regnum),
regnum,
REGISTER_RAW_SIZE (regnum),
VALUE_ADDRESS (v) = first_addr;
}
else
- internal_error ("value_from_register: Value not stored anywhere!");
+ internal_error (__FILE__, __LINE__,
+ "value_from_register: Value not stored anywhere!");
VALUE_OPTIMIZED_OUT (v) = optim;
/* GDB-friendly replacement for <assert.h>.
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
/* This prints an "Assertion failed" message, aksing the user if they
want to continue, dump core, or just exit. */
#define gdb_assert_fail(assertion, file, line, function) \
- internal_error ("%s:%u: %s%sAssertion `%s' failed.", \
- file, line, \
+ internal_error (file, line, "%s%sAssertion `%s' failed.", \
function ? function : "", function ? ": " : "", \
assertion)
return;
/* fundamental */
if (gdbarch->byte_order == 0)
- internal_error ("verify_gdbarch: byte-order unset");
+ internal_error (__FILE__, __LINE__,
+ "verify_gdbarch: byte-order unset");
if (gdbarch->bfd_arch_info == NULL)
- internal_error ("verify_gdbarch: bfd_arch_info unset");
+ internal_error (__FILE__, __LINE__,
+ "verify_gdbarch: bfd_arch_info unset");
/* Check those that need to be defined for the given multi-arch level. */
/* Skip verify of short_bit, invalid_p == 0 */
/* Skip verify of int_bit, invalid_p == 0 */
/* Skip verify of write_sp, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->num_regs == -1))
- internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: num_regs invalid");
/* Skip verify of num_pseudo_regs, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->sp_regnum == -1))
- internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: sp_regnum invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->fp_regnum == -1))
- internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: fp_regnum invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->pc_regnum == -1))
- internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: pc_regnum invalid");
/* Skip verify of fp0_regnum, invalid_p == 0 */
/* Skip verify of npc_regnum, invalid_p == 0 */
/* Skip verify of nnpc_regnum, invalid_p == 0 */
/* Skip verify of register_name, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_size == -1))
- internal_error ("gdbarch: verify_gdbarch: register_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: register_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_bytes == -1))
- internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: register_bytes invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_byte == 0))
- internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: register_byte invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_raw_size == 0))
- internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: register_raw_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->max_register_raw_size == -1))
- internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: max_register_raw_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_virtual_size == 0))
- internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: register_virtual_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->max_register_virtual_size == -1))
- internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->register_virtual_type == 0))
- internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: register_virtual_type invalid");
/* Skip verify of do_registers_info, invalid_p == 0 */
/* Skip verify of register_sim_regno, invalid_p == 0 */
/* Skip verify of register_bytes_ok, has predicate */
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->use_generic_dummy_frames == -1))
- internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_location == 0))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_location invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_start_offset == -1))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_breakpoint_offset == -1))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->call_dummy_breakpoint_offset_p == -1))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_length == -1))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_length invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->pc_in_call_dummy == 0))
- internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->call_dummy_p == -1))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_p invalid");
/* Skip verify of call_dummy_words, invalid_p == 0 */
/* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->call_dummy_stack_adjust_p == -1))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
- internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->fix_call_dummy == 0))
- internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: fix_call_dummy invalid");
/* Skip verify of coerce_float_to_double, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->get_saved_register == 0))
- internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: get_saved_register invalid");
/* Skip verify of register_convertible, invalid_p == 0 */
/* Skip verify of register_convert_to_virtual, invalid_p == 0 */
/* Skip verify of register_convert_to_raw, invalid_p == 0 */
/* Skip verify of return_value_on_stack, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->extract_return_value == 0))
- internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: extract_return_value invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->push_arguments == 0))
- internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: push_arguments invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->push_dummy_frame == 0))
- internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: push_dummy_frame invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->push_return_address == 0))
- internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: push_return_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->pop_frame == 0))
- internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: pop_frame invalid");
/* Skip verify of d10v_make_daddr, invalid_p == 0 */
/* Skip verify of d10v_make_iaddr, invalid_p == 0 */
/* Skip verify of d10v_daddr_p, invalid_p == 0 */
/* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->store_struct_return == 0))
- internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: store_struct_return invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->store_return_value == 0))
- internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: store_return_value invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->extract_struct_value_address == 0))
- internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: extract_struct_value_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->use_struct_convention == 0))
- internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: use_struct_convention invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_init_saved_regs == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->init_extra_frame_info == 0))
- internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->skip_prologue == 0))
- internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: skip_prologue invalid");
/* Skip verify of prologue_frameless_p, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->inner_than == 0))
- internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: inner_than invalid");
/* Skip verify of breakpoint_from_pc, invalid_p == 0 */
/* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
/* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->decr_pc_after_break == -1))
- internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->function_start_offset == -1))
- internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: function_start_offset invalid");
/* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_args_skip == -1))
- internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_args_skip invalid");
/* Skip verify of frameless_function_invocation, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_chain == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_chain invalid");
if ((GDB_MULTI_ARCH >= 1)
&& (gdbarch->frame_chain_valid == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_chain_valid invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_saved_pc == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_saved_pc invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_args_address == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_args_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_locals_address == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_locals_address invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->saved_pc_after_call == 0))
- internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_num_args == 0))
- internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: verify_gdbarch: frame_num_args invalid");
/* Skip verify of stack_align, has predicate */
/* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
/* Skip verify of reg_struct_has_addr, has predicate */
gdbarch_addr_bit (struct gdbarch *gdbarch)
{
if (gdbarch->addr_bit == 0)
- internal_error ("gdbarch: gdbarch_addr_bit invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_addr_bit invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
return gdbarch->addr_bit;
gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
{
if (gdbarch->read_pc == 0)
- internal_error ("gdbarch: gdbarch_read_pc invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_read_pc invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
return gdbarch->read_pc (pid);
gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
{
if (gdbarch->write_pc == 0)
- internal_error ("gdbarch: gdbarch_write_pc invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_write_pc invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
gdbarch->write_pc (val, pid);
gdbarch_read_fp (struct gdbarch *gdbarch)
{
if (gdbarch->read_fp == 0)
- internal_error ("gdbarch: gdbarch_read_fp invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_read_fp invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
return gdbarch->read_fp ();
gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
{
if (gdbarch->write_fp == 0)
- internal_error ("gdbarch: gdbarch_write_fp invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_write_fp invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
gdbarch->write_fp (val);
gdbarch_read_sp (struct gdbarch *gdbarch)
{
if (gdbarch->read_sp == 0)
- internal_error ("gdbarch: gdbarch_read_sp invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_read_sp invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
return gdbarch->read_sp ();
gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
{
if (gdbarch->write_sp == 0)
- internal_error ("gdbarch: gdbarch_write_sp invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_write_sp invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
gdbarch->write_sp (val);
gdbarch_num_regs (struct gdbarch *gdbarch)
{
if (gdbarch->num_regs == -1)
- internal_error ("gdbarch: gdbarch_num_regs invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_num_regs invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
return gdbarch->num_regs;
gdbarch_sp_regnum (struct gdbarch *gdbarch)
{
if (gdbarch->sp_regnum == -1)
- internal_error ("gdbarch: gdbarch_sp_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_sp_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
return gdbarch->sp_regnum;
gdbarch_fp_regnum (struct gdbarch *gdbarch)
{
if (gdbarch->fp_regnum == -1)
- internal_error ("gdbarch: gdbarch_fp_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_fp_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
return gdbarch->fp_regnum;
gdbarch_pc_regnum (struct gdbarch *gdbarch)
{
if (gdbarch->pc_regnum == -1)
- internal_error ("gdbarch: gdbarch_pc_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_pc_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
return gdbarch->pc_regnum;
gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
{
if (gdbarch->stab_reg_to_regnum == 0)
- internal_error ("gdbarch: gdbarch_stab_reg_to_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_stab_reg_to_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
return gdbarch->stab_reg_to_regnum (stab_regnr);
gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
{
if (gdbarch->ecoff_reg_to_regnum == 0)
- internal_error ("gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
{
if (gdbarch->dwarf_reg_to_regnum == 0)
- internal_error ("gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
{
if (gdbarch->sdb_reg_to_regnum == 0)
- internal_error ("gdbarch: gdbarch_sdb_reg_to_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
return gdbarch->sdb_reg_to_regnum (sdb_regnr);
gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
{
if (gdbarch->dwarf2_reg_to_regnum == 0)
- internal_error ("gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
if (gdbarch->register_name == 0)
- internal_error ("gdbarch: gdbarch_register_name invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_name invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
return gdbarch->register_name (regnr);
gdbarch_register_size (struct gdbarch *gdbarch)
{
if (gdbarch->register_size == -1)
- internal_error ("gdbarch: gdbarch_register_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_size invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
return gdbarch->register_size;
gdbarch_register_bytes (struct gdbarch *gdbarch)
{
if (gdbarch->register_bytes == -1)
- internal_error ("gdbarch: gdbarch_register_bytes invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_bytes invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
return gdbarch->register_bytes;
gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_byte == 0)
- internal_error ("gdbarch: gdbarch_register_byte invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_byte invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
return gdbarch->register_byte (reg_nr);
gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_raw_size == 0)
- internal_error ("gdbarch: gdbarch_register_raw_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_raw_size invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
return gdbarch->register_raw_size (reg_nr);
gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
{
if (gdbarch->max_register_raw_size == -1)
- internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_max_register_raw_size invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
return gdbarch->max_register_raw_size;
gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_virtual_size == 0)
- internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_virtual_size invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
return gdbarch->register_virtual_size (reg_nr);
gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
{
if (gdbarch->max_register_virtual_size == -1)
- internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_max_register_virtual_size invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
return gdbarch->max_register_virtual_size;
gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_virtual_type == 0)
- internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_virtual_type invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
return gdbarch->register_virtual_type (reg_nr);
gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
{
if (gdbarch->do_registers_info == 0)
- internal_error ("gdbarch: gdbarch_do_registers_info invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_do_registers_info invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
gdbarch->do_registers_info (reg_nr, fpregs);
gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
{
if (gdbarch->register_sim_regno == 0)
- internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_sim_regno invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
return gdbarch->register_sim_regno (reg_nr);
gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
{
if (gdbarch->register_bytes_ok == 0)
- internal_error ("gdbarch: gdbarch_register_bytes_ok invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_bytes_ok invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
return gdbarch->register_bytes_ok (nr_bytes);
gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
{
if (gdbarch->use_generic_dummy_frames == -1)
- internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_use_generic_dummy_frames invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
return gdbarch->use_generic_dummy_frames;
gdbarch_call_dummy_location (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_location == 0)
- internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_location invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
return gdbarch->call_dummy_location;
gdbarch_call_dummy_address (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_address == 0)
- internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
return gdbarch->call_dummy_address ();
gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_start_offset == -1)
- internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_start_offset invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
return gdbarch->call_dummy_start_offset;
gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_breakpoint_offset == -1)
- internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
return gdbarch->call_dummy_breakpoint_offset;
gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_breakpoint_offset_p == -1)
- internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
return gdbarch->call_dummy_breakpoint_offset_p;
gdbarch_call_dummy_length (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_length == -1)
- internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_length invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
return gdbarch->call_dummy_length;
gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
{
if (gdbarch->pc_in_call_dummy == 0)
- internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_pc_in_call_dummy invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
gdbarch_call_dummy_p (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_p == -1)
- internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
return gdbarch->call_dummy_p;
gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_stack_adjust_p == -1)
- internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
return gdbarch->call_dummy_stack_adjust_p;
gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
{
if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
- internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
return gdbarch->call_dummy_stack_adjust;
gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
{
if (gdbarch->fix_call_dummy == 0)
- internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_fix_call_dummy invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
{
if (gdbarch->coerce_float_to_double == 0)
- internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_coerce_float_to_double invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
return gdbarch->coerce_float_to_double (formal, actual);
gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
{
if (gdbarch->get_saved_register == 0)
- internal_error ("gdbarch: gdbarch_get_saved_register invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_get_saved_register invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
{
if (gdbarch->register_convertible == 0)
- internal_error ("gdbarch: gdbarch_register_convertible invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_convertible invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
return gdbarch->register_convertible (nr);
gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
{
if (gdbarch->register_convert_to_virtual == 0)
- internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_convert_to_virtual invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
gdbarch->register_convert_to_virtual (regnum, type, from, to);
gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
{
if (gdbarch->register_convert_to_raw == 0)
- internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_convert_to_raw invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
gdbarch->register_convert_to_raw (type, regnum, from, to);
gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
{
if (gdbarch->fetch_pseudo_register == 0)
- internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_fetch_pseudo_register invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
gdbarch->fetch_pseudo_register (regnum);
gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
{
if (gdbarch->store_pseudo_register == 0)
- internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_store_pseudo_register invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
gdbarch->store_pseudo_register (regnum);
gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
{
if (gdbarch->pointer_to_address == 0)
- internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_pointer_to_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
return gdbarch->pointer_to_address (type, buf);
gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
{
if (gdbarch->address_to_pointer == 0)
- internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_address_to_pointer invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
gdbarch->address_to_pointer (type, buf, addr);
gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
{
if (gdbarch->return_value_on_stack == 0)
- internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_return_value_on_stack invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
return gdbarch->return_value_on_stack (type);
gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
{
if (gdbarch->extract_return_value == 0)
- internal_error ("gdbarch: gdbarch_extract_return_value invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_extract_return_value invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
gdbarch->extract_return_value (type, regbuf, valbuf);
gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
if (gdbarch->push_arguments == 0)
- internal_error ("gdbarch: gdbarch_push_arguments invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_push_arguments invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
{
if (gdbarch->push_dummy_frame == 0)
- internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_push_dummy_frame invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
gdbarch->push_dummy_frame ();
gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
{
if (gdbarch->push_return_address == 0)
- internal_error ("gdbarch: gdbarch_push_return_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_push_return_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
return gdbarch->push_return_address (pc, sp);
gdbarch_pop_frame (struct gdbarch *gdbarch)
{
if (gdbarch->pop_frame == 0)
- internal_error ("gdbarch: gdbarch_pop_frame invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_pop_frame invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
gdbarch->pop_frame ();
gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_make_daddr == 0)
- internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_d10v_make_daddr invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
return gdbarch->d10v_make_daddr (x);
gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_make_iaddr == 0)
- internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_d10v_make_iaddr invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
return gdbarch->d10v_make_iaddr (x);
gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_daddr_p == 0)
- internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_d10v_daddr_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
return gdbarch->d10v_daddr_p (x);
gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_iaddr_p == 0)
- internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_d10v_iaddr_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
return gdbarch->d10v_iaddr_p (x);
gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_convert_daddr_to_raw == 0)
- internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
return gdbarch->d10v_convert_daddr_to_raw (x);
gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
{
if (gdbarch->d10v_convert_iaddr_to_raw == 0)
- internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
return gdbarch->d10v_convert_iaddr_to_raw (x);
gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
{
if (gdbarch->store_struct_return == 0)
- internal_error ("gdbarch: gdbarch_store_struct_return invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_store_struct_return invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
gdbarch->store_struct_return (addr, sp);
gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
{
if (gdbarch->store_return_value == 0)
- internal_error ("gdbarch: gdbarch_store_return_value invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_store_return_value invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
gdbarch->store_return_value (type, valbuf);
gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
{
if (gdbarch->extract_struct_value_address == 0)
- internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_extract_struct_value_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
return gdbarch->extract_struct_value_address (regbuf);
gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
{
if (gdbarch->use_struct_convention == 0)
- internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_use_struct_convention invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
return gdbarch->use_struct_convention (gcc_p, value_type);
gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->frame_init_saved_regs == 0)
- internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_init_saved_regs invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
gdbarch->frame_init_saved_regs (frame);
gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
{
if (gdbarch->init_extra_frame_info == 0)
- internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_init_extra_frame_info invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
gdbarch->init_extra_frame_info (fromleaf, frame);
gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
{
if (gdbarch->skip_prologue == 0)
- internal_error ("gdbarch: gdbarch_skip_prologue invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_skip_prologue invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
return gdbarch->skip_prologue (ip);
gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
{
if (gdbarch->prologue_frameless_p == 0)
- internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_prologue_frameless_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
return gdbarch->prologue_frameless_p (ip);
gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
{
if (gdbarch->inner_than == 0)
- internal_error ("gdbarch: gdbarch_inner_than invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_inner_than invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
return gdbarch->inner_than (lhs, rhs);
gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
{
if (gdbarch->breakpoint_from_pc == 0)
- internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_breakpoint_from_pc invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
return gdbarch->breakpoint_from_pc (pcptr, lenptr);
gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
if (gdbarch->memory_insert_breakpoint == 0)
- internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_memory_insert_breakpoint invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
return gdbarch->memory_insert_breakpoint (addr, contents_cache);
gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
if (gdbarch->memory_remove_breakpoint == 0)
- internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_memory_remove_breakpoint invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
return gdbarch->memory_remove_breakpoint (addr, contents_cache);
gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
{
if (gdbarch->decr_pc_after_break == -1)
- internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_decr_pc_after_break invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
return gdbarch->decr_pc_after_break;
gdbarch_function_start_offset (struct gdbarch *gdbarch)
{
if (gdbarch->function_start_offset == -1)
- internal_error ("gdbarch: gdbarch_function_start_offset invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_function_start_offset invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
return gdbarch->function_start_offset;
gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
{
if (gdbarch->remote_translate_xfer_address == 0)
- internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_remote_translate_xfer_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
gdbarch_frame_args_skip (struct gdbarch *gdbarch)
{
if (gdbarch->frame_args_skip == -1)
- internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_args_skip invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
return gdbarch->frame_args_skip;
gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frameless_function_invocation == 0)
- internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frameless_function_invocation invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
return gdbarch->frameless_function_invocation (fi);
gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->frame_chain == 0)
- internal_error ("gdbarch: gdbarch_frame_chain invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_chain invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
return gdbarch->frame_chain (frame);
gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
{
if (gdbarch->frame_chain_valid == 0)
- internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_chain_valid invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
return gdbarch->frame_chain_valid (chain, thisframe);
gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frame_saved_pc == 0)
- internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_saved_pc invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
return gdbarch->frame_saved_pc (fi);
gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frame_args_address == 0)
- internal_error ("gdbarch: gdbarch_frame_args_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_args_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
return gdbarch->frame_args_address (fi);
gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
if (gdbarch->frame_locals_address == 0)
- internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_locals_address invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
return gdbarch->frame_locals_address (fi);
gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->saved_pc_after_call == 0)
- internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_saved_pc_after_call invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
return gdbarch->saved_pc_after_call (frame);
gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch->frame_num_args == 0)
- internal_error ("gdbarch: gdbarch_frame_num_args invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_frame_num_args invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
return gdbarch->frame_num_args (frame);
gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
{
if (gdbarch->stack_align == 0)
- internal_error ("gdbarch: gdbarch_stack_align invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_stack_align invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
return gdbarch->stack_align (sp);
gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
{
if (gdbarch->reg_struct_has_addr == 0)
- internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_reg_struct_has_addr invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
return gdbarch->reg_struct_has_addr (gcc_p, type);
gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
{
if (gdbarch->save_dummy_frame_tos == 0)
- internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_save_dummy_frame_tos invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
gdbarch->save_dummy_frame_tos (sp);
gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
{
if (gdbarch->convert_from_func_ptr_addr == 0)
- internal_error ("gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
return gdbarch->convert_from_func_ptr_addr (addr);
const struct bfd_arch_info *ap;
ap = bfd_lookup_arch (rego->bfd_architecture, 0);
if (ap == NULL)
- internal_error ("gdbarch_architecture_names: multi-arch unknown");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch_architecture_names: multi-arch unknown");
do
{
append_name (&arches, &nr_arches, ap->printable_name);
bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
if (bfd_arch_info == NULL)
{
- internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: Attempt to register unknown architecture (%d)",
+ bfd_architecture);
}
/* Check that we haven't seen this architecture before */
for (curr = &gdbarch_registry;
curr = &(*curr)->next)
{
if (bfd_architecture == (*curr)->bfd_architecture)
- internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
- bfd_arch_info->printable_name);
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: Duplicate registraration of architecture (%s)",
+ bfd_arch_info->printable_name);
}
/* log it */
if (gdbarch_debug)
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
-#define REGISTER_BYTES_OK(nr_bytes) (internal_error ("REGISTER_BYTES_OK"), 0)
+#define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
#endif
typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error ("REGISTER_CONVERT_TO_VIRTUAL"), 0)
+#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
#endif
typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error ("REGISTER_CONVERT_TO_RAW"), 0)
+#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
#endif
typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER)
-#define FETCH_PSEUDO_REGISTER(regnum) (internal_error ("FETCH_PSEUDO_REGISTER"), 0)
+#define FETCH_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "FETCH_PSEUDO_REGISTER"), 0)
#endif
typedef void (gdbarch_fetch_pseudo_register_ftype) (int regnum);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER)
-#define STORE_PSEUDO_REGISTER(regnum) (internal_error ("STORE_PSEUDO_REGISTER"), 0)
+#define STORE_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "STORE_PSEUDO_REGISTER"), 0)
#endif
typedef void (gdbarch_store_pseudo_register_ftype) (int regnum);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (D10V_MAKE_DADDR)
-#define D10V_MAKE_DADDR(x) (internal_error ("D10V_MAKE_DADDR"), 0)
+#define D10V_MAKE_DADDR(x) (internal_error (__FILE__, __LINE__, "D10V_MAKE_DADDR"), 0)
#endif
typedef CORE_ADDR (gdbarch_d10v_make_daddr_ftype) (CORE_ADDR x);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (D10V_MAKE_IADDR)
-#define D10V_MAKE_IADDR(x) (internal_error ("D10V_MAKE_IADDR"), 0)
+#define D10V_MAKE_IADDR(x) (internal_error (__FILE__, __LINE__, "D10V_MAKE_IADDR"), 0)
#endif
typedef CORE_ADDR (gdbarch_d10v_make_iaddr_ftype) (CORE_ADDR x);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (D10V_DADDR_P)
-#define D10V_DADDR_P(x) (internal_error ("D10V_DADDR_P"), 0)
+#define D10V_DADDR_P(x) (internal_error (__FILE__, __LINE__, "D10V_DADDR_P"), 0)
#endif
typedef int (gdbarch_d10v_daddr_p_ftype) (CORE_ADDR x);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (D10V_IADDR_P)
-#define D10V_IADDR_P(x) (internal_error ("D10V_IADDR_P"), 0)
+#define D10V_IADDR_P(x) (internal_error (__FILE__, __LINE__, "D10V_IADDR_P"), 0)
#endif
typedef int (gdbarch_d10v_iaddr_p_ftype) (CORE_ADDR x);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (D10V_CONVERT_DADDR_TO_RAW)
-#define D10V_CONVERT_DADDR_TO_RAW(x) (internal_error ("D10V_CONVERT_DADDR_TO_RAW"), 0)
+#define D10V_CONVERT_DADDR_TO_RAW(x) (internal_error (__FILE__, __LINE__, "D10V_CONVERT_DADDR_TO_RAW"), 0)
#endif
typedef CORE_ADDR (gdbarch_d10v_convert_daddr_to_raw_ftype) (CORE_ADDR x);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (D10V_CONVERT_IADDR_TO_RAW)
-#define D10V_CONVERT_IADDR_TO_RAW(x) (internal_error ("D10V_CONVERT_IADDR_TO_RAW"), 0)
+#define D10V_CONVERT_IADDR_TO_RAW(x) (internal_error (__FILE__, __LINE__, "D10V_CONVERT_IADDR_TO_RAW"), 0)
#endif
typedef CORE_ADDR (gdbarch_d10v_convert_iaddr_to_raw_ftype) (CORE_ADDR x);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN)
-#define STACK_ALIGN(sp) (internal_error ("STACK_ALIGN"), 0)
+#define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0)
#endif
typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR)
-#define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error ("REG_STRUCT_HAS_ADDR"), 0)
+#define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0)
#endif
typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
-#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error ("SAVE_DUMMY_FRAME_TOS"), 0)
+#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
#endif
typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
/* Fallback definition for EXTRACT_STRUCT_VALUE_ADDRESS */
#ifndef EXTRACT_STRUCT_VALUE_ADDRESS
#define EXTRACT_STRUCT_VALUE_ADDRESS_P (0)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error ("gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error (__FILE__, __LINE__, "gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
#else
#ifndef EXTRACT_STRUCT_VALUE_ADDRESS_P
#define EXTRACT_STRUCT_VALUE_ADDRESS_P (1)
printf "#if (!GDB_MULTI_ARCH) && !defined (${macro})\n"
if [ "${fallbackdefault}" = "0" ]
then
- printf "#define ${macro}(${actual}) (internal_error (\"${macro}\"), 0)\n"
+ printf "#define ${macro}(${actual}) (internal_error (__FILE__, __LINE__, \"${macro}\"), 0)\n"
else
# FIXME: Should be passing current_gdbarch through!
echo "#define ${macro}(${actual}) (${fallbackdefault} (${actual}))" \
/* Fallback definition for EXTRACT_STRUCT_VALUE_ADDRESS */
#ifndef EXTRACT_STRUCT_VALUE_ADDRESS
#define EXTRACT_STRUCT_VALUE_ADDRESS_P (0)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error ("gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error (__FILE__, __LINE__, "gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
#else
#ifndef EXTRACT_STRUCT_VALUE_ADDRESS_P
#define EXTRACT_STRUCT_VALUE_ADDRESS_P (1)
return;
/* fundamental */
if (gdbarch->byte_order == 0)
- internal_error ("verify_gdbarch: byte-order unset");
+ internal_error (__FILE__, __LINE__,
+ "verify_gdbarch: byte-order unset");
if (gdbarch->bfd_arch_info == NULL)
- internal_error ("verify_gdbarch: bfd_arch_info unset");
+ internal_error (__FILE__, __LINE__,
+ "verify_gdbarch: bfd_arch_info unset");
/* Check those that need to be defined for the given multi-arch level. */
EOF
function_list | while do_read
then
printf " if ((GDB_MULTI_ARCH >= ${level})\n"
printf " && (${invalid_p}))\n"
- printf " internal_error (\"gdbarch: verify_gdbarch: ${function} invalid\");\n"
+ printf " internal_error (__FILE__, __LINE__,\n"
+ printf " \"gdbarch: verify_gdbarch: ${function} invalid\");\n"
elif [ "${predefault}" ]
then
printf " if ((GDB_MULTI_ARCH >= ${level})\n"
printf " && (gdbarch->${function} == ${predefault}))\n"
- printf " internal_error (\"gdbarch: verify_gdbarch: ${function} invalid\");\n"
+ printf " internal_error (__FILE__, __LINE__,\n"
+ printf " \"gdbarch: verify_gdbarch: ${function} invalid\");\n"
fi
fi
done
fi
printf "{\n"
printf " if (gdbarch->${function} == 0)\n"
- printf " internal_error (\"gdbarch: gdbarch_${function} invalid\");\n"
+ printf " internal_error (__FILE__, __LINE__,\n"
+ printf " \"gdbarch: gdbarch_${function} invalid\");\n"
printf " if (gdbarch_debug >= 2)\n"
printf " fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\\\\n\");\n"
test "${actual}" = "-" && actual=""
elif [ "${invalid_p}" ]
then
printf " if (${invalid_p})\n"
- printf " internal_error (\"gdbarch: gdbarch_${function} invalid\");\n"
+ printf " internal_error (__FILE__, __LINE__,\n"
+ printf " \"gdbarch: gdbarch_${function} invalid\");\n"
elif [ "${predefault}" ]
then
printf " if (gdbarch->${function} == ${predefault})\n"
- printf " internal_error (\"gdbarch: gdbarch_${function} invalid\");\n"
+ printf " internal_error (__FILE__, __LINE__,\n"
+ printf " \"gdbarch: gdbarch_${function} invalid\");\n"
fi
printf " if (gdbarch_debug >= 2)\n"
printf " fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\\\\n\");\n"
const struct bfd_arch_info *ap;
ap = bfd_lookup_arch (rego->bfd_architecture, 0);
if (ap == NULL)
- internal_error ("gdbarch_architecture_names: multi-arch unknown");
+ internal_error (__FILE__, __LINE__,
+ "gdbarch_architecture_names: multi-arch unknown");
do
{
append_name (&arches, &nr_arches, ap->printable_name);
bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
if (bfd_arch_info == NULL)
{
- internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: Attempt to register unknown architecture (%d)",
+ bfd_architecture);
}
/* Check that we haven't seen this architecture before */
for (curr = &gdbarch_registry;
curr = &(*curr)->next)
{
if (bfd_architecture == (*curr)->bfd_architecture)
- internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
- bfd_arch_info->printable_name);
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: Duplicate registraration of architecture (%s)",
+ bfd_arch_info->printable_name);
}
/* log it */
if (gdbarch_debug)
/* Native debugging support for Intel x86 running DJGPP.
- Copyright 1997, 1999 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2001 Free Software Foundation, Inc.
Written by Robert Hoehne.
This file is part of GDB.
((char *) &npx + regno_mapping[regno].tss_ofs);
break;
default:
- internal_error ("\
+ internal_error (__FILE__, __LINE__, "\
Invalid native size for register no. %d in go32_fetch_register.", regno);
}
supply_register (regno, (char *) ®val);
}
else
- internal_error ("Invalid register no. %d in go32_fetch_register.",
+ internal_error (__FILE__, __LINE__,
+ "Invalid register no. %d in go32_fetch_register.",
regno);
}
}
else if (regno < 32)
rp = (char *) &npx + regno_mapping[regno].tss_ofs;
else
- internal_error ("Invalid register no. %d in store_register.", regno);
+ internal_error (__FILE__, __LINE__,
+ "Invalid register no. %d in store_register.", regno);
memcpy (rp, v, regno_mapping[regno].size);
if (regno == FOP_REGNUM)
*(short *)rp &= 0x07ff; /* strip high 5 bits, in case they added them */
/* Init command line storage. */
if (redir_debug_init (&child_cmd) == -1)
- internal_error ("Cannot allocate redirection storage: not enough memory.\n");
+ internal_error (__FILE__, __LINE__,
+ "Cannot allocate redirection storage: not enough memory.\n");
/* Parse the command line and create redirections. */
if (strpbrk (args, "<>"))
/* Initialize child's command line storage. */
if (redir_debug_init (&child_cmd) == -1)
- internal_error ("Cannot allocate redirection storage: not enough memory.\n");
+ internal_error (__FILE__, __LINE__,
+ "Cannot allocate redirection storage: not enough memory.\n");
/* We are always processing GCC-compiled programs. */
processing_gcc_compilation = 2;
/* Native support code for HPUX PA-RISC.
- Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1998, 1999
+ Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1998, 1999,
+ 2001
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow)
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (1)));
else
- internal_error ("hppah-nat.c (write_register): unexpected register size");
+ internal_error (__FILE__, __LINE__,
+ "hppah-nat.c (write_register): unexpected register size");
#ifdef GDB_TARGET_IS_HPPA_20W
/* Unbelieveable. The PC head and tail must be written in 64bit hunks
+ (REGISTER_BYTE (regno) - REGISTER_BYTE (1)));
else
- internal_error ("hppa-nat.c (fetch_register): unexpected register size");
+ internal_error (__FILE__, __LINE__,
+ "hppa-nat.c (fetch_register): unexpected register size");
for (i = 0; i < len; i += sizeof (int))
{
/* Native-dependent code for Linux/x86.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
return;
}
- internal_error ("Got request for bad register number %d.", regno);
+ internal_error (__FILE__, __LINE__,
+ "Got request for bad register number %d.", regno);
}
/* Store register REGNO back into the child process. If REGNO is -1,
return;
}
- internal_error ("Got request to store bad register number %d.", regno);
+ internal_error (__FILE__, __LINE__,
+ "Got request to store bad register number %d.", regno);
}
\f
/* Intel 386 target-dependent stuff.
- Copyright (C) 1988, 1989, 1991, 1994, 1995, 1996, 1998
+ Copyright (C) 1988, 1989, 1991, 1994, 1995, 1996, 1998, 2001
Free Software Foundation, Inc.
This file is part of GDB.
®buf[REGISTER_BYTE (HIGH_RETURN_REGNUM)], len - low_size);
}
else
- internal_error ("Cannot extract return value of %d bytes long.", len);
+ internal_error (__FILE__, __LINE__,
+ "Cannot extract return value of %d bytes long.", len);
}
}
valbuf + low_size, len - low_size);
}
else
- internal_error ("Cannot store return value of %d bytes long.", len);
+ internal_error (__FILE__, __LINE__,
+ "Cannot store return value of %d bytes long.", len);
}
}
/* Target-dependent code for the IA-64 for GDB, the GNU debugger.
- Copyright 1999, 2000
+ Copyright 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
CORE_ADDR regaddr;
if (frame == NULL)
- internal_error ("read_sigcontext_register: NULL frame");
+ internal_error (__FILE__, __LINE__,
+ "read_sigcontext_register: NULL frame");
if (!frame->signal_handler_caller)
- internal_error (
- "read_sigcontext_register: frame not a signal_handler_caller");
+ internal_error (__FILE__, __LINE__,
+ "read_sigcontext_register: frame not a signal_handler_caller");
if (SIGCONTEXT_REGISTER_ADDRESS == 0)
- internal_error (
- "read_sigcontext_register: SIGCONTEXT_REGISTER_ADDRESS is 0");
+ internal_error (__FILE__, __LINE__,
+ "read_sigcontext_register: SIGCONTEXT_REGISTER_ADDRESS is 0");
regaddr = SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regnum);
if (regaddr)
return read_memory_integer (regaddr, REGISTER_RAW_SIZE (regnum));
else
- internal_error (
- "read_sigcontext_register: Register %d not in struct sigcontext", regnum);
+ internal_error (__FILE__, __LINE__,
+ "read_sigcontext_register: Register %d not in struct sigcontext", regnum);
}
/* Extract ``len'' bits from an instruction bundle starting at
*os_ident_ptr = ELFOSABI_SOLARIS;
break;
default :
- internal_error (
- "process_note_abi_sections: unknown OS number %d", os_number);
+ internal_error (__FILE__, __LINE__,
+ "process_note_abi_sections: unknown OS number %d", os_number);
break;
}
}
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function));
if (!value_type)
- internal_error ("finish_command: function has no target type");
+ internal_error (__FILE__, __LINE__,
+ "finish_command: function has no target type");
if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
{
value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function));
if (!value_type)
- internal_error ("finish_command: function has no target type");
+ internal_error (__FILE__, __LINE__,
+ "finish_command: function has no target type");
/* FIXME: Shouldn't we do the cleanups before returning? */
if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
/* Variables that describe the inferior process running under GDB:
Where it is, why it stopped, and how to step it.
- Copyright 1986, 1989, 1992, 1996, 1998 Free Software Foundation, Inc.
+ Copyright 1986, 1989, 1992, 1996, 1998, 2001 Free Software Foundation, Inc.
This file is part of GDB.
#endif /* No CALL_DUMMY_LOCATION. */
#if !defined (CALL_DUMMY_ADDRESS)
-#define CALL_DUMMY_ADDRESS() (internal_error ("CALL_DUMMY_ADDRESS"), 0)
+#define CALL_DUMMY_ADDRESS() (internal_error (__FILE__, __LINE__, "CALL_DUMMY_ADDRESS"), 0)
#endif
#if !defined (CALL_DUMMY_START_OFFSET)
-#define CALL_DUMMY_START_OFFSET (internal_error ("CALL_DUMMY_START_OFFSET"), 0)
+#define CALL_DUMMY_START_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_START_OFFSET"), 0)
#endif
#if !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
#define CALL_DUMMY_BREAKPOINT_OFFSET_P (0)
-#define CALL_DUMMY_BREAKPOINT_OFFSET (internal_error ("CALL_DUMMY_BREAKPOINT_OFFSET"), 0)
+#define CALL_DUMMY_BREAKPOINT_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_BREAKPOINT_OFFSET"), 0)
#endif
#if !defined CALL_DUMMY_BREAKPOINT_OFFSET_P
#define CALL_DUMMY_BREAKPOINT_OFFSET_P (1)
#endif
#if !defined (CALL_DUMMY_LENGTH)
-#define CALL_DUMMY_LENGTH (internal_error ("CALL_DUMMY_LENGTH"), 0)
+#define CALL_DUMMY_LENGTH (internal_error (__FILE__, __LINE__, "CALL_DUMMY_LENGTH"), 0)
#endif
#if defined (CALL_DUMMY_STACK_ADJUST)
#endif
#endif
#if !defined (CALL_DUMMY_STACK_ADJUST)
-#define CALL_DUMMY_STACK_ADJUST (internal_error ("CALL_DUMMY_STACK_ADJUST"), 0)
+#define CALL_DUMMY_STACK_ADJUST (internal_error (__FILE__, __LINE__, "CALL_DUMMY_STACK_ADJUST"), 0)
#endif
#if !defined (CALL_DUMMY_STACK_ADJUST_P)
#define CALL_DUMMY_STACK_ADJUST_P (0)
#endif
#if !defined PUSH_DUMMY_FRAME
-#define PUSH_DUMMY_FRAME (internal_error ("PUSH_DUMMY_FRAME"), 0)
+#define PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "PUSH_DUMMY_FRAME"), 0)
#endif
#if !defined FIX_CALL_DUMMY
-#define FIX_CALL_DUMMY(a1,a2,a3,a4,a5,a6,a7) (internal_error ("FIX_CALL_DUMMY"), 0)
+#define FIX_CALL_DUMMY(a1,a2,a3,a4,a5,a6,a7) (internal_error (__FILE__, __LINE__, "FIX_CALL_DUMMY"), 0)
#endif
#if !defined STORE_STRUCT_RETURN
-#define STORE_STRUCT_RETURN(a1,a2) (internal_error ("STORE_STRUCT_RETURN"), 0)
+#define STORE_STRUCT_RETURN(a1,a2) (internal_error (__FILE__, __LINE__, "STORE_STRUCT_RETURN"), 0)
#endif
if (nlist ("/vmunix", names) == 0)
kernel_u_addr = names[0].n_value;
else
- internal_error ("Unable to get kernel u area address.");
+ internal_error (__FILE__, __LINE__,
+ "Unable to get kernel u area address.");
#endif /* KERNEL_U_ADDR_BSD. */
}
/* Target-struct-independent code to start (run) and stop an inferior process.
- Copyright 1986-1989, 1991-2000 Free Software Foundation, Inc.
+ Copyright 1986-1989, 1991-2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
/* Or, did the user not know, and want us to ask? */
if (follow_fork_mode_string == follow_fork_mode_ask)
{
- internal_error ("follow_inferior_fork: \"ask\" mode not implemented");
+ internal_error (__FILE__, __LINE__,
+ "follow_inferior_fork: \"ask\" mode not implemented");
/* follow_mode = follow_fork_mode_...; */
}
#endif
break;
default:
- internal_error ("print_stop_reason: unrecognized enum value");
+ internal_error (__FILE__, __LINE__,
+ "print_stop_reason: unrecognized enum value");
break;
}
}
do_frame_printing = 0;
break;
default:
- internal_error ("Unknown value.");
+ internal_error (__FILE__, __LINE__,
+ "Unknown value.");
}
#ifdef UI_OUT
/* For mi, have the same behavior every time we stop:
/* Multiple source language support for GDB.
- Copyright 1991, 1992, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 2000, 2001 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
if (strlen (local_hex_format_prefix ()) + num_len + num_pad_chars
< RESULT_BUF_LEN) /* paranoia */
- internal_error ("longest_local_hex_string_custom: insufficient space to store result");
+ internal_error (__FILE__, __LINE__,
+ "longest_local_hex_string_custom: insufficient space to store result");
strcpy (res2, local_hex_format_prefix ());
if (pad_on_left)
/* Interface GDB to Mach 3.0 operating systems.
(Most) Mach 3.0 related routines live in this file.
- Copyright (C) 1992, 1996, 1999-2000 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
}
if (exception < 0 || exception > MAX_EXCEPTION)
- internal_error ("catch_exception_raise: unknown exception code %d thread %d",
+ internal_error (__FILE__, __LINE__,
+ "catch_exception_raise: unknown exception code %d thread %d",
exception,
mid);
stop_code);
break;
default:
- internal_error ("Unknown exception");
+ internal_error (__FILE__, __LINE__,
+ "Unknown exception");
}
}
}
MACH_PORT_RIGHT_RECEIVE,
&our_notify_port);
if (ret != KERN_SUCCESS)
- internal_error ("Creating notify port %s", mach_error_string (ret));
+ internal_error (__FILE__, __LINE__,
+ "Creating notify port %s", mach_error_string (ret));
ret = mach_port_move_member (mach_task_self (),
our_notify_port,
inferior_wait_port_set);
if (ret != KERN_SUCCESS)
- internal_error ("initial move member %s", mach_error_string (ret));
+ internal_error (__FILE__, __LINE__,
+ "initial move member %s", mach_error_string (ret));
}
}
MACH_PORT_RIGHT_PORT_SET,
&inferior_wait_port_set);
if (ret != KERN_SUCCESS)
- internal_error ("initial port set %s", mach_error_string (ret));
+ internal_error (__FILE__, __LINE__,
+ "initial port set %s", mach_error_string (ret));
/* mach_really_wait now waits for this */
currently_waiting_for = inferior_wait_port_set;
/* Target dependent code for the Motorola 68000 series.
- Copyright (C) 1990, 1992, 1993, 1994, 1995, 1996, 1999, 2000
+ Copyright (C) 1990, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
return 1;
#else
- internal_error ("m68k_get_longjmp_target: not implemented");
+ internal_error (__FILE__, __LINE__,
+ "m68k_get_longjmp_target: not implemented");
return 0;
#endif
}
/* Support for GDB maintenance commands.
- Copyright 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 2001 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support.
This file is part of GDB.
static void
maintenance_internal_error (char *args, int from_tty)
{
- internal_error ("internal maintenance");
+ internal_error (__FILE__, __LINE__,
+ "internal maintenance");
}
/* Someday we should allow demangling for things other than just
+Wed Feb 7 19:50:37 2001 Andrew Cagney <cagney@redhat.com>
+
+ * mi-getopt.c: Add __FILE__ and __LINE__ parameter to calls to
+ internal_error.
+ * mi-console.c: Ditto.
+ * mi-cmds.c: Ditto.
+ * mi-cmd-break.c: Ditto.
+
2001-01-27 Fernando Nasser <fnasser@redhat.com>
From Momchil Velikov <velco@fadata.bg>
/* MI Command Set - breakpoint and watchpoint commands.
- Copyright (C) 2000, Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
break;
#endif
default:
- internal_error ("mi_cmd_break_insert: Bad switch.");
+ internal_error (__FILE__, __LINE__,
+ "mi_cmd_break_insert: Bad switch.");
}
set_gdb_event_hooks (old_hooks);
{
struct mi_cmd **entry = lookup_table (command->name);
if (*entry)
- internal_error ("command `%s' appears to be duplicated",
+ internal_error (__FILE__, __LINE__,
+ "command `%s' appears to be duplicated",
command->name);
*entry = command;
if (0)
{
struct mi_console_file *mi_console = ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
- internal_error ("mi_console_file_delete: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mi_console_file_delete: bad magic number");
xfree (mi_console);
}
{
struct mi_console_file *mi_console = ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
- internal_error ("mi_console_file_fputs: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mi_console_file_fputs: bad magic number");
/* Append the text to our internal buffer */
fputs_unfiltered (buf, mi_console->buffer);
/* Flush when an embedded \n */
{
struct mi_console_file *mi_console = data;
if (mi_console->magic != &mi_console_file_magic)
- internal_error ("mi_console_file_transform: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mi_console_file_transform: bad magic number");
if (length_buf > 0)
{
{
struct mi_console_file *mi_console = ui_file_data (file);
if (mi_console->magic != &mi_console_file_magic)
- internal_error ("mi_console_file_flush: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mi_console_file_flush: bad magic number");
ui_file_put (mi_console->buffer, mi_console_raw_packet, mi_console);
ui_file_rewind (mi_console->buffer);
}
struct mi_opt *opt;
/* We assume that argv/argc are ok. */
if (*optind > argc || *optind < 0)
- internal_error ("mi_getopt_long: optind out of bounds");
+ internal_error (__FILE__, __LINE__,
+ "mi_getopt_long: optind out of bounds");
if (*optind == argc)
return -1;
arg = argv[*optind];
case CMD_AUTO_BOOLEAN_AUTO:
return MIPS_DEFAULT_MASK_ADDRESS_P;
default:
- internal_error ("mips_mask_address_p: bad switch");
+ internal_error (__FILE__, __LINE__,
+ "mips_mask_address_p: bad switch");
return -1;
}
}
mips_mask_address_p () ? "enabled" : "disabled");
break;
default:
- internal_error ("show_mask_address: bad switch");
+ internal_error (__FILE__, __LINE__,
+ "show_mask_address: bad switch");
break;
}
}
break;
}
default:
- internal_error ("%s:%d: bad switch", __FILE__, __LINE__);
+ internal_error (__FILE__, __LINE__,
+ "bad switch");
}
upk->offset = offset;
upk->regx = regx;
/* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
- Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
num_regs = 32;
break;
default:
- internal_error ("mn10300_gdbarch_init: Unknown mn10300 variant");
+ internal_error (__FILE__, __LINE__,
+ "mn10300_gdbarch_init: Unknown mn10300 variant");
return NULL; /* keep GCC happy. */
}
/* GDB routines for manipulating objfiles.
- Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
}
}
- internal_error ("objfiles.c (unlink_objfile): objfile already unlinked");
+ internal_error (__FILE__, __LINE__,
+ "unlink_objfile: objfile already unlinked");
}
/* Definitions for symbol file management in GDB.
- Copyright (C) 1992, 1993, 1994, 1995, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1999, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
ALL_OBJFILE_OSECTIONS (objfile, osect)
#define SECT_OFF_DATA(objfile) \
- ((objfile->sect_index_data == -1) ? \
- (internal_error ("sect_index_data not initialized"), -1) : objfile->sect_index_data)
+ ((objfile->sect_index_data == -1) \
+ ? (internal_error (__FILE__, __LINE__, "sect_index_data not initialized"), -1) \
+ : objfile->sect_index_data)
#define SECT_OFF_RODATA(objfile) \
- ((objfile->sect_index_rodata == -1) ? \
- (internal_error ("sect_index_rodata not initialized"), -1) : objfile->sect_index_rodata)
+ ((objfile->sect_index_rodata == -1) \
+ ? (internal_error (__FILE__, __LINE__, "sect_index_rodata not initialized"), -1) \
+ : objfile->sect_index_rodata)
#define SECT_OFF_TEXT(objfile) \
- ((objfile->sect_index_text == -1) ? \
- (internal_error ("sect_index_text not initialized"), -1) : objfile->sect_index_text)
+ ((objfile->sect_index_text == -1) \
+ ? (internal_error (__FILE__, __LINE__, "sect_index_text not initialized"), -1) \
+ : objfile->sect_index_text)
/* Sometimes the .bss section is missing from the objfile, so we don't
want to die here. Let the users of SECT_OFF_BSS deal with an
/* Cache and manage the values of registers for GDB, the GNU debugger.
- Copyright 1986, 87, 89, 91, 94, 95, 96, 1998, 2000
+ Copyright 1986, 87, 89, 91, 94, 95, 96, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
return pc_val;
}
#endif
- internal_error ("generic_target_read_pc");
+ internal_error (__FILE__, __LINE__,
+ "generic_target_read_pc");
return 0;
}
if (NNPC_REGNUM >= 0)
write_register_pid (NNPC_REGNUM, pc + 8, pid);
#else
- internal_error ("generic_target_write_pc");
+ internal_error (__FILE__, __LINE__,
+ "generic_target_write_pc");
#endif
}
if (SP_REGNUM >= 0)
return read_register (SP_REGNUM);
#endif
- internal_error ("generic_target_read_sp");
+ internal_error (__FILE__, __LINE__,
+ "generic_target_read_sp");
}
CORE_ADDR
return;
}
#endif
- internal_error ("generic_target_write_sp");
+ internal_error (__FILE__, __LINE__,
+ "generic_target_write_sp");
}
void
if (FP_REGNUM >= 0)
return read_register (FP_REGNUM);
#endif
- internal_error ("generic_target_read_fp");
+ internal_error (__FILE__, __LINE__,
+ "generic_target_read_fp");
}
CORE_ADDR
return;
}
#endif
- internal_error ("generic_target_write_fp");
+ internal_error (__FILE__, __LINE__,
+ "generic_target_write_fp");
}
void
if (cmd != '\0')
{
if (mips_need_reply)
- internal_error ("mips_request: Trying to send command before reply");
+ internal_error (__FILE__, __LINE__,
+ "mips_request: Trying to send command before reply");
sprintf (buff, "0x0 %c 0x%s 0x%s", cmd, paddr_nz (addr), paddr_nz (data));
mips_send_packet (buff, 1);
mips_need_reply = 1;
return 0;
if (!mips_need_reply)
- internal_error ("mips_request: Trying to get reply before command");
+ internal_error (__FILE__, __LINE__,
+ "mips_request: Trying to get reply before command");
mips_need_reply = 0;
REGISTER_SIM_REGNO (regno),
tmp, REGISTER_RAW_SIZE (regno));
if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno))
- internal_error ("Register size different to expected");
+ internal_error (__FILE__, __LINE__,
+ "Register size different to expected");
if (sr_get_debug ())
{
printf_filtered ("gdbsim_store_register: %d", regno);
strcat (arg_buf, " -E little");
break;
default:
- internal_error ("Value of TARGET_BYTE_ORDER unknown");
+ internal_error (__FILE__, __LINE__,
+ "Value of TARGET_BYTE_ORDER unknown");
}
}
/* Specify the architecture of the target when it has been
sleep_ms (200); /* FIXME Don't kill the network too badly */
}
else if (pid != inferior_pid)
- internal_error ("Bad pid for debugged task: %s\n",
+ internal_error (__FILE__, __LINE__,
+ "Bad pid for debugged task: %s\n",
local_hex_string ((unsigned long) pid));
}
while (pid == 0);
config->support = PACKET_ENABLE;
break;
case PACKET_DISABLE:
- internal_error ("packet_ok: attempt to use a disabled packet");
+ internal_error (__FILE__, __LINE__,
+ "packet_ok: attempt to use a disabled packet");
break;
case PACKET_ENABLE:
break;
int n = 0; /* position in display_buf */
if (remote_desc == 0) /* paranoia */
- internal_error ("remote_threads_extra_info");
+ internal_error (__FILE__, __LINE__,
+ "remote_threads_extra_info");
if (use_threadextra_query)
{
todo = min (len, max_buf_size / 2);
break;
case PACKET_SUPPORT_UNKNOWN:
- internal_error ("%s:%d: remote_write_bytes: bad internal state",
- __FILE__, __LINE__);
+ internal_error (__FILE__, __LINE__,
+ "remote_write_bytes: bad internal state");
default:
- internal_error ("%s:%d: bad switch", __FILE__, __LINE__);
+ internal_error (__FILE__, __LINE__, "bad switch");
}
/* Append <memaddr> */
*p = '\0';
break;
case PACKET_SUPPORT_UNKNOWN:
- internal_error ("%s:%d: remote_write_bytes: bad internal state",
- __FILE__, __LINE__);
+ internal_error (__FILE__, __LINE__,
+ "remote_write_bytes: bad internal state");
default:
- internal_error ("%s:%d: bad switch", __FILE__, __LINE__);
+ internal_error (__FILE__, __LINE__, "bad switch");
}
putpkt_binary (buf, (int) (p - buf));
return 4;
break;
default:
- internal_error ("hw_bp_to_z: bad watchpoint type %d", type);
+ internal_error (__FILE__, __LINE__,
+ "hw_bp_to_z: bad watchpoint type %d", type);
}
}
case PACKET_OK:
return 0;
}
- internal_error ("remote_insert_watchpoint: reached end of function");
+ internal_error (__FILE__, __LINE__,
+ "remote_insert_watchpoint: reached end of function");
}
/* FIXME: This function should be static and a member of the remote
case PACKET_OK:
return 0;
}
- internal_error ("remote_remove_watchpoint: reached end of function");
+ internal_error (__FILE__, __LINE__,
+ "remote_remove_watchpoint: reached end of function");
}
/* FIXME: This function should be static and a member of the remote
case PACKET_OK:
return 0;
}
- internal_error ("remote_remove_watchpoint: reached end of function");
+ internal_error (__FILE__, __LINE__,
+ "remote_remove_watchpoint: reached end of function");
}
/* FIXME: This function should be static and a member of the remote
case PACKET_OK:
return 0;
}
- internal_error ("remote_remove_watchpoint: reached end of function");
+ internal_error (__FILE__, __LINE__,
+ "remote_remove_watchpoint: reached end of function");
}
/* Some targets are only capable of doing downloads, and afterwards
remote_async (void (*callback) (enum inferior_event_type event_type, void *context), void *context)
{
if (current_target.to_async_mask_value == 0)
- internal_error ("Calling remote_async when async is masked");
+ internal_error (__FILE__, __LINE__,
+ "Calling remote_async when async is masked");
if (callback != NULL)
{
/* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1995, 1996, 1997, 1998
+ Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1995, 1996, 1997,
+ 1998, 2001
Free Software Foundation, Inc.
This file is part of GDB.
if (!gdbarch_update_p (info))
{
- internal_error ("set_host_arch: failed to select architecture");
+ internal_error (__FILE__, __LINE__,
+ "set_host_arch: failed to select architecture");
}
}
/* Target-dependent code for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
*os_ident_ptr = ELFOSABI_SOLARIS;
break;
default :
- internal_error (
- "process_note_abi_sections: unknown OS number %d", os_number);
+ internal_error (__FILE__, __LINE__,
+ "process_note_abi_sections: unknown OS number %d",
+ os_number);
break;
}
}
/* 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 ("serial_readchar: blocking read in async mode");
+ internal_error (__FILE__, __LINE__,
+ "serial_readchar: blocking read in async mode");
ch = scb->ops->readchar (scb, timeout);
if (serial_logfp != NULL)
called? */
if (scb->fd < 0)
{
- internal_error ("serial: FD not valid");
+ internal_error (__FILE__, __LINE__,
+ "serial: FD not valid");
}
return scb->fd; /* sigh */
}
sh_do_pseudo_register (int regnum)
{
if (regnum < NUM_REGS || regnum >= NUM_REGS + NUM_PSEUDO_REGS)
- internal_error ("Invalid pseudo register number %d\n", regnum);
+ internal_error (__FILE__, __LINE__,
+ "Invalid pseudo register number %d\n", regnum);
else if (regnum >= gdbarch_tdep (current_gdbarch)->DR0_REGNUM
&& regnum < gdbarch_tdep (current_gdbarch)->DR_LAST_REGNUM)
do_dr_register_info (regnum);
sh_print_register (int regnum)
{
if (regnum < 0 || regnum >= NUM_REGS + NUM_PSEUDO_REGS)
- internal_error ("Invalid register number %d\n", regnum);
+ internal_error (__FILE__, __LINE__,
+ "Invalid register number %d\n", regnum);
else if (regnum >= 0 && regnum < NUM_REGS)
{
/* Handle SunOS and SVR4 shared libraries for GDB, the GNU Debugger.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 1999, 2000
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
#else
- internal_error ("default_svr4_fetch_link_map_offsets called without HAVE_LINK_H defined.");
+ internal_error (__FILE__, __LINE__,
+ "default_svr4_fetch_link_map_offsets called without HAVE_LINK_H defined.");
return 0;
#endif /* HAVE_LINK_H */
}
else
{
- internal_error ("%s:%d: bfd_get_arch_size() returned unknown size %d",
- __FILE__, __LINE__, arch_size);
+ internal_error (__FILE__, __LINE__,
+ "bfd_get_arch_size() returned unknown size %d",
+ arch_size);
}
update_solib_list (from_tty, 0);
{
if (cs_pst->readin)
{
- internal_error ("select_source_symtab: readin pst found and no symtabs.");
+ internal_error (__FILE__, __LINE__,
+ "select_source_symtab: "
+ "readin pst found and no symtabs.");
}
else
{
frame = create_new_frame (argv[0], 0);
if (!frame)
- internal_error ("create_new_frame returned invalid frame");
+ internal_error (__FILE__, __LINE__,
+ "create_new_frame returned invalid frame");
frame->extra_info->bottom = argv[1];
frame->pc = FRAME_SAVED_PC (frame);
CORE_ADDR frame_addr = FRAME_FP (fi);
if (!fi)
- internal_error ("Bad frame info struct in FRAME_FIND_SAVED_REGS");
+ internal_error (__FILE__, __LINE__,
+ "Bad frame info struct in FRAME_FIND_SAVED_REGS");
memset (saved_regs_addr, 0, NUM_REGS * sizeof (CORE_ADDR));
/* Sequent Symmetry host interface, for GDB when running under Unix.
- Copyright 1986, 1987, 1989, 1991, 1992, 1994 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1992, 1994, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
}
break;
case PTS_WATCHPT_HIT:
- internal_error ("PTS_WATCHPT_HIT\n");
+ internal_error (__FILE__, __LINE__,
+ "PTS_WATCHPT_HIT\n");
break;
default:
/* stopped by signal */
rv = mptrace (XPT_MPDEBUGGER, 0, 0, 0);
if (-1 == rv)
{
- internal_error ("_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s",
+ internal_error (__FILE__, __LINE__,
+ "_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s",
safe_strerror (errno));
}
rv = sigaddset (&set, SIGCHLD);
if (-1 == rv)
{
- internal_error ("_initialize_symm_nat(): sigaddset(SIGCHLD): %s",
+ internal_error (__FILE__, __LINE__,
+ "_initialize_symm_nat(): sigaddset(SIGCHLD): %s",
safe_strerror (errno));
}
rv = sigprocmask (SIG_BLOCK, &set, (sigset_t *) NULL);
if (-1 == rv)
{
- internal_error ("_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s",
+ internal_error (__FILE__, __LINE__,
+ "_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s",
safe_strerror (errno));
}
rv = sigaction (SIGCHLD, &sact, (struct sigaction *) NULL);
if (-1 == rv)
{
- internal_error ("_initialize_symm_nat(): sigaction(SIGCHLD): %s",
+ internal_error (__FILE__, __LINE__,
+ "_initialize_symm_nat(): sigaction(SIGCHLD): %s",
safe_strerror (errno));
}
#endif
};
#define ANOFFSET(secoff, whichone) \
- ((whichone == -1) ? \
- (internal_error ("Section index is uninitialized"), -1) : secoff->offsets[whichone])
+ ((whichone == -1) \
+ ? (internal_error (__FILE__, __LINE__, "Section index is uninitialized"), -1) \
+ : secoff->offsets[whichone])
/* The maximum possible size of a section_offsets table. */
#ifndef SOFTWARE_SINGLE_STEP_P
#define SOFTWARE_SINGLE_STEP_P 0
#define SOFTWARE_SINGLE_STEP(sig,bp_p) \
- (internal_error ("SOFTWARE_SINGLE_STEP"), 0)
+ (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
#endif /* SOFTWARE_SINGLE_STEP_P */
/* Blank target vector entries are initialized to target_ignore. */
+Wed Feb 7 19:54:27 2001 Andrew Cagney <cagney@redhat.com>
+
+ * tui-file.c: Add __FILE__ and __LINE__ parameter to calls to
+ internal_error.
+
2000-12-14 Kevin Buettner <kevinb@redhat.com>
* tui-file.c, tui.c, tuiData.c, tuiLayout.c: Replace occurrences
/* UI_FILE - a generic STDIO like output stream.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
{
struct tui_stream *tmpstream = ui_file_data (file);
if (tmpstream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_delete: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_delete: bad magic number");
if ((tmpstream->ts_streamtype == astring) &&
(tmpstream->ts_strbuf != NULL))
{
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_isatty: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_isatty: bad magic number");
if (stream->ts_streamtype == afile)
return (isatty (fileno (stream->ts_filestream)));
else
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_rewind: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_rewind: bad magic number");
stream->ts_strbuf[0] = '\0';
}
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_put: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_put: bad magic number");
if (stream->ts_streamtype == astring)
write (dest, stream->ts_strbuf, strlen (stream->ts_strbuf));
}
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_get_strbuf: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_get_strbuf: bad magic number");
return (stream->ts_strbuf);
}
struct tui_stream *stream = ui_file_data (file);
int non_null_chars;
if (stream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_adjust_strbuf: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_adjust_strbuf: bad magic number");
if (stream->ts_streamtype != astring)
return;
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
- internal_error ("tui_file_flush: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "tui_file_flush: bad magic number");
/* NOTE: cagney/1999-10-12: If we've been linked with code that uses
fputs_unfiltered_hook then we assume that it doesn't need to know
/* UI_FILE - a generic STDIO like output stream.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
ui_file_data (struct ui_file *file)
{
if (file->magic != &ui_file_magic)
- internal_error ("ui_file_data: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "ui_file_data: bad magic number");
return file->to_data;
}
{
struct mem_file *stream = ui_file_data (file);
if (stream->magic != &mem_file_magic)
- internal_error ("mem_file_delete: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mem_file_delete: bad magic number");
if (stream->buffer != NULL)
xfree (stream->buffer);
xfree (stream);
{
struct mem_file *stream = ui_file_data (file);
if (stream->magic != &mem_file_magic)
- internal_error ("mem_file_rewind: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mem_file_rewind: bad magic number");
stream->length_buffer = 0;
}
{
struct mem_file *stream = ui_file_data (file);
if (stream->magic != &mem_file_magic)
- internal_error ("mem_file_put: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mem_file_put: bad magic number");
if (stream->length_buffer > 0)
write (dest, stream->buffer, stream->length_buffer);
}
{
struct mem_file *stream = ui_file_data (file);
if (stream->magic != &mem_file_magic)
- internal_error ("mem_file_write: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "mem_file_write: bad magic number");
if (stream->buffer == NULL)
{
stream->length_buffer = length_buffer;
{
struct stdio_file *stdio = ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
- internal_error ("stdio_file_delete: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_delete: bad magic number");
if (stdio->close_p)
{
fclose (stdio->file);
{
struct stdio_file *stdio = ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
- internal_error ("stdio_file_flush: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_flush: bad magic number");
fflush (stdio->file);
}
{
struct stdio_file *stdio = ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
- internal_error ("stdio_file_write: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_write: bad magic number");
fwrite (buf, length_buf, 1, stdio->file);
}
{
struct stdio_file *stdio = ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
- internal_error ("stdio_file_fputs: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_fputs: bad magic number");
fputs (linebuffer, stdio->file);
}
{
struct stdio_file *stdio = ui_file_data (file);
if (stdio->magic != &stdio_file_magic)
- internal_error ("stdio_file_isatty: bad magic number");
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_isatty: bad magic number");
return (isatty (fileno (stdio->file)));
}
/* Output generating routines for GDB.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
Written by Fernando Nasser for Cygnus.
ui_out_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
{
if (uiout->table_flag)
- internal_error ("gdb/ui_out.c: tables cannot be nested; table_begin found before \
+ internal_error (__FILE__, __LINE__,
+ "tables cannot be nested; table_begin found before \
previous table_end.");
uiout->table_flag = 1;
ui_out_table_body (struct ui_out *uiout)
{
if (!uiout->table_flag)
- internal_error ("gdb/ui_out.c: table_body outside a table is not valid; it must be \
+ internal_error (__FILE__, __LINE__,
+ "table_body outside a table is not valid; it must be \
after a table_begin and before a table_end.");
if (uiout->body_flag)
- internal_error ("gdb/ui_out.c: extra table_body call not allowed; there must be \
+ internal_error (__FILE__, __LINE__,
+ "extra table_body call not allowed; there must be \
only one table_body after a table_begin and before a table_end.");
if (uiout->headercurr->colno != uiout->table_columns)
- internal_error ("gdb/ui_out.c: number of headers differ from number of table \
+ internal_error (__FILE__, __LINE__,
+ "number of headers differ from number of table \
columns.");
uiout->body_flag = 1;
ui_out_table_end (struct ui_out *uiout)
{
if (!uiout->table_flag)
- internal_error ("gdb/ui_out.c: misplaced table_end or missing table_begin.");
+ internal_error (__FILE__, __LINE__,
+ "misplaced table_end or missing table_begin.");
uiout->body_flag = 0;
uiout->table_flag = 0;
char *colhdr)
{
if (!uiout->table_flag || uiout->body_flag)
- internal_error ("ui_out: table header must be specified after table_begin \
+ internal_error (__FILE__, __LINE__,
+ "table header must be specified after table_begin \
and before table_body.");
append_header_to_list (uiout, width, alignment, colhdr);
ui_out_list_begin (struct ui_out *uiout, char *lstid)
{
if (uiout->table_flag && !uiout->body_flag)
- internal_error ("ui_out: table header or table_body expected; lists must be \
+ internal_error (__FILE__, __LINE__,
+ "table header or table_body expected; lists must be \
specified after table_body.");
if (uiout->list_flag >= 4)
- internal_error ("ui_out: list depth exceeded; only 4 levels of lists can be \
+ internal_error (__FILE__, __LINE__,
+ "list depth exceeded; only 4 levels of lists can be \
nested.");
uiout->list_flag++;
ui_out_list_end (struct ui_out *uiout)
{
if (!uiout->list_flag)
- internal_error ("ui_out: misplaced list_end; there is no list to be closed.");
+ internal_error (__FILE__, __LINE__,
+ "misplaced list_end; there is no list to be closed.");
uo_list_end (uiout, uiout->list_flag);
if (uiout->table_flag)
{
if (!uiout->body_flag)
- internal_error ("ui_out: table_body missing; table fields must be \
+ internal_error (__FILE__, __LINE__,
+ "table_body missing; table fields must be \
specified after table_body and inside a list.");
if (!uiout->list_flag)
- internal_error ("ui_out: list_begin missing; table fields must be \
+ internal_error (__FILE__, __LINE__,
+ "list_begin missing; table fields must be \
specified after table_body and inside a list.");
}
}
&& get_curr_header (uiout, &colno, width, align, &text))
{
if (fldno != colno)
- internal_error ("gdb/ui-out.c: ui-out internal error in handling headers.");
+ internal_error (__FILE__, __LINE__,
+ "ui-out internal error in handling headers.");
}
else
{
{
void **location = ptr;
if (location == NULL)
- internal_error ("free_current_contents: NULL pointer");
+ internal_error (__FILE__, __LINE__,
+ "free_current_contents: NULL pointer");
if (*location != NULL)
{
xfree (*location);
want to continue, dump core, or just exit. */
NORETURN void
-internal_verror (const char *fmt, va_list ap)
+internal_verror (const char *file, int line,
+ const char *fmt, va_list ap)
{
static char msg[] = "Internal GDB error: recursive internal error.\n";
static int dejavu = 0;
/* Try to get the message out */
target_terminal_ours ();
- fputs_unfiltered ("gdb-internal-error: ", gdb_stderr);
+ fprintf_unfiltered (gdb_stderr, "%s:%d: gdb-internal-error: ", file, line);
vfprintf_unfiltered (gdb_stderr, fmt, ap);
fputs_unfiltered ("\n", gdb_stderr);
}
NORETURN void
-internal_error (char *string, ...)
+internal_error (const char *file, int line, const char *string, ...)
{
va_list ap;
va_start (ap, string);
- internal_verror (string, ap);
+ internal_verror (file, line, string, ap);
va_end (ap);
}
{
if (size > 0)
{
- internal_error ("virtual memory exhausted: can't allocate %ld bytes.", size);
+ internal_error (__FILE__, __LINE__,
+ "virtual memory exhausted: can't allocate %ld bytes.", size);
}
else
{
- internal_error ("virtual memory exhausted.");
+ internal_error (__FILE__, __LINE__,
+ "virtual memory exhausted.");
}
}
/* NULL could be returned due to a memory allocation problem; a
badly format string; or something else. */
if ((*ret) == NULL)
- internal_error ("%s:%d: vasprintf returned NULL buffer (errno %d)",
- __FILE__, __LINE__, errno);
+ internal_error (__FILE__, __LINE__,
+ "vasprintf returned NULL buffer (errno %d)",
+ errno);
/* A negative status with a non-NULL buffer shouldn't never
happen. But to be sure. */
if (status < 0)
- internal_error ("%s:%d: vasprintf call failed (errno %d)",
- __FILE__, __LINE__, errno);
+ internal_error (__FILE__, __LINE__,
+ "vasprintf call failed (errno %d)",
+ errno);
}
host_pointer_to_address (void *ptr)
{
if (sizeof (ptr) != TYPE_LENGTH (builtin_type_ptr))
- internal_error ("core_addr_to_void_ptr: bad cast");
+ internal_error (__FILE__, __LINE__,
+ "core_addr_to_void_ptr: bad cast");
return POINTER_TO_ADDRESS (builtin_type_ptr, &ptr);
}
{
void *ptr;
if (sizeof (ptr) != TYPE_LENGTH (builtin_type_ptr))
- internal_error ("core_addr_to_void_ptr: bad cast");
+ internal_error (__FILE__, __LINE__,
+ "core_addr_to_void_ptr: bad cast");
ADDRESS_TO_POINTER (builtin_type_ptr, &ptr, addr);
return ptr;
}
/* Target-dependent code for the NEC V850 for GDB, the GNU debugger.
- Copyright 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
}
}
- internal_error ("Architecture `%s' unrecognized", ap->printable_name);
+ internal_error (__FILE__, __LINE__,
+ "Architecture `%s' unrecognized", ap->printable_name);
}
void