else if (reply == '-')\r
{\r
/* Stop sending output packets for now */\r
- log_setCallback(NULL, NULL);\r
+ log_remove_callback(gdb_log_callback, connection);\r
WARNING("negative reply, retrying");\r
}\r
else if (reply == 0x3)\r
else if (reply == '-')\r
{\r
/* Stop sending output packets for now */\r
- log_setCallback(NULL, NULL);\r
+ log_remove_callback(gdb_log_callback, connection);\r
WARNING("negative reply, retrying");\r
}\r
else\r
if (gdb_connection->frontend_state == TARGET_RUNNING)\r
{\r
/* stop forwarding log packets! */\r
- log_setCallback(NULL, NULL);\r
+ log_remove_callback(gdb_log_callback, connection);\r
\r
if (gdb_connection->ctrl_c)\r
{\r
}\r
\r
target_unregister_event_callback(gdb_target_callback_event_handler, connection);\r
- log_setCallback(NULL, NULL);\r
+ log_remove_callback(gdb_log_callback, connection);\r
\r
return ERROR_OK;\r
}\r
cmd[(packet_size - 6)/2] = 0x0;\r
\r
/* We want to print all debug output to GDB connection */\r
- log_setCallback(gdb_log_callback, connection);\r
+ log_add_callback(gdb_log_callback, connection);\r
target_call_timer_callbacks();\r
command_run_line(cmd_ctx, cmd);\r
free(cmd);\r
return;\r
}\r
\r
- char *t = allocPrintf(format, args);\r
+ char *t = alloc_printf(format, args);\r
if (t == NULL)\r
return;\r
\r
* forward log output until the target is halted */\r
gdb_connection_t *gdb_con = connection->priv;\r
gdb_con->frontend_state = TARGET_RUNNING;\r
- log_setCallback(gdb_log_callback, connection);\r
+ log_add_callback(gdb_log_callback, connection);\r
gdb_step_continue_packet(connection, target, packet, packet_size);\r
}\r
break;\r