forked from Imagelibrary/binutils-gdb
Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user