PR binutils/16024
[binutils-gdb.git] / binutils / rddbg.c
index e977d8b5ef14000697aac3e76d44497cfbf9e7c3..27abd66a489bf653ed1cf1aeabb43053eae4594a 100644 (file)
@@ -1,13 +1,13 @@
 /* rddbg.c -- Read debugging information into a generic form.
-   Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005
-   Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005, 2007, 2008,
+   2010  Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>.
 
    This file is part of GNU Binutils.
 
    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
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+
 /* This file reads debugging information into a generic form.  This
    file knows how to dig the debugging information out of an object
    file.  */
 
+#include "sysdep.h"
 #include "bfd.h"
-#include "bucomm.h"
 #include "libiberty.h"
+#include "bucomm.h"
 #include "debug.h"
 #include "budbg.h"
 
@@ -43,7 +45,7 @@ static void free_saved_stabs (void);
    pointer.  */
 
 void *
-read_debugging_info (bfd *abfd, asymbol **syms, long symcount)
+read_debugging_info (bfd *abfd, asymbol **syms, long symcount, bfd_boolean no_messages)
 {
   void *dhandle;
   bfd_boolean found;
@@ -82,8 +84,9 @@ read_debugging_info (bfd *abfd, asymbol **syms, long symcount)
 
   if (! found)
     {
-      non_fatal (_("%s: no recognized debugging information"),
-                bfd_get_filename (abfd));
+      if (! no_messages)
+       non_fatal (_("%s: no recognized debugging information"),
+                  bfd_get_filename (abfd));
       return NULL;
     }
 
@@ -161,7 +164,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
            {
              unsigned int strx;
              int type;
-             int other;
+             int other ATTRIBUTE_UNUSED;
              int desc;
              bfd_vma value;