* d10v-dis.c: Fix formatting.
[deliverable/binutils-gdb.git] / gdb / objfiles.h
index 86b77a5b30376d25d45302a0b88a9e0b46acedc1..d3f669e9601b8e44174db117bf6937d80eca3e99 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions for symbol file management in GDB.
-   Copyright (C) 1992, 1993, 1994, 1995, 1999 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -586,19 +587,23 @@ 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)
-
-#define SECT_OFF_BSS(objfile) \
-     ((objfile->sect_index_bss == -1) ? \
-      (internal_error ("sect_index_bss not initialized"), -1) : objfile->sect_index_bss)
+     ((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
+   uninitialized section index. */
+#define SECT_OFF_BSS(objfile) (objfile)->sect_index_bss
 
 #endif /* !defined (OBJFILES_H) */
This page took 0.028596 seconds and 4 git commands to generate.