return ERROR_OK;
}
}
- *got_data=FD_ISSET(connection->fd, &read_fds)!=0;
+ *got_data=FD_ISSET(connection->fd, &read_fds) != 0;
return ERROR_OK;
}
#ifdef _WIN32
errno = WSAGetLastError();
- switch(errno)
+ switch (errno)
{
case WSAEWOULDBLOCK:
usleep(1000);
exit(-1);
}
#else
- switch(errno)
+ switch (errno)
{
case EAGAIN:
usleep(1000);
int gotdata;
for (;;)
{
- if ((retval=check_pending(connection, 0, &gotdata))!=ERROR_OK)
+ if ((retval=check_pending(connection, 0, &gotdata)) != ERROR_OK)
return retval;
if (!gotdata)
break;
*/
if (gdb_con->noack_mode)
{
- if ((retval=fetch_packet(connection, &checksum_ok, 1, len, buffer))!=ERROR_OK)
+ if ((retval=fetch_packet(connection, &checksum_ok, 1, len, buffer)) != ERROR_OK)
return retval;
} else
{
- if ((retval=fetch_packet(connection, &checksum_ok, 0, len, buffer))!=ERROR_OK)
+ if ((retval=fetch_packet(connection, &checksum_ok, 0, len, buffer)) != ERROR_OK)
return retval;
}
}
int i;
- for (i = 0; i < str_len; i+=2)
+ for (i = 0; i < str_len; i += 2)
{
uint8_t t = hextoint(tstr[i])<<4;
t |= hextoint(tstr[i+1]);
retval = target_read_buffer(target, addr, len, buffer);
- if ((retval!=ERROR_OK)&&!gdb_report_data_abort)
+ if ((retval != ERROR_OK)&&!gdb_report_data_abort)
{
/* TODO : Here we have to lie and send back all zero's lest stack traces won't work.
* At some point this might be fixed in GDB, in which case this code can be removed.
p->base, p->size, blocksize);
ram_start=p->base+p->size;
}
- if (ram_start!=0)
+ if (ram_start != 0)
{
xml_printf(&retval, &xml, &pos, &size, "<memory type=\"ram\" start=\"0x%x\" length=\"0x%x\"/>\n",
ram_start, 0-ram_start);
int gdb_detach(connection_t *connection, target_t *target)
{
- switch( detach_mode )
+ switch ( detach_mode )
{
case GDB_DETACH_RESUME:
target_handle_event( target, TARGET_EVENT_OLD_pre_resume );
// binary packets spew junk into the debug log stream
char buf[ 50 ];
int x;
- for( x = 0 ; (x < 49) && (packet[x] != ':') ; x++ ){
+ for ( x = 0 ; (x < 49) && (packet[x] != ':') ; x++ ){
buf[x] = packet[x];
}
buf[x] = 0;
log_add_callback(gdb_log_callback, connection);
target_call_event_callbacks(target, TARGET_EVENT_GDB_START);
int retval=gdb_step_continue_packet(connection, target, packet, packet_size);
- if (retval!=ERROR_OK)
+ if (retval != ERROR_OK)
{
/* we'll never receive a halted condition... issue a false one.. */
gdb_frontend_halted(target, connection);