summaryrefslogtreecommitdiff
path: root/src/base/remote_gdb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/remote_gdb.cc')
-rw-r--r--src/base/remote_gdb.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index fe4bdad5a..93d86447e 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -346,14 +346,16 @@ uint8_t
BaseRemoteGDB::getbyte()
{
uint8_t b;
- ::read(fd, &b, 1);
+ if (::read(fd, &b, 1) != 1)
+ warn("could not read byte from debugger");
return b;
}
void
BaseRemoteGDB::putbyte(uint8_t b)
{
- ::write(fd, &b, 1);
+ if (::write(fd, &b, 1) != 1)
+ warn("could not write byte to debugger");
}
// Send a packet to gdb