)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2026-04-20 15:26:07 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[src/server] Support x packet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implement the binary memory read GDB packet \u0027x addr,length\u0027."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d1ec8993_0c993ea6","line":7,"updated":"2026-04-21 10:35:26.000000000","message":"server: gdb: add support for \u0027x\u0027 packet","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"}],"src/server/gdb_server.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":1532,"context_line":"\treturn ERROR_OK;"},{"line_number":1533,"context_line":"}"},{"line_number":1534,"context_line":""},{"line_number":1535,"context_line":"static bool parse_packet_addr_len(char const *packet, uint64_t *addr, uint32_t *len)"},{"line_number":1536,"context_line":"{"},{"line_number":1537,"context_line":"\tchar *separator;"},{"line_number":1538,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"9208f1d0_dfb7bd4d","line":1535,"updated":"2026-04-21 10:35:26.000000000","message":"We usually return ERROR_OK/ERROR_FAIL.\nI see two boolean functions in this file, `gdb_handle_vcont_packet()` and `gdb_handle_vrun_packet()`. For me those should be converted to ERROR_OK/ERROR_FAIL too.\nFor this patch, I prefer sticking to ERROR_OK/ERROR_FAIL return value.","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":1545,"context_line":"\t\treturn false;"},{"line_number":1546,"context_line":""},{"line_number":1547,"context_line":"\terrno \u003d 0;"},{"line_number":1548,"context_line":"\tlong signed_len \u003d strtol(separator + 1, NULL, 16);"},{"line_number":1549,"context_line":"\tif (errno \u003d\u003d ERANGE || signed_len \u003c 0 || (unsigned long)signed_len \u003e UINT32_MAX)"},{"line_number":1550,"context_line":"\t\treturn false;"},{"line_number":1551,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"0a92e37a_c225b13d","line":1548,"updated":"2026-04-21 10:35:26.000000000","message":"You change from `strtoul()` to `strtol()`, and then you check if we got a negative `len`.\nBy returning `false` for negative or too-big, it changes the behavior of the code because now the caller returns ERROR_SERVER_REMOTE_CLOSED.\nAll without explaining in the commit message why you change this.","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":1613,"context_line":"\tif (!buffer) {"},{"line_number":1614,"context_line":"\t\tLOG_ERROR(\"Unable to allocate memory\");"},{"line_number":1615,"context_line":"\t\tgdb_send_error(connection, 01);"},{"line_number":1616,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1617,"context_line":"\t}"},{"line_number":1618,"context_line":""},{"line_number":1619,"context_line":"\tretval \u003d gdb_read_memory(connection, buffer, addr, len);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"416851a1_4adc8fc0","line":1616,"updated":"2026-04-21 10:35:26.000000000","message":"This file doesn\u0027t enforce check on `malloc()`, bad!\nSo thanks for taking care here and below.\nBut why returning `ERROR_OK`?","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":1695,"context_line":"\t/* len * 2 : each byte may need escaping → 2 bytes max per input byte"},{"line_number":1696,"context_line":"\t* +1 : for \u0027b\u0027 prefix"},{"line_number":1697,"context_line":"\t* +1 : for null terminator */"},{"line_number":1698,"context_line":"\tout_buffer \u003d malloc(len * 2 + 1 + 1);"},{"line_number":1699,"context_line":"\tif (!out_buffer) {"},{"line_number":1700,"context_line":"\t\tLOG_ERROR(\"Unable to allocate memory for output buffer\");"},{"line_number":1701,"context_line":"\t\tgdb_send_error(connection, 01);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"05aacfaf_97ba1390","line":1698,"updated":"2026-04-21 10:35:26.000000000","message":"You can use add here\n`char *out_buffer \u003d malloc(len * 2 + 1 + 1);`\nwithout initializing it to NULL above, then below...","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":1710,"context_line":"\t\tretval \u003d gdb_put_packet(connection, out_buffer, pkt_len);"},{"line_number":1711,"context_line":"\t}"},{"line_number":1712,"context_line":""},{"line_number":1713,"context_line":"cleanup:"},{"line_number":1714,"context_line":"\tfree(out_buffer);"},{"line_number":1715,"context_line":"\tfree(buffer);"},{"line_number":1716,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"67f2e190_aaf0afd9","line":1713,"updated":"2026-04-21 10:35:26.000000000","message":"here the sequence should be:\n```\n    free(out_buffer);\ncleanup:\n    free(buffer);\n    \n    return retval;\n}\n```","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3c2efadb76648356e8e12b7d7ec10efb23d010ac","unresolved":true,"context_lines":[{"line_number":3052,"context_line":"\t\t\t\u0026buffer,"},{"line_number":3053,"context_line":"\t\t\t\u0026pos,"},{"line_number":3054,"context_line":"\t\t\t\u0026size,"},{"line_number":3055,"context_line":"\t\t\t\"PacketSize\u003d%x;qXfer:memory-map:read%c;qXfer:features:read%c;qXfer:threads:read+;QStartNoAckMode+;vContSupported+;binary-upload+\","},{"line_number":3056,"context_line":"\t\t\tGDB_BUFFER_SIZE,"},{"line_number":3057,"context_line":"\t\t\t(gdb_use_memory_map \u0026\u0026 (flash_get_bank_count() \u003e 0)) ? \u0027+\u0027 : \u0027-\u0027,"},{"line_number":3058,"context_line":"\t\t\tgdb_target_desc_supported ? \u0027+\u0027 : \u0027-\u0027);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"af8d36e4_21218570","line":3055,"updated":"2026-04-21 10:35:26.000000000","message":"This string is growing too much and will grow further.\nCheckpatch does not complains for strings split at `;`.\nIf you don\u0027t mind, please rewrite this string with one item per line, sorted:\n```\n    \u0026size,\n    \"PacketSize\u003d%x;\"\n    \"QStartNoAckMode+;\"\n    \"binary-upload+;\"\n    \"qXfer:features:read%c;\"\n    \"qXfer:memory-map:read%c;\"\n    \"qXfer:threads:read+;\"\n    \"vContSupported+\"\n    GDB_BUFFER_SIZE,\n```","commit_id":"af54e452c3118c01b8d369833f4e957ba1089a57"}]}
