This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] minor fixes in remote.c
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] minor fixes in remote.c
- From: Philippe GIACINTI <Philippe dot Giacinti at sxb dot bsf dot alcatel dot fr>
- Date: Mon, 20 Mar 2000 07:18:43 +0100 (MET)
Hi,
Here is a patch including minor fixes in file gdb/remote.c:
* remote.c (record_currthread): must call `set_thread' to change
general thread, in order to let stub know we have changed it.
* remote.c (remote_read_bytes): when we need to read more memory
than max buffer size, we have to reserve space for leading $ and
trailing # + checksum (i.e.: 4 char)
Best regards.
--
Philippe Giacinti - Alcatel Business Systems - PCD/SMB/SWPCC - CC S0645
1, route du Dr Albert Schweitzer - 67408 Illkirch Cedex - FRANCE
Tel: +33 (0)3.90.67.62.10 - Fax: +33 (0)3.90.67.77.93
mailto:Philippe.Giacinti@sxb.bsf.alcatel.fr
--- insight-20000314.old/gdb/remote.c Fri Feb 18 18:00:18 2000
+++ insight-20000314/gdb/remote.c Fri Mar 17 09:00:54 2000
@@ -742,7 +742,7 @@
record_currthread (currthread)
int currthread;
{
- general_thread = currthread;
+ set_thread (currthread,1);
/* If this is a new thread, add it to GDB's thread list.
If we leave it up to WFI to do this, bad things will happen. */
@@ -3439,7 +3439,8 @@
int todo;
int i;
- todo = min (len, max_buf_size / 2); /* num bytes that will fit */
+ todo = min (len, max_buf_size / 2 - 4); /* num bytes that will fit */
+ /* -4 for leading $ and trailing # + checksum (2 hex chars) */
/* construct "m"<memaddr>","<len>" */
/* sprintf (buf, "m%lx,%x", (unsigned long) memaddr, todo); */
--- insight-20000314.old/gdb/ChangeLog Tue Mar 14 03:37:24 2000
+++ insight-20000314/gdb/ChangeLog Fri Mar 17 13:29:21 2000
@@ -1,3 +1,13 @@
+Fri Mar 17 2000 Philippe Giacinti <philippe@giacinti.com>
+
+ Minor fixes in `remote.c'
+
+ * remote.c (record_currthread): must call `set_thread' to change
+ general thread, in order to let stub know we have changed it.
+ * remote.c (remote_read_bytes): when we need to read more memory
+ than max buffer size, we have to reserve space for leading $ and
+ trailing # + checksum (i.e.: 4 char)
+
Mon Mar 13 21:21:41 2000 Andrew Cagney <cagney@b1.cygnus.com>
* defs.h (STREQ, STRCMP, STREQN): Document that these macros are