GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / cli / cli-dump.c
index 931bb4a64c6f694edc0fca79245054eff6a7b19a..611b0c350ea53b111020f03918b2a34891dfda86 100644 (file)
@@ -1,6 +1,6 @@
 /* Dump-to-file commands, for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -212,7 +212,7 @@ dump_memory_to_file (const char *cmd, const char *mode, const char *file_format)
   CORE_ADDR hi;
   ULONGEST count;
   const char *filename;
-  void *buf;
+  gdb_byte *buf;
   const char *lo_exp;
   const char *hi_exp;
 
@@ -237,7 +237,7 @@ dump_memory_to_file (const char *cmd, const char *mode, const char *file_format)
 
   /* FIXME: Should use read_memory_partial() and a magic blocking
      value.  */
-  buf = xmalloc (count);
+  buf = (gdb_byte *) xmalloc (count);
   make_cleanup (xfree, buf);
   read_memory (lo, buf, count);
   
@@ -596,8 +596,9 @@ restore_command (char *args_in, int from_tty)
        }
       /* Parse offset (optional).  */
       if (args != NULL && *args != '\0')
-      data.load_offset = 
-       parse_and_eval_address (scan_expression_with_cleanup (&args, NULL));
+       data.load_offset = binary_flag ?
+         parse_and_eval_address (scan_expression_with_cleanup (&args, NULL)) :
+         parse_and_eval_long (scan_expression_with_cleanup (&args, NULL));
       if (args != NULL && *args != '\0')
        {
          /* Parse start address (optional).  */
This page took 0.024064 seconds and 4 git commands to generate.