aboutsummaryrefslogtreecommitdiff
path: root/src/server/gdb_server.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-02-28 08:11:18 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-02-28 08:11:18 +0000
commit0689e3dd6752f45f493eceb3edf040fbc7849846 (patch)
tree57c2d288e4ea01551e0ea7806957cd1f5a2165dc /src/server/gdb_server.c
parentb70e262867b724f7d265f0c6b206801a29ba284b (diff)
- Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This
provides a better impeadance match for debug output char fn's, e.g. eCos. - Line endings are now added at the caller site of command_print*(). command_print() still adds a line ending - echo of commands in scripts are now available via debug_level instead of forced echo - Added a USER_SAMELINE() for printing without a lineend. git-svn-id: svn://svn.berlios.de/openocd/trunk@364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server/gdb_server.c')
-rw-r--r--src/server/gdb_server.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 335a4cd2..6c9936ee 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -511,16 +511,14 @@ int gdb_output_con(connection_t *connection, char* line)
bin_size = strlen(line);
- hex_buffer = malloc(bin_size*2 + 4);
+ hex_buffer = malloc(bin_size*2 + 2);
hex_buffer[0] = 'O';
for (i=0; i<bin_size; i++)
snprintf(hex_buffer + 1 + i*2, 3, "%2.2x", line[i]);
- hex_buffer[bin_size*2+1] = '0';
- hex_buffer[bin_size*2+2] = 'a';
- hex_buffer[bin_size*2+3] = 0x0;
+ hex_buffer[bin_size*2+1] = 0;
- gdb_put_packet(connection, hex_buffer, bin_size*2 + 3);
+ gdb_put_packet(connection, hex_buffer, bin_size*2 + 1);
free(hex_buffer);
return ERROR_OK;
@@ -529,7 +527,7 @@ int gdb_output_con(connection_t *connection, char* line)
int gdb_output(struct command_context_s *context, char* line)
{
/* this will be dumped to the log and also sent as an O packet if possible */
- USER(line);
+ USER_SAMELINE(line);
return ERROR_OK;
}
@@ -605,7 +603,8 @@ int gdb_target_callback_event_handler(struct target_s *target, enum target_event
return ERROR_OK;
}
-
+
+
int gdb_new_connection(connection_t *connection)
{
gdb_connection_t *gdb_connection = malloc(sizeof(gdb_connection_t));