/* 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.
CORE_ADDR hi;
ULONGEST count;
const char *filename;
- void *buf;
+ gdb_byte *buf;
const char *lo_exp;
const char *hi_exp;
/* 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);
}
/* 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). */