This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OB PATCH] Fix incorrect vFile: prefix lengths


Hi all,

This commit fixes some obvious errors in gdbserver/hostio.c.

Cheers,
Gary

--
gdb/gdbserver/ChangeLog:

	* hostio.c (handle_vFile): Fix prefix lengths.
---
 gdb/gdbserver/ChangeLog |    4 ++++
 gdb/gdbserver/hostio.c  |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c
index c9ad8f4..e6b7754 100644
--- a/gdb/gdbserver/hostio.c
+++ b/gdb/gdbserver/hostio.c
@@ -513,9 +513,9 @@ handle_vFile (char *own_buf, int packet_len, int *new_packet_len)
 {
   if (strncmp (own_buf, "vFile:open:", 11) == 0)
     handle_open (own_buf);
-  else if (strncmp (own_buf, "vFile:pread:", 11) == 0)
+  else if (strncmp (own_buf, "vFile:pread:", 12) == 0)
     handle_pread (own_buf, new_packet_len);
-  else if (strncmp (own_buf, "vFile:pwrite:", 12) == 0)
+  else if (strncmp (own_buf, "vFile:pwrite:", 13) == 0)
     handle_pwrite (own_buf, packet_len);
   else if (strncmp (own_buf, "vFile:close:", 12) == 0)
     handle_close (own_buf);
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]