* gdb.server/ext-run.exp: Relax regexp for init program.
[deliverable/binutils-gdb.git] / binutils / ieee.c
index ec9dec8780ecd3e99839face1d5a7b935f9b3968..9a61132bfa20fc56e2ec4284b2a490b53218daf8 100644 (file)
@@ -1,12 +1,13 @@
 /* ieee.c -- Read and write IEEE-695 debugging information.
-   Copyright 1996, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007, 2008
+   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,
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 /* This file reads and writes IEEE-695 debugging information.  */
 
-#include <stdio.h>
+#include "sysdep.h"
 #include <assert.h>
-
 #include "bfd.h"
 #include "ieee.h"
-#include "bucomm.h"
 #include "libiberty.h"
 #include "debug.h"
 #include "budbg.h"
@@ -1234,7 +1233,7 @@ parse_ieee_be (struct ieee_info *info, const bfd_byte **pp)
   switch (info->blockstack.bsp->kind)
     {
     case 2:
-      /* When we end the global typedefs block, we copy out the the
+      /* When we end the global typedefs block, we copy out the
          contents of info->vars.  This is because the variable indices
          may be reused in the local blocks.  However, we need to
          preserve them so that we can locate a function returning a
@@ -4593,8 +4592,10 @@ write_ieee_debugging_info (bfd *abfd, void *dhandle)
   info.type_indx = 256;
   info.name_indx = 32;
 
-  if (! bfd_hash_table_init (&info.typedefs.root, ieee_name_type_newfunc)
-      || ! bfd_hash_table_init (&info.tags.root, ieee_name_type_newfunc))
+  if (!bfd_hash_table_init (&info.typedefs.root, ieee_name_type_newfunc,
+                           sizeof (struct ieee_name_type_hash_entry))
+      || !bfd_hash_table_init (&info.tags.root, ieee_name_type_newfunc,
+                              sizeof (struct ieee_name_type_hash_entry)))
     return FALSE;
 
   if (! ieee_init_buffer (&info, &info.global_types)
@@ -4675,14 +4676,10 @@ write_ieee_debugging_info (bfd *abfd, void *dhandle)
       return TRUE;
     }
   err = NULL;
-  s = bfd_make_section (abfd, ".debug");
+  s = bfd_make_section_with_flags (abfd, ".debug",
+                                  SEC_DEBUGGING | SEC_HAS_CONTENTS);
   if (s == NULL)
     err = "bfd_make_section";
-  if (err == NULL)
-    {
-      if (! bfd_set_section_flags (abfd, s, SEC_DEBUGGING | SEC_HAS_CONTENTS))
-       err = "bfd_set_section_flags";
-    }
   if (err == NULL)
     {
       bfd_size_type size;
@@ -6036,7 +6033,7 @@ ieee_end_struct_type (void *p)
          && ! ieee_buffer_emptyp (&info->type_stack->type.strdef));
 
   /* If we were ignoring this struct definition because it was a
-     duplicate defintion, just through away whatever bytes we have
+     duplicate definition, just through away whatever bytes we have
      accumulated.  Leave the type on the stack.  */
   if (info->type_stack->type.ignorep)
     return TRUE;
This page took 0.024488 seconds and 4 git commands to generate.