* Find the first non-printable character in the char buffer, return a pointer to it.
* If no such character exists, return NULL.
*/
-char *find_nonprint_char(char *buf, unsigned int buf_len)
+const char *find_nonprint_char(const char *buf, unsigned int buf_len)
{
for (unsigned int i = 0; i < buf_len; i++) {
if (!isprint(buf[i]))
char *alloc_printf(const char *fmt, ...)
__attribute__ ((format (PRINTF_ATTRIBUTE_FORMAT, 1, 2)));
-char *find_nonprint_char(char *buf, unsigned int buf_len);
+const char *find_nonprint_char(const char *buf, unsigned int buf_len);
extern int debug_level;
/* The only way we can detect that the socket is closed is the first time
* we write to it, we will fail. Subsequent write operations will
* succeed. Shudder! */
-static int gdb_write(struct connection *connection, void *data, int len)
+static int gdb_write(struct connection *connection, const void *data, int len)
{
struct gdb_connection *gdb_con = connection->priv;
if (gdb_con->closed) {
return ERROR_SERVER_REMOTE_CLOSED;
}
-static void gdb_log_incoming_packet(struct connection *connection, char *packet)
+static void gdb_log_incoming_packet(struct connection *connection, const char *packet)
{
if (!LOG_LEVEL_IS(LOG_LVL_DEBUG))
return;
}
}
-static void gdb_log_outgoing_packet(struct connection *connection, char *packet_buf,
+static void gdb_log_outgoing_packet(struct connection *connection, const char *packet_buf,
unsigned int packet_len, unsigned char checksum)
{
if (!LOG_LEVEL_IS(LOG_LVL_DEBUG))
}
static int gdb_put_packet_inner(struct connection *connection,
- char *buffer, int len)
+ const char *buffer, int len)
{
int i;
unsigned char my_checksum = 0;
return ERROR_OK;
}
-int gdb_put_packet(struct connection *connection, char *buffer, int len)
+int gdb_put_packet(struct connection *connection, const char *buffer, int len)
{
struct gdb_connection *gdb_con = connection->priv;
gdb_con->busy = true;
int gdb_register_commands(struct command_context *command_context);
void gdb_service_free(void);
-int gdb_put_packet(struct connection *connection, char *buffer, int len);
+int gdb_put_packet(struct connection *connection, const char *buffer, int len);
int gdb_get_actual_connections(void);