More sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-09 23:46:54 -04:00
parent 0d1d069af4
commit ee695e71f9
218 changed files with 6282 additions and 3845 deletions

View File

@@ -120,13 +120,20 @@ typedef struct _gdbstub_client_ {
int socket;
struct sockaddr_in addr;
char packet[16384], response[16384];
int has_packet : 1, first_packet_received : 1, ida_mode : 1, waiting_stop : 1,
packet_pos, response_pos;
char packet[16384], response[16384];
uint8_t has_packet : 1;
uint8_t first_packet_received : 1;
uint8_t ida_mode : 1;
uint8_t waiting_stop : 1;
int packet_pos;
int response_pos;
event_t *processed_event, *response_event;
event_t *processed_event;
event_t *response_event;
uint16_t last_io_base, last_io_len, last_io_value;
uint16_t last_io_base;
uint16_t last_io_len;
uint16_t last_io_value;
struct _gdbstub_client_ *next;
} gdbstub_client_t;
@@ -339,7 +346,8 @@ static gdbstub_breakpoint_t *first_rwatch = NULL;
static gdbstub_breakpoint_t *first_wwatch = NULL;
static gdbstub_breakpoint_t *first_awatch = NULL;
int gdbstub_step = 0, gdbstub_next_asap = 0;
int gdbstub_step = 0;
int gdbstub_next_asap = 0;
uint64_t gdbstub_watch_pages[(((uint32_t) -1) >> (MEM_GRANULARITY_BITS + 6)) + 1];
static void
@@ -461,6 +469,9 @@ gdbstub_num_decode(char *p, int *dest, int mode)
else
return 0;
break;
default:
break;
}
p++;
}
@@ -1491,7 +1502,6 @@ gdbstub_client_thread(void *priv)
gdbstub_client_t *client = (gdbstub_client_t *) priv;
uint8_t buf[256];
ssize_t bytes_read;
int i;
gdbstub_log("GDB Stub: New connection from %s:%d\n", inet_ntoa(client->addr.sin_addr), client->addr.sin_port);
@@ -1500,7 +1510,7 @@ gdbstub_client_thread(void *priv)
/* Read data from client. */
while ((bytes_read = recv(client->socket, (char *) buf, sizeof(buf), 0)) > 0) {
for (i = 0; i < bytes_read; i++) {
for (ssize_t i = 0; i < bytes_read; i++) {
switch (buf[i]) {
case '$': /* packet start */
/* Wait for any existing packets to be processed. */