~ chicken-core (chicken-5) a26f82fe7d7e705deb3228c69a2ab216c52d7c5f


commit a26f82fe7d7e705deb3228c69a2ab216c52d7c5f
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Fri Mar 4 14:03:14 2016 +1300
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Tue Mar 8 19:36:23 2016 +0100

    Send C_DEBUGGER_REPLY_GET_BYTES responses as unsigned char values
    
    This allows the client to consider the stream as a written u8vector,
    without needing to mask off the extra bits of any elements outside the
    byte range.
    
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/dbg-stub.c b/dbg-stub.c
index 8c479127..ad1fd97b 100644
--- a/dbg-stub.c
+++ b/dbg-stub.c
@@ -381,7 +381,7 @@ send_event(int event, C_char *loc, C_char *val, C_char *cloc, int cln)
         send_string(rw_buffer);
 
         for(n = 0; n < reply; ++n) {
-          sprintf(rw_buffer, " %lu", (unsigned long)((char *)C_data_pointer(x))[ n ]);
+          sprintf(rw_buffer, " %u", ((unsigned char *)C_data_pointer(x))[ n ]);
           send_string(rw_buffer);
         }
 
Trap