/* Native debugging support for Intel x86 running DJGPP.
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
Written by Robert Hoehne.
This file is part of GDB.
else
res = read_child (memaddr, readbuf, len);
- if (res <= 0)
+ /* read_child and write_child return zero on success, non-zero on
+ failure. */
+ if (res != 0)
return TARGET_XFER_E_IO;
- *xfered_len = res;
+ *xfered_len = len;
return TARGET_XFER_OK;
}
if (cmdlen > 1024*1024)
error (_("Command line too long."));
- cmdline = xmalloc (cmdlen + 4);
+ cmdline = (char *) xmalloc (cmdlen + 4);
strcpy (cmdline + 1, args);
/* If the command-line length fits into DOS 126-char limits, use the
DOS command tail format; otherwise, tell v2loadimage to pass it
xfree (cmdline);
if (result != 0)
- error (_("Load failed for image %s", exec_file);
+ error (_("Load failed for image %s"), exec_file);
edi_init (start_state);
#if __DJGPP_MINOR__ < 3