]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/cli/cli-dump.c
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / cli / cli-dump.c
index 295e2eb84ca26a8a5333fe4a8bba6d74ba272b16..bbe9d23433eb651dbd25e6d2e87afb80c4aae2d0 100644 (file)
@@ -1,6 +1,6 @@
 /* Dump-to-file commands, for GDB, the GNU debugger.
 
-   Copyright 2002, 2005 Free Software Foundation, Inc.
+   Copyright (c) 2002, 2005, 2007 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -18,8 +18,8 @@
 
    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.  */
 
 #include "defs.h"
 #include "gdb_string.h"
@@ -218,7 +218,9 @@ dump_bfd_file (const char *filename, const char *mode,
   bfd_set_section_size (obfd, osection, len);
   bfd_set_section_vma (obfd, osection, vaddr);
   bfd_set_section_alignment (obfd, osection, 0);
-  bfd_set_section_flags (obfd, osection, 0x203);
+  bfd_set_section_flags (obfd, osection, (SEC_HAS_CONTENTS
+                                         | SEC_ALLOC
+                                         | SEC_LOAD));
   osection->entsize = 0;
   bfd_set_section_contents (obfd, osection, buf, 0, len);
 }
@@ -436,7 +438,7 @@ add_dump_command (char *name, void (*func) (char *args, char *mode),
       && c->doc[3] == 't' 
       && c->doc[4] == 'e'
       && c->doc[5] == ' ')
-    c->doc = concat ("Append ", c->doc + 6, NULL);
+    c->doc = concat ("Append ", c->doc + 6, (char *)NULL);
 }
 
 /* Opaque data for restore_section_callback. */
@@ -461,7 +463,7 @@ restore_section_callback (bfd *ibfd, asection *isec, void *args)
   bfd_size_type sec_offset = 0;
   bfd_size_type sec_load_count = size;
   struct cleanup *old_chain;
-  char *buf;
+  gdb_byte *buf;
   int ret;
 
   /* Ignore non-loadable sections, eg. from elf files. */
@@ -523,7 +525,7 @@ restore_binary_file (char *filename, struct callback_data *data)
 {
   FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
   int status;
-  char *buf;
+  gdb_byte *buf;
   long len;
 
   /* Get the file size for reading.  */