aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 83fe708..d253623 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -27,6 +27,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "inferior.h"
#include "bfd.h"
#include "symfile.h"
+#include "objfiles.h"
extern int errno;
@@ -169,6 +170,7 @@ nomemory (memaddr, myaddr, len, write)
int len;
int write;
{
+ errno = EIO; /* Can't read/write this location */
return 0; /* No bytes handled */
}
@@ -520,7 +522,7 @@ target_xfer_memory (memaddr, myaddr, len, write)
/* If this address is for nonexistent memory,
read zeros if reading, or do nothing if writing. Return error. */
if (!write)
- bzero (myaddr, len);
+ (void) memset (myaddr, 0, len);
if (errno == 0)
return EIO;
else