char *write_ptid (char *buf, const char *endbuf, ptid_t ptid);
- int remote_unpack_thread_info_response (char *pkt, threadref *expectedref,
+ int remote_unpack_thread_info_response (const char *pkt, threadref *expectedref,
gdb_ext_thread_info *info);
int remote_get_threadinfo (threadref *threadid, int fieldset,
gdb_ext_thread_info *info);
- int parse_threadlist_response (char *pkt, int result_limit,
+ int parse_threadlist_response (const char *pkt, int result_limit,
threadref *original_echo,
threadref *resultlist,
int *doneflag);
static void print_packet (const char *);
-static int stub_unpack_int (char *buff, int fieldlength);
+static int stub_unpack_int (const char *buff, int fieldlength);
struct packet_config;
#define BUF_THREAD_ID_SIZE (OPAQUETHREADBYTES * 2)
-static char *unpack_nibble (char *buf, int *val);
+static const char *unpack_nibble (const char *buf, int *val);
-static char *unpack_byte (char *buf, int *value);
+static const char *unpack_byte (const char *buf, int *value);
static char *pack_int (char *buf, int value);
-static char *unpack_int (char *buf, int *value);
+static const char *unpack_int (const char *buf, int *value);
-static char *unpack_string (char *src, char *dest, int length);
+static const char *unpack_string (const char *src, char *dest, int length);
static char *pack_threadid (char *pkt, threadref *id);
-static char *unpack_threadid (char *inbuf, threadref *id);
+static const char *unpack_threadid (const char *inbuf, threadref *id);
void int_to_threadref (threadref *id, int value);
}
static int
-stub_unpack_int (char *buff, int fieldlength)
+stub_unpack_int (const char *buff, int fieldlength)
{
int nibble;
int retval = 0;
return retval;
}
-static char *
-unpack_nibble (char *buf, int *val)
+static const char *
+unpack_nibble (const char *buf, int *val)
{
*val = fromhex (*buf++);
return buf;
}
-static char *
-unpack_byte (char *buf, int *value)
+static const char *
+unpack_byte (const char *buf, int *value)
{
*value = stub_unpack_int (buf, 2);
return buf + 2;
return buf;
}
-static char *
-unpack_int (char *buf, int *value)
+static const char *
+unpack_int (const char *buf, int *value)
{
*value = stub_unpack_int (buf, 8);
return buf + 8;
}
#endif /* 0 (unused) */
-static char *
-unpack_string (char *src, char *dest, int length)
+static const char *
+unpack_string (const char *src, char *dest, int length)
{
while (length--)
*dest++ = *src++;
}
-static char *
-unpack_threadid (char *inbuf, threadref *id)
+static const char *
+unpack_threadid (const char *inbuf, threadref *id)
{
char *altref;
- char *limit = inbuf + BUF_THREAD_ID_SIZE;
+ const char *limit = inbuf + BUF_THREAD_ID_SIZE;
int x, y;
altref = (char *) id;
the process. */
int
-remote_target::remote_unpack_thread_info_response (char *pkt,
+remote_target::remote_unpack_thread_info_response (const char *pkt,
threadref *expectedref,
gdb_ext_thread_info *info)
{
int mask, length;
int tag;
threadref ref;
- char *limit = pkt + rs->buf.size (); /* Plausible parsing limit. */
+ const char *limit = pkt + rs->buf.size (); /* Plausible parsing limit. */
int retval = 1;
/* info->threadid = 0; FIXME: implement zero_threadref. */
/* Encoding: 'q':8,'M':8,count:16,done:8,argthreadid:64,(threadid:64)* */
int
-remote_target::parse_threadlist_response (char *pkt, int result_limit,
+remote_target::parse_threadlist_response (const char *pkt, int result_limit,
threadref *original_echo,
threadref *resultlist,
int *doneflag)
{
struct remote_state *rs = get_remote_state ();
- char *limit;
int count, resultcount, done;
resultcount = 0;
/* Assume the 'q' and 'M chars have been stripped. */
- limit = pkt + (rs->buf.size () - BUF_THREAD_ID_SIZE);
+ const char *limit = pkt + (rs->buf.size () - BUF_THREAD_ID_SIZE);
/* done parse past here */
pkt = unpack_byte (pkt, &count); /* count field */
pkt = unpack_nibble (pkt, &done);