)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"60e98a8c34a24c194ddb60aeb605aad99bd71116","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3b5f8b71_5c0dd9ac","updated":"2023-09-14 06:36:31.000000000","message":"I very much like this improvement.\n\nThere are few items that I believe should be resolved prior to merge.","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6af3dc3f4429b1e3dc45d16f20a765a253edf504","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"46b409f5_c7dbc541","updated":"2023-10-08 19:47:34.000000000","message":"Nevertheless, there are 130+ LOG_* in  this file, while this patch changes only 8 of them. What\u0027s your plan?","commit_id":"8a505026804088d2312084745fcd84d4a3f4077b"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"5ed1c05f8699a37bbef370747caac0745d014f0f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9cfec703_7e60a3c0","updated":"2023-10-09 19:55:45.000000000","message":"Right. I was debugging a case with multiple gdb connections, and it was a bit tricky to separate out which gdb was requesting what. This is a simple change that made my life easier.\n\nI have no plan beyond sharing this small improvement with everyone, so future developers will have that information available also.","commit_id":"8a505026804088d2312084745fcd84d4a3f4077b"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"eb376cc8fc64d83996de3a9caf5208b1305683bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9bb948f7_76688d72","updated":"2023-10-05 18:16:37.000000000","message":"This looks all right to me. Thank you.","commit_id":"8a505026804088d2312084745fcd84d4a3f4077b"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a2d66ae0b65c1a367981693ebedf6142725a09b9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5c391728_5078e020","updated":"2023-10-08 19:42:42.000000000","message":"Usually having the target name is enough.\nBut OpenOCD can be configured for accepting multiple connections on the same GDB port (thus on the same target), so it looks relevant to discriminate among them.\nIs this the use case you have in mind?","commit_id":"8a505026804088d2312084745fcd84d4a3f4077b"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"4078591254dc701393044031a8a1ec6bfa311f39","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"248b9341_f7d0ee40","in_reply_to":"46b409f5_c7dbc541","updated":"2023-10-09 05:23:20.000000000","message":"I assume that Tim wanted to address the LOG_* prints that contain the actual sent and received GDB remote messages and connect+disconnect of gdb (am I right?). \n\nFrom that point of view, I believe this change is complete (I haven\u0027t found anything obvious that would be missing).","commit_id":"8a505026804088d2312084745fcd84d4a3f4077b"}],"src/server/gdb_server.c":[{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"60e98a8c34a24c194ddb60aeb605aad99bd71116","unresolved":true,"context_lines":[{"line_number":96,"context_line":"\t/* flag to mask the output from gdb_log_callback() */"},{"line_number":97,"context_line":"\tenum gdb_output_flag output_flag;"},{"line_number":98,"context_line":"\t/* Unique index for this GDB connection. */"},{"line_number":99,"context_line":"\tunsigned int index;"},{"line_number":100,"context_line":"};"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"#if 0"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"69981e86_64141a71","line":99,"updated":"2023-09-14 06:36:31.000000000","message":"I\u0027d recommend a more descriptive name, e.g. unique_id","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"dec2107fb4a6c9f74fc4b9d8bfb2f9da4bdf17a4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"\t/* flag to mask the output from gdb_log_callback() */"},{"line_number":97,"context_line":"\tenum gdb_output_flag output_flag;"},{"line_number":98,"context_line":"\t/* Unique index for this GDB connection. */"},{"line_number":99,"context_line":"\tunsigned int index;"},{"line_number":100,"context_line":"};"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"#if 0"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"794ae8d7_a644a3ba","line":99,"in_reply_to":"69981e86_64141a71","updated":"2023-09-25 16:32:29.000000000","message":"Done","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"60e98a8c34a24c194ddb60aeb605aad99bd71116","unresolved":true,"context_lines":[{"line_number":997,"context_line":"\tgdb_connection-\u003etarget_desc.tdesc_length \u003d 0;"},{"line_number":998,"context_line":"\tgdb_connection-\u003ethread_list \u003d NULL;"},{"line_number":999,"context_line":"\tgdb_connection-\u003eoutput_flag \u003d GDB_OUTPUT_NO;"},{"line_number":1000,"context_line":"\tgdb_connection-\u003eindex \u003d gdb_actual_connections + 1;"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"\t/* send ACK to GDB for debug request */"},{"line_number":1003,"context_line":"\tgdb_write(connection, \"+\", 1);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"58d22343_4aa785c0","line":1000,"updated":"2023-09-14 06:36:31.000000000","message":"Please, make sure that if a GDB disconnects and another one connects, the unique_id will be different (that is, the GDB IDs should not be recycled).\n\nYou can create another counter of the GDB connections, something like:\n\n```\n// global counter\nunsigned int next_gdb_connection_id \u003d 0;  // only incremented, never decremented\n\n\n// in gdb_new_connection():\ngdb_connection-\u003eunique_id \u003d next_gdb_connection_id;\nnext_gdb_connection_id++;\n\n```","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"dec2107fb4a6c9f74fc4b9d8bfb2f9da4bdf17a4","unresolved":false,"context_lines":[{"line_number":997,"context_line":"\tgdb_connection-\u003etarget_desc.tdesc_length \u003d 0;"},{"line_number":998,"context_line":"\tgdb_connection-\u003ethread_list \u003d NULL;"},{"line_number":999,"context_line":"\tgdb_connection-\u003eoutput_flag \u003d GDB_OUTPUT_NO;"},{"line_number":1000,"context_line":"\tgdb_connection-\u003eindex \u003d gdb_actual_connections + 1;"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"\t/* send ACK to GDB for debug request */"},{"line_number":1003,"context_line":"\tgdb_write(connection, \"+\", 1);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"13293809_22d4070d","line":1000,"in_reply_to":"58d22343_4aa785c0","updated":"2023-09-25 16:32:29.000000000","message":"Done","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"60e98a8c34a24c194ddb60aeb605aad99bd71116","unresolved":true,"context_lines":[{"line_number":1099,"context_line":"\tlog_remove_callback(gdb_log_callback, connection);"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"\tgdb_actual_connections--;"},{"line_number":1102,"context_line":"\tLOG_DEBUG(\"GDB Close, Target: %s, state: %s, gdb_actual_connections\u003d%d\","},{"line_number":1103,"context_line":"\t\ttarget_name(target),"},{"line_number":1104,"context_line":"\t\ttarget_state_name(target),"},{"line_number":1105,"context_line":"\t\tgdb_actual_connections);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"8bb9aa46_c5839b1d","line":1102,"updated":"2023-09-14 06:36:31.000000000","message":"Please, print the connection\u0027s unique_id also in this log message.","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"dec2107fb4a6c9f74fc4b9d8bfb2f9da4bdf17a4","unresolved":false,"context_lines":[{"line_number":1099,"context_line":"\tlog_remove_callback(gdb_log_callback, connection);"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"\tgdb_actual_connections--;"},{"line_number":1102,"context_line":"\tLOG_DEBUG(\"GDB Close, Target: %s, state: %s, gdb_actual_connections\u003d%d\","},{"line_number":1103,"context_line":"\t\ttarget_name(target),"},{"line_number":1104,"context_line":"\t\ttarget_state_name(target),"},{"line_number":1105,"context_line":"\t\tgdb_actual_connections);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"7420f6fd_f21ac40a","line":1102,"in_reply_to":"8bb9aa46_c5839b1d","updated":"2023-09-25 16:32:29.000000000","message":"Done","commit_id":"eea624773f0313f4502b92dce238b1ce24489da2"}]}
