Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
This commit is contained in:
parent
8ca8f343f9
commit
8e65ff28b0
66 changed files with 839 additions and 430 deletions
|
@ -1,3 +1,61 @@
|
|||
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>:
|
||||
|
|
4
gdb/TODO
4
gdb/TODO
|
@ -433,10 +433,6 @@ an error status.
|
|||
|
||||
--
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -892,7 +892,8 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
|
|||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -117,7 +117,8 @@ legacy_register_name (int i)
|
|||
else
|
||||
return names[i];
|
||||
#else
|
||||
internal_error ("legacy_register_name: called.");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"legacy_register_name: called.");
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
@ -180,7 +181,8 @@ default_float_format (struct gdbarch *gdbarch)
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,7 +202,8 @@ default_double_format (struct gdbarch *gdbarch)
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -347,7 +350,8 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
|
|||
}
|
||||
}
|
||||
else
|
||||
internal_error ("set_endian: bad value");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"set_endian: bad value");
|
||||
show_endian (NULL, from_tty);
|
||||
}
|
||||
|
||||
|
@ -357,7 +361,8 @@ static void
|
|||
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;
|
||||
|
@ -403,7 +408,8 @@ static int
|
|||
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. */
|
||||
|
@ -416,7 +422,8 @@ set_arch (const struct bfd_arch_info *arch,
|
|||
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:
|
||||
|
@ -450,11 +457,13 @@ set_architecture_from_arch_mach (enum bfd_architecture arch,
|
|||
{
|
||||
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) */
|
||||
|
@ -464,7 +473,8 @@ set_architecture_from_file (bfd *abfd)
|
|||
{
|
||||
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);
|
||||
|
@ -509,7 +519,8 @@ set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
|
|||
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
|
||||
|
@ -521,7 +532,8 @@ set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
|
|||
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);
|
||||
|
@ -625,10 +637,12 @@ initialize_current_architecture (void)
|
|||
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. */
|
||||
|
@ -670,7 +684,8 @@ initialize_current_architecture (void)
|
|||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
32
gdb/ax-gdb.c
32
gdb/ax-gdb.c
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -409,7 +409,8 @@ gen_fetch (struct agent_expr *ax, struct type *type)
|
|||
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);
|
||||
|
@ -420,7 +421,8 @@ gen_fetch (struct agent_expr *ax, struct type *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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -530,7 +532,8 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
|
|||
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:
|
||||
|
@ -1088,7 +1091,8 @@ gen_deref (struct agent_expr *ax, struct axs_value *value)
|
|||
/* 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
|
||||
|
@ -1143,7 +1147,8 @@ find_field (struct type *type, char *name)
|
|||
|
||||
/* 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++)
|
||||
{
|
||||
|
@ -1153,7 +1158,8 @@ find_field (struct type *type, char *name)
|
|||
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'",
|
||||
|
@ -1225,7 +1231,8 @@ gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value,
|
|||
|
||||
/* 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. */
|
||||
|
@ -1535,7 +1542,8 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
|
|||
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;
|
||||
|
||||
|
@ -1610,7 +1618,8 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
|
|||
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;
|
||||
}
|
||||
|
@ -1678,7 +1687,8 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
|
|||
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;
|
||||
|
||||
|
|
|
@ -2182,7 +2182,8 @@ print_bp_stop_message (bpstat bs)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
@ -3131,7 +3132,8 @@ print_one_breakpoint (struct breakpoint *b,
|
|||
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);
|
||||
|
@ -3163,7 +3165,8 @@ print_one_breakpoint (struct breakpoint *b,
|
|||
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:
|
||||
|
@ -3750,14 +3753,16 @@ check_duplicates (CORE_ADDR address, asection *section)
|
|||
|
||||
/* 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
|
||||
|
@ -6782,7 +6787,8 @@ delete_breakpoint (struct breakpoint *bpt)
|
|||
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)
|
||||
|
|
14
gdb/ch-exp.c
14
gdb/ch-exp.c
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -216,7 +216,8 @@ static enum ch_terminal
|
|||
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 ();
|
||||
|
@ -232,7 +233,8 @@ pushback_token (enum ch_terminal code, YYSTYPE node)
|
|||
{
|
||||
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];
|
||||
|
@ -265,7 +267,8 @@ require (enum ch_terminal token)
|
|||
{
|
||||
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 ();
|
||||
}
|
||||
|
@ -2177,7 +2180,8 @@ ch_lex (void)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -513,7 +513,8 @@ arg_cleanup (void *ignore)
|
|||
{
|
||||
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);
|
||||
|
@ -1169,7 +1170,7 @@ define_command (char *comname, int from_tty)
|
|||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1253,7 +1254,7 @@ script_from_file (FILE *stream, char *file)
|
|||
|
||||
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);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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
|
||||
|
@ -308,7 +308,8 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
|
|||
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;
|
||||
|
@ -378,7 +379,8 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
|
|||
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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -1259,7 +1259,8 @@ print_insn (CORE_ADDR memaddr, struct ui_file *stream)
|
|||
{
|
||||
/* 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;
|
||||
|
@ -1523,7 +1524,8 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
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);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -1146,7 +1146,8 @@ print_insn (CORE_ADDR memaddr, struct ui_file *stream)
|
|||
{
|
||||
/* 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;
|
||||
|
|
|
@ -869,9 +869,11 @@ extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
|
|||
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;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -250,7 +250,8 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
|
|||
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
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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
|
||||
|
@ -948,7 +949,8 @@ read_comp_unit_head (struct comp_unit_head *cu_header,
|
|||
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;
|
||||
}
|
||||
|
@ -3471,7 +3473,8 @@ read_address (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
|
|||
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
|
||||
|
@ -3488,7 +3491,8 @@ read_address (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3573,7 +3577,8 @@ read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
|
|||
*bytes_read = 8;
|
||||
break;
|
||||
default:
|
||||
internal_error ("read_offset: bad switch");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"read_offset: bad switch");
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
@ -464,7 +465,8 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
|
|||
}
|
||||
}
|
||||
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. */
|
||||
|
@ -475,7 +477,8 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
|
|||
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;
|
||||
|
|
|
@ -484,7 +484,8 @@ add_file_handler (int fd, handler_func * proc, gdb_client_data client_data)
|
|||
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)
|
||||
|
@ -492,7 +493,8 @@ add_file_handler (int fd, handler_func * proc, gdb_client_data client_data)
|
|||
#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
|
||||
|
@ -552,7 +554,8 @@ create_file_handler (int fd, int mask, handler_func * proc, gdb_client_data clie
|
|||
(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
|
||||
|
@ -624,7 +627,8 @@ delete_file_handler (int fd)
|
|||
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
|
||||
|
@ -725,7 +729,8 @@ handle_file_event (int event_file_desc)
|
|||
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
|
||||
|
@ -786,7 +791,8 @@ gdb_wait_for_event (void)
|
|||
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
|
||||
|
@ -847,7 +853,8 @@ gdb_wait_for_event (void)
|
|||
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
|
||||
|
@ -1167,7 +1174,8 @@ poll_timers (void)
|
|||
#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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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).
|
||||
|
||||
|
@ -896,7 +896,8 @@ get_bf_for_fcn (long the_function)
|
|||
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)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -190,7 +190,8 @@ extract_typed_address (void *buf, struct type *type)
|
|||
{
|
||||
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);
|
||||
|
@ -276,7 +277,8 @@ store_typed_address (void *buf, struct type *type, CORE_ADDR addr)
|
|||
{
|
||||
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);
|
||||
|
@ -415,7 +417,8 @@ value_of_register (int regnum)
|
|||
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),
|
||||
|
@ -874,7 +877,8 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
|||
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;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -43,8 +43,7 @@
|
|||
/* 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)
|
||||
|
||||
|
|
429
gdb/gdbarch.c
429
gdb/gdbarch.c
File diff suppressed because it is too large
Load diff
|
@ -638,7 +638,7 @@ extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
|
|||
|
||||
/* 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);
|
||||
|
@ -830,7 +830,7 @@ extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_r
|
|||
|
||||
/* 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);
|
||||
|
@ -844,7 +844,7 @@ extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gd
|
|||
|
||||
/* 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);
|
||||
|
@ -862,7 +862,7 @@ extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarc
|
|||
|
||||
/* 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);
|
||||
|
@ -880,7 +880,7 @@ extern void set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, gdbarch_
|
|||
|
||||
/* 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);
|
||||
|
@ -983,7 +983,7 @@ extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ft
|
|||
|
||||
/* 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);
|
||||
|
@ -997,7 +997,7 @@ extern void set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, gdbarch_d10v_m
|
|||
|
||||
/* 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);
|
||||
|
@ -1011,7 +1011,7 @@ extern void set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, gdbarch_d10v_m
|
|||
|
||||
/* 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);
|
||||
|
@ -1025,7 +1025,7 @@ extern void set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, gdbarch_d10v_dadd
|
|||
|
||||
/* 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);
|
||||
|
@ -1039,7 +1039,7 @@ extern void set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, gdbarch_d10v_iadd
|
|||
|
||||
/* 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);
|
||||
|
@ -1053,7 +1053,7 @@ extern void set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, gdba
|
|||
|
||||
/* 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);
|
||||
|
@ -1325,7 +1325,7 @@ extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
|
|||
|
||||
/* 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);
|
||||
|
@ -1367,7 +1367,7 @@ extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
|
|||
|
||||
/* 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);
|
||||
|
@ -1396,7 +1396,7 @@ extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
|
|||
|
||||
/* 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);
|
||||
|
@ -1748,7 +1748,7 @@ extern disassemble_info tm_print_insn_info;
|
|||
/* 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)
|
||||
|
|
|
@ -678,7 +678,7 @@ do
|
|||
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}))" \
|
||||
|
@ -993,7 +993,7 @@ extern disassemble_info tm_print_insn_info;
|
|||
/* 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)
|
||||
|
@ -1275,9 +1275,11 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
|||
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
|
||||
|
@ -1307,12 +1309,14 @@ do
|
|||
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
|
||||
|
@ -1437,7 +1441,8 @@ do
|
|||
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=""
|
||||
|
@ -1467,11 +1472,13 @@ do
|
|||
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"
|
||||
|
@ -1752,7 +1759,8 @@ gdbarch_printable_names (void)
|
|||
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);
|
||||
|
@ -1781,7 +1789,9 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
|
|||
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;
|
||||
|
@ -1789,8 +1799,9 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
|
|||
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)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -490,13 +490,14 @@ go32_fetch_registers (int regno)
|
|||
((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);
|
||||
}
|
||||
}
|
||||
|
@ -514,7 +515,8 @@ store_register (int 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 */
|
||||
|
@ -620,7 +622,8 @@ go32_create_inferior (char *exec_file, char *args, char **env)
|
|||
|
||||
/* 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, "<>"))
|
||||
|
@ -1245,7 +1248,8 @@ init_go32_ops (void)
|
|||
|
||||
/* 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;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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
|
||||
|
@ -106,7 +107,8 @@ store_inferior_registers (int regno)
|
|||
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
|
||||
|
@ -222,7 +224,8 @@ fetch_register (int regno)
|
|||
+ (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))
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -600,7 +600,8 @@ fetch_inferior_registers (int regno)
|
|||
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,
|
||||
|
@ -653,7 +654,8 @@ store_inferior_registers (int regno)
|
|||
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -771,7 +771,8 @@ i386_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
®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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -829,7 +830,8 @@ i386_store_return_value (struct type *type, char *valbuf)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -324,20 +324,21 @@ read_sigcontext_register (struct frame_info *frame, int regnum)
|
|||
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
|
||||
|
@ -1922,8 +1923,8 @@ process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
|
|||
*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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1106,7 +1106,8 @@ finish_command_continuation (struct continuation_arg *arg)
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -1233,7 +1234,8 @@ finish_command (char *arg, int from_tty)
|
|||
|
||||
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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -421,20 +421,20 @@ extern int attach_flag;
|
|||
#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)
|
||||
|
@ -443,7 +443,7 @@ extern int attach_flag;
|
|||
#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)
|
||||
|
@ -461,15 +461,15 @@ extern int attach_flag;
|
|||
#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
|
||||
|
||||
|
||||
|
|
|
@ -340,7 +340,8 @@ _initialize_kernel_u_addr (void)
|
|||
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. */
|
||||
}
|
||||
|
||||
|
|
11
gdb/infrun.c
11
gdb/infrun.c
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -473,7 +473,8 @@ follow_inferior_fork (int parent_pid, int child_pid, int has_forked,
|
|||
/* 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_...; */
|
||||
}
|
||||
|
||||
|
@ -3384,7 +3385,8 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
|
|||
#endif
|
||||
break;
|
||||
default:
|
||||
internal_error ("print_stop_reason: unrecognized enum value");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"print_stop_reason: unrecognized enum value");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3520,7 +3522,8 @@ and/or watchpoints.\n");
|
|||
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:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -721,7 +721,8 @@ longest_local_hex_string_custom (LONGEST num, char *width)
|
|||
|
||||
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)
|
||||
|
|
18
gdb/m3-nat.c
18
gdb/m3-nat.c
|
@ -1,7 +1,8 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -1637,7 +1638,8 @@ catch_exception_raise (mach_port_t port, thread_t thread, task_t task,
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
@ -3498,7 +3500,8 @@ mach3_exception_actions (WAITTYPE *w, boolean_t force_print_only, char *who)
|
|||
stop_code);
|
||||
break;
|
||||
default:
|
||||
internal_error ("Unknown exception");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"Unknown exception");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3523,13 +3526,15 @@ setup_notify_port (int create_new)
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4499,7 +4504,8 @@ _initialize_m3_nat (void)
|
|||
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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -672,7 +672,8 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
|
|||
|
||||
return 1;
|
||||
#else
|
||||
internal_error ("m68k_get_longjmp_target: not implemented");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"m68k_get_longjmp_target: not implemented");
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -115,7 +115,8 @@ maintenance_dump_me (char *args, int from_tty)
|
|||
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
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -161,7 +161,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
|
|||
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);
|
||||
|
||||
|
|
|
@ -234,7 +234,8 @@ build_table (struct mi_cmd *commands)
|
|||
{
|
||||
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)
|
||||
|
|
|
@ -65,7 +65,8 @@ mi_console_file_delete (struct ui_file *file)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -75,7 +76,8 @@ mi_console_file_fputs (const char *buf,
|
|||
{
|
||||
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 */
|
||||
|
@ -91,7 +93,8 @@ mi_console_raw_packet (void *data,
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -108,7 +111,8 @@ mi_console_file_flush (struct ui_file *file)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ mi_getopt (const char *prefix,
|
|||
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];
|
||||
|
|
|
@ -477,7 +477,8 @@ mips_mask_address_p (void)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
@ -498,7 +499,8 @@ show_mask_address (char *cmd, int from_tty)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
@ -982,7 +984,8 @@ unpack_mips16 (CORE_ADDR pc,
|
|||
break;
|
||||
}
|
||||
default:
|
||||
internal_error ("%s:%d: bad switch", __FILE__, __LINE__);
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"bad switch");
|
||||
}
|
||||
upk->offset = offset;
|
||||
upk->regx = regx;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -974,7 +975,8 @@ mn10300_gdbarch_init (struct gdbarch_info info,
|
|||
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. */
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
@ -370,7 +371,8 @@ unlink_objfile (struct objfile *objfile)
|
|||
}
|
||||
}
|
||||
|
||||
internal_error ("objfiles.c (unlink_objfile): objfile already unlinked");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"unlink_objfile: objfile already unlinked");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -586,16 +587,19 @@ extern int is_in_import_list (char *, struct objfile *);
|
|||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -776,7 +776,8 @@ generic_target_read_pc (int pid)
|
|||
return pc_val;
|
||||
}
|
||||
#endif
|
||||
internal_error ("generic_target_read_pc");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"generic_target_read_pc");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -813,7 +814,8 @@ generic_target_write_pc (CORE_ADDR pc, int pid)
|
|||
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
|
||||
}
|
||||
|
||||
|
@ -846,7 +848,8 @@ generic_target_read_sp (void)
|
|||
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
|
||||
|
@ -865,7 +868,8 @@ generic_target_write_sp (CORE_ADDR val)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
internal_error ("generic_target_write_sp");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"generic_target_write_sp");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -881,7 +885,8 @@ generic_target_read_fp (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
|
||||
|
@ -900,7 +905,8 @@ generic_target_write_fp (CORE_ADDR val)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
internal_error ("generic_target_write_fp");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"generic_target_write_fp");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1243,7 +1243,8 @@ mips_request (int cmd,
|
|||
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;
|
||||
|
@ -1253,7 +1254,8 @@ mips_request (int cmd,
|
|||
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;
|
||||
|
||||
|
|
|
@ -335,7 +335,8 @@ gdbsim_store_register (int regno)
|
|||
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);
|
||||
|
@ -481,7 +482,8 @@ gdbsim_open (char *args, int from_tty)
|
|||
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
|
||||
|
|
|
@ -976,7 +976,8 @@ vx_wait (int pid_to_wait_for, struct target_waitstatus *status)
|
|||
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);
|
||||
|
|
36
gdb/remote.c
36
gdb/remote.c
|
@ -615,7 +615,8 @@ packet_ok (const char *buf, struct packet_config *config)
|
|||
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;
|
||||
|
@ -1681,7 +1682,8 @@ remote_threads_extra_info (struct thread_info *tp)
|
|||
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)
|
||||
{
|
||||
|
@ -3364,10 +3366,10 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
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> */
|
||||
|
@ -3431,10 +3433,10 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
*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));
|
||||
|
@ -4340,7 +4342,8 @@ watchpoint_to_Z_packet (int type)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4376,7 +4379,8 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int 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
|
||||
|
@ -4410,7 +4414,8 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
|
|||
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
|
||||
|
@ -4446,7 +4451,8 @@ remote_insert_hw_breakpoint (CORE_ADDR addr, int len)
|
|||
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
|
||||
|
@ -4482,7 +4488,8 @@ remote_remove_hw_breakpoint (CORE_ADDR addr, int len)
|
|||
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
|
||||
|
@ -5405,7 +5412,8 @@ static void
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
@ -927,7 +928,8 @@ set_host_arch (int pid)
|
|||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
@ -2039,8 +2040,9 @@ process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
|
|||
*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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,8 @@ serial_readchar (serial_t scb, int timeout)
|
|||
/* 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)
|
||||
|
@ -508,7 +509,8 @@ deprecated_serial_fd (serial_t scb)
|
|||
called? */
|
||||
if (scb->fd < 0)
|
||||
{
|
||||
internal_error ("serial: FD not valid");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"serial: FD not valid");
|
||||
}
|
||||
return scb->fd; /* sigh */
|
||||
}
|
||||
|
|
|
@ -1731,7 +1731,8 @@ static void
|
|||
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);
|
||||
|
@ -1802,7 +1803,8 @@ static void
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
@ -210,7 +210,8 @@ default_svr4_fetch_link_map_offsets (void)
|
|||
|
||||
#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 */
|
||||
|
|
|
@ -616,8 +616,9 @@ info_sharedlibrary_command (char *ignore, int from_tty)
|
|||
}
|
||||
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);
|
||||
|
|
|
@ -200,7 +200,9 @@ select_source_symtab (register struct symtab *s)
|
|||
{
|
||||
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
|
||||
{
|
||||
|
|
|
@ -526,7 +526,8 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
|
|||
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);
|
||||
|
@ -1053,7 +1054,8 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
|
|||
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));
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -531,7 +532,8 @@ child_wait (int pid, struct target_waitstatus *status)
|
|||
}
|
||||
break;
|
||||
case PTS_WATCHPT_HIT:
|
||||
internal_error ("PTS_WATCHPT_HIT\n");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"PTS_WATCHPT_HIT\n");
|
||||
break;
|
||||
default:
|
||||
/* stopped by signal */
|
||||
|
@ -844,7 +846,8 @@ _initialize_symm_nat (void)
|
|||
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));
|
||||
}
|
||||
|
||||
|
@ -862,13 +865,15 @@ _initialize_symm_nat (void)
|
|||
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));
|
||||
}
|
||||
|
||||
|
@ -878,7 +883,8 @@ _initialize_symm_nat (void)
|
|||
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
|
||||
|
|
|
@ -828,8 +828,9 @@ struct section_offsets
|
|||
};
|
||||
|
||||
#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. */
|
||||
|
||||
|
|
|
@ -1396,7 +1396,7 @@ extern void push_remote_target (char *name, int from_tty);
|
|||
#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. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -85,7 +85,8 @@ tui_file_delete (struct ui_file *file)
|
|||
{
|
||||
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))
|
||||
{
|
||||
|
@ -131,7 +132,8 @@ tui_file_isatty (struct ui_file *file)
|
|||
{
|
||||
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
|
||||
|
@ -143,7 +145,8 @@ tui_file_rewind (struct ui_file *file)
|
|||
{
|
||||
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';
|
||||
}
|
||||
|
||||
|
@ -154,7 +157,8 @@ tui_file_put (struct ui_file *file,
|
|||
{
|
||||
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));
|
||||
}
|
||||
|
@ -240,7 +244,8 @@ tui_file_get_strbuf (struct ui_file *file)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -252,7 +257,8 @@ tui_file_adjust_strbuf (int n, struct ui_file *file)
|
|||
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;
|
||||
|
@ -278,7 +284,8 @@ tui_file_flush (struct ui_file *file)
|
|||
{
|
||||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -149,7 +149,8 @@ void *
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -314,7 +315,8 @@ mem_file_delete (struct ui_file *file)
|
|||
{
|
||||
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);
|
||||
|
@ -331,7 +333,8 @@ mem_file_rewind (struct ui_file *file)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -342,7 +345,8 @@ mem_file_put (struct ui_file *file,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -354,7 +358,8 @@ mem_file_write (struct ui_file *file,
|
|||
{
|
||||
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;
|
||||
|
@ -415,7 +420,8 @@ stdio_file_delete (struct ui_file *file)
|
|||
{
|
||||
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);
|
||||
|
@ -428,7 +434,8 @@ stdio_file_flush (struct ui_file *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);
|
||||
}
|
||||
|
||||
|
@ -437,7 +444,8 @@ stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -446,7 +454,8 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *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);
|
||||
}
|
||||
|
||||
|
@ -455,7 +464,8 @@ stdio_file_isatty (struct ui_file *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)));
|
||||
}
|
||||
|
||||
|
|
38
gdb/ui-out.c
38
gdb/ui-out.c
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -190,7 +190,8 @@ void
|
|||
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;
|
||||
|
@ -208,13 +209,16 @@ void
|
|||
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;
|
||||
|
@ -227,7 +231,8 @@ void
|
|||
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;
|
||||
|
@ -244,7 +249,8 @@ ui_out_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
|
|||
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);
|
||||
|
@ -256,10 +262,12 @@ void
|
|||
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++;
|
||||
|
@ -274,7 +282,8 @@ void
|
|||
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);
|
||||
|
||||
|
@ -850,10 +859,12 @@ verify_field_proper_position (struct ui_out *uiout)
|
|||
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.");
|
||||
}
|
||||
}
|
||||
|
@ -873,7 +884,8 @@ verify_field_alignment (struct ui_out *uiout,
|
|||
&& 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
|
||||
{
|
||||
|
|
34
gdb/utils.c
34
gdb/utils.c
|
@ -389,7 +389,8 @@ free_current_contents (void *ptr)
|
|||
{
|
||||
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);
|
||||
|
@ -670,7 +671,8 @@ error_init (void)
|
|||
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;
|
||||
|
@ -695,7 +697,7 @@ internal_verror (const char *fmt, va_list ap)
|
|||
|
||||
/* 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);
|
||||
|
||||
|
@ -731,12 +733,12 @@ Create a core file containing the current state of GDB? ");
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1002,11 +1004,13 @@ nomem (long size)
|
|||
{
|
||||
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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1111,13 +1115,15 @@ xvasprintf (char **ret, const char *format, va_list ap)
|
|||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2882,7 +2888,8 @@ CORE_ADDR
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -2891,7 +2898,8 @@ address_to_host_pointer (CORE_ADDR addr)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* 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.
|
||||
|
||||
|
@ -848,7 +848,8 @@ v850_target_architecture_hook (const bfd_arch_info_type *ap)
|
|||
}
|
||||
}
|
||||
|
||||
internal_error ("Architecture `%s' unrecognized", ap->printable_name);
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"Architecture `%s' unrecognized", ap->printable_name);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue