diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-02-08 06:03:54 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-02-08 06:03:54 +0000 |
commit | 8e65ff28b0780a52bdbe067b6297a66f9ec4e16e (patch) | |
tree | 1cf3436ec5c6d3e4f4dedb4ee2ccfa2c107dc33b /gdb/ui-file.c | |
parent | 8ca8f343f993cbe9937ef15e8cbbee95613c2016 (diff) | |
download | binutils-gdb-8e65ff28b0780a52bdbe067b6297a66f9ec4e16e.tar.gz |
Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
Diffstat (limited to 'gdb/ui-file.c')
-rw-r--r-- | gdb/ui-file.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/gdb/ui-file.c b/gdb/ui-file.c index 616cc5494ce..81b7977fdb4 100644 --- a/gdb/ui-file.c +++ b/gdb/ui-file.c @@ -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))); } |