From a58478a401d11da1fd47b651af4d98c9daaa6734 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Mon, 23 Jan 2017 09:26:32 -0600 Subject: [PATCH] superficial changes to test CI --- src/debug.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/debug.c b/src/debug.c index 1824cd1..ab41edf 100644 --- a/src/debug.c +++ b/src/debug.c @@ -380,9 +380,7 @@ void api_push_disassembly() { //disassemble chain from now -> to -> future int disassemble_next = 10; // how many instructions int kpc = engine.kpc; // get starting address - printf("KPC: %06X", kpc); for (int i = 0; i 0) { // g_dbg_enable_port should be enabled by @@ -742,6 +739,7 @@ void debug_setup_socket() { exit(-1); } + /*************************************************************/ /* Allow socket descriptor to be reuseable */ /*************************************************************/ @@ -809,6 +807,7 @@ void debug_setup_socket() { timeout = (3 * 60 * 1000); } + // builds our big json array of commands eg "[{},{},{},...]" void api_write_socket() { const char *comma = ","; @@ -841,6 +840,7 @@ void api_write_socket() { free(message_string); // assuming it was all written :P } + void write_array_start() { const char *brack = "["; write(debugger_sd, brack, strlen(brack)); @@ -858,6 +858,7 @@ void write_array_next() { write(debugger_sd, com, strlen(com)); } + // // write(debugger_sd, buffer, strlen(buffer)); //also for base 64 http://stackoverflow.com/questions/342409/how-do-i-base64-encode-decode-in-c //http://stackoverflow.com/questions/32749925/sending-a-file-over-a-tcp-ip-socket-web-server @@ -886,6 +887,7 @@ int writeStrToClient(int sckt, const char *str) { return writeDataToClient(sckt, str, strlen(str)); } + // @todo: probably clean up- this was a hack to allow preloading commands void debug_wait_hello() { int hello_received = FALSE; @@ -904,6 +906,7 @@ void debug_wait_hello() { timeout = 0; // instantaneous } + void debug_server_poll() { if (end_server == FALSE) { /***********************************************************/ @@ -1023,7 +1026,7 @@ void debug_server_poll() { rc = recv(fds[i].fd, buffer, sizeof(buffer), 0); if (rc < 0) { if (errno != EWOULDBLOCK) { - perror(" recv() failed"); + perror("recv() failed"); close_conn = TRUE; } break;