)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"3edc9f40b5568252d9f0abef384830fff6f19d96","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0f6f8d8e_c4366a50","updated":"2026-09-18 09:28:10.000000000","message":"**Summary**: `gdb_generate_reg_type_description()` does not propagate `xml_escape_string()` allocation failures, so an out-of-memory condition while escaping a type can yield successful handling of incomplete target-description XML. This was a static review; Valgrind was not run.\n\n**Suggested vote**: -1\n\n*This review was performed by an AI agent.*","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"fbfb5134d19bd831942a3e32b5dc3a947983a963","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c185c570_196e51d5","updated":"2026-09-18 05:52:45.000000000","message":"Looks good. Did you checked with valgrind?","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1002247,"name":"Daniel Lizewski","display_name":"Daniel Lizewski","email":"daniellizewski@geotab.com","username":"dlizewski"},"change_message_id":"418bec6905871914f316a74560582afd9e8c1224","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3281c511_91dc1328","in_reply_to":"c185c570_196e51d5","updated":"2026-09-18 13:53:31.000000000","message":"Yes. Here is the valgrind with full leakcheck. There was one flagged possible leak, but it is unrelated to this MR.\n```\n^Cshutdown command invoked\n\u003d\u003d1996767\u003d\u003d \n\u003d\u003d1996767\u003d\u003d Process terminating with default action of signal 2 (SIGINT)\n\u003d\u003d1996767\u003d\u003d    at 0x4A599BC: __pthread_kill_implementation (pthread_kill.c:44)\n\u003d\u003d1996767\u003d\u003d    by 0x4A599BC: __pthread_kill_internal (pthread_kill.c:78)\n\u003d\u003d1996767\u003d\u003d    by 0x4A599BC: pthread_kill@@GLIBC_2.34 (pthread_kill.c:89)\n\u003d\u003d1996767\u003d\u003d    by 0x4A05475: raise (raise.c:26)\n\u003d\u003d1996767\u003d\u003d    by 0x20D124: exit_on_signal (server.c:764)\n\u003d\u003d1996767\u003d\u003d    by 0x49ECD8F: (below main) (libc_start_call_main.h:58)\n\u003d\u003d1996767\u003d\u003d \n\u003d\u003d1996767\u003d\u003d HEAP SUMMARY:\n\u003d\u003d1996767\u003d\u003d     in use at exit: 304 bytes in 1 blocks\n\u003d\u003d1996767\u003d\u003d   total heap usage: 74,067 allocs, 74,066 frees, 18,458,931 bytes allocated\n\u003d\u003d1996767\u003d\u003d \n\u003d\u003d1996767\u003d\u003d 304 bytes in 1 blocks are possibly lost in loss record 1 of 1\n\u003d\u003d1996767\u003d\u003d    at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)\n\u003d\u003d1996767\u003d\u003d    by 0x40147D9: calloc (rtld-malloc.h:44)\n\u003d\u003d1996767\u003d\u003d    by 0x40147D9: allocate_dtv (dl-tls.c:375)\n\u003d\u003d1996767\u003d\u003d    by 0x40147D9: _dl_allocate_tls (dl-tls.c:634)\n\u003d\u003d1996767\u003d\u003d    by 0x4A58774: allocate_stack (allocatestack.c:430)\n\u003d\u003d1996767\u003d\u003d    by 0x4A58774: pthread_create@@GLIBC_2.34 (pthread_create.c:647)\n\u003d\u003d1996767\u003d\u003d    by 0x487FBCA: ??? (in /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0)\n\u003d\u003d1996767\u003d\u003d    by 0x4880A04: libusb_init (in /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0)\n\u003d\u003d1996767\u003d\u003d    by 0x195B45: jtag_libusb_open (libusb_helper.c:159)\n\u003d\u003d1996767\u003d\u003d    by 0x1A2755: stlink_usb_usb_open (stlink_usb.c:3403)\n\u003d\u003d1996767\u003d\u003d    by 0x1A2755: stlink_usb_usb_open (stlink_usb.c:3382)\n\u003d\u003d1996767\u003d\u003d    by 0x1A89B8: stlink_usb_open (stlink_usb.c:300)\n\u003d\u003d1996767\u003d\u003d    by 0x1A89B8: stlink_open (stlink_usb.c:3749)\n\u003d\u003d1996767\u003d\u003d    by 0x1A9287: stlink_dap_init (stlink_usb.c:5100)\n\u003d\u003d1996767\u003d\u003d    by 0x172C78: adapter_init (adapter.c:159)\n\u003d\u003d1996767\u003d\u003d    by 0x16EC98: handle_init_command (openocd.c:127)\n\u003d\u003d1996767\u003d\u003d    by 0x16EC98: handle_init_command (openocd.c:108)\n\u003d\u003d1996767\u003d\u003d    by 0x215AEF: jim_exec_command (command.c:447)\n\u003d\u003d1996767\u003d\u003d    by 0x215AEF: jim_command_dispatch (command.c:883)\n\u003d\u003d1996767\u003d\u003d \n\u003d\u003d1996767\u003d\u003d LEAK SUMMARY:\n\u003d\u003d1996767\u003d\u003d    definitely lost: 0 bytes in 0 blocks\n\u003d\u003d1996767\u003d\u003d    indirectly lost: 0 bytes in 0 blocks\n\u003d\u003d1996767\u003d\u003d      possibly lost: 304 bytes in 1 blocks\n\u003d\u003d1996767\u003d\u003d    still reachable: 0 bytes in 0 blocks\n\u003d\u003d1996767\u003d\u003d         suppressed: 0 bytes in 0 blocks\n\u003d\u003d1996767\u003d\u003d \n\u003d\u003d1996767\u003d\u003d For lists of detected and suppressed errors, rerun with: -s\n\u003d\u003d1996767\u003d\u003d ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)\n```\n\nAnd here are GDB logs showing the problem is actually fixed (thread names with reserved or corrupt characters) and showing I exercised these functions during the valgrind leakcheck.\n\n```\n(gdb) info threads\n  Id   Target Id                                                      Frame \n  1    Thread 805328688 \"a\u0026b\" (Name: a\u0026b, pid:5, WAIT_SIG)            up_switch_context (tcb\u003d0x300057e8, \n    rtcb\u003drtcb@entry\u003d0x30005730) at common/arm_switchcontext.c:95\n* 2    Thread 603987892 \"Idle Task\" (Name: Idle Task, pid:0, RUNNING) up_idle () at stm32_idle.c:308\n  3    Thread 805307840 \"hpwork\" (Name: hpwork, pid:1, WAIT_SEM)      up_switch_context (tcb\u003d0x30001ad0, \n    rtcb\u003drtcb@entry\u003d0x300005c0) at common/arm_switchcontext.c:95\n  4    Thread 805313232 \"lpwork\" (Name: lpwork, pid:2, WAIT_SEM)      up_switch_context (tcb\u003d0x30007f48, \n    rtcb\u003drtcb@entry\u003d0x30001ad0) at common/arm_switchcontext.c:95\n  5    Thread 805329240 \"regular\" (Name: regular, pid:11, WAIT_SIG)   up_switch_context (\n    tcb\u003d0x24001fb4 \u003cg_idletcb\u003e, rtcb\u003drtcb@entry\u003d0x30005958) at common/arm_switchcontext.c:95\n  6    Thread 805338952 \"main\" (Name: main, pid:4, WAIT_SIG)          up_switch_context (tcb\u003d0x30005730, \n    rtcb\u003drtcb@entry\u003d0x30007f48) at common/arm_switchcontext.c:95\n  7    Thread 805328872 \"c\u003cd\" (Name: c\u003cd, pid:6, WAIT_SIG)            up_switch_context (tcb\u003d0x300058a0, \n    rtcb\u003drtcb@entry\u003d0x300057e8) at common/arm_switchcontext.c:95\n  8    Thread 805329056 \"abc?def\" (Name: abc?def, pid:7, WAIT_SIG)    up_switch_context (tcb\u003d0x30005958, \n    rtcb\u003drtcb@entry\u003d0x300058a0) at common/arm_switchcontext.c:95\n(gdb) maintenance print xml-tdesc\n\u003c?xml version\u003d\"1.0\"?\u003e\n\u003c!DOCTYPE target SYSTEM \"gdb-target.dtd\"\u003e\n\u003ctarget\u003e\n  \u003carchitecture\u003earm\u003c/architecture\u003e\n  \u003cfeature name\u003d\"org.gnu.gdb.arm.m-profile\"\u003e\n    \u003creg name\u003d\"r0\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"0\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r1\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"1\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r2\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"2\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r3\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"3\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r4\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"4\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r5\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"5\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r6\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"6\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r7\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"7\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r8\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"8\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r9\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"9\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r10\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"10\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r11\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"11\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"r12\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"12\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"sp\" bitsize\u003d\"32\" type\u003d\"data_ptr\" regnum\u003d\"13\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"lr\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"14\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"pc\" bitsize\u003d\"32\" type\u003d\"code_ptr\" regnum\u003d\"15\" group\u003d\"general\"/\u003e\n    \u003creg name\u003d\"xpsr\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"16\" group\u003d\"general\"/\u003e\n  \u003c/feature\u003e\n  \u003cfeature name\u003d\"org.gnu.gdb.arm.m-system\"\u003e\n    \u003creg name\u003d\"msp\" bitsize\u003d\"32\" type\u003d\"data_ptr\" regnum\u003d\"17\" group\u003d\"system\"/\u003e\n    \u003creg name\u003d\"psp\" bitsize\u003d\"32\" type\u003d\"data_ptr\" regnum\u003d\"18\" group\u003d\"system\"/\u003e\n    \u003creg name\u003d\"primask\" bitsize\u003d\"1\" type\u003d\"int8\" regnum\u003d\"20\" group\u003d\"system\"/\u003e\n    \u003creg name\u003d\"basepri\" bitsize\u003d\"8\" type\u003d\"int8\" regnum\u003d\"21\" group\u003d\"system\"/\u003e\n    \u003creg name\u003d\"faultmask\" bitsize\u003d\"1\" type\u003d\"int8\" regnum\u003d\"22\" group\u003d\"system\"/\u003e\n    \u003creg name\u003d\"control\" bitsize\u003d\"3\" type\u003d\"int8\" regnum\u003d\"23\" group\u003d\"system\"/\u003e\n  \u003c/feature\u003e\n  \u003cfeature name\u003d\"org.gnu.gdb.arm.vfp\"\u003e\n    \u003creg name\u003d\"d0\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"44\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d1\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"45\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d2\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"46\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d3\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"47\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d4\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"48\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d5\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"49\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d6\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"50\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d7\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"51\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d8\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"52\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d9\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"53\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d10\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"54\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d11\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"55\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d12\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"56\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d13\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"57\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d14\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"58\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"d15\" bitsize\u003d\"64\" type\u003d\"ieee_double\" regnum\u003d\"59\" group\u003d\"float\"/\u003e\n    \u003creg name\u003d\"fpscr\" bitsize\u003d\"32\" type\u003d\"int\" regnum\u003d\"60\" group\u003d\"float\"/\u003e\n  \u003c/feature\u003e\n\u003c/target\u003e\n(gdb) quit\n```","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"26ea29f73fa8229a35053e514b9bc20d8be3f744","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"4e2e3129_3c3683ae","updated":"2026-10-02 16:05:52.000000000","message":"Agree that this is not the standard way OpenOCD propagates the errors, but the fix is not supposed to be in this patch.\nI was checking if we really need to escape in all the cases fixed here, but GDB spec allows custom extensions, so better playing safe and escape every string.\nMaybe it\u0027s missing a\n`LOG_ERROR(\"Out of memory\");`\nin case of `malloc()` fail, but can be part of the patch that will fix the error propagation.","commit_id":"bb8dea496dc2bd2d8295e75d19fbdb08292c3de3"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"25fc6f0e4132dd084e9525f4aa0fc89b1d374cd3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"13b94b39_fbf964fa","updated":"2026-09-24 15:46:00.000000000","message":"Thanks!","commit_id":"bb8dea496dc2bd2d8295e75d19fbdb08292c3de3"},{"author":{"_account_id":1002247,"name":"Daniel Lizewski","display_name":"Daniel Lizewski","email":"daniellizewski@geotab.com","username":"dlizewski"},"change_message_id":"a28d7c61ffacd4f17ea82e2dab40d571abd790c0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"f2f35923_1cd6bf40","in_reply_to":"4e2e3129_3c3683ae","updated":"2026-10-02 20:02:37.000000000","message":"ok, once this patch is merged I will submit another patch fixing the return code of xml_escape_string and xml_printf to follow the standard return code handling plus add a a memory error log","commit_id":"bb8dea496dc2bd2d8295e75d19fbdb08292c3de3"}],"src/server/gdb_server.c":[{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"3edc9f40b5568252d9f0abef384830fff6f19d96","unresolved":true,"context_lines":[{"line_number":2257,"context_line":"\t\t}"},{"line_number":2258,"context_line":"\t\t/* \u003cvector id\u003d\"id\" type\u003d\"type\" count\u003d\"count\"/\u003e */"},{"line_number":2259,"context_line":"\t\tchar *id \u003d xml_escape_string(\u0026retval, type-\u003eid);"},{"line_number":2260,"context_line":"\t\tchar *type_id \u003d xml_escape_string(\u0026retval, type-\u003ereg_type_vector-\u003etype-\u003eid);"},{"line_number":2261,"context_line":""},{"line_number":2262,"context_line":"\t\txml_printf(\u0026retval, tdesc, pos, size,"},{"line_number":2263,"context_line":"\t\t\t\t\"\u003cvector id\u003d\\\"%s\\\" type\u003d\\\"%s\\\" count\u003d\\\"%\" PRIu32 \"\\\"/\u003e\\n\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9aec7c78_d89051b0","line":2260,"updated":"2026-09-18 09:28:10.000000000","message":"`xml_escape_string()` records allocation failure in `gdb_generate_reg_type_description()`\u0027s local `retval`, but this function still returns `ERROR_OK` unconditionally. The caller `gdb_generate_target_description()` ignores the return value, so if either allocation here fails, the generated target description can be incomplete while the outer `retval` remains `ERROR_OK` and the truncated XML is cached or sent as success. Please propagate the local error, or pass the caller\u0027s status through, so allocation failure cannot be reported as a valid target description.\n\n*This review was performed by an AI agent.*","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"19cd14b5a2211e45c7b8aa5d08a64af254212261","unresolved":true,"context_lines":[{"line_number":2257,"context_line":"\t\t}"},{"line_number":2258,"context_line":"\t\t/* \u003cvector id\u003d\"id\" type\u003d\"type\" count\u003d\"count\"/\u003e */"},{"line_number":2259,"context_line":"\t\tchar *id \u003d xml_escape_string(\u0026retval, type-\u003eid);"},{"line_number":2260,"context_line":"\t\tchar *type_id \u003d xml_escape_string(\u0026retval, type-\u003ereg_type_vector-\u003etype-\u003eid);"},{"line_number":2261,"context_line":""},{"line_number":2262,"context_line":"\t\txml_printf(\u0026retval, tdesc, pos, size,"},{"line_number":2263,"context_line":"\t\t\t\t\"\u003cvector id\u003d\\\"%s\\\" type\u003d\\\"%s\\\" count\u003d\\\"%\" PRIu32 \"\\\"/\u003e\\n\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"deb5f519_f349570a","line":2260,"in_reply_to":"9aec7c78_d89051b0","updated":"2026-09-18 13:37:20.000000000","message":"\u003e `xml_escape_string()` records allocation failure in `gdb_generate_reg_type_description()`\u0027s local `retval`, but this function still returns `ERROR_OK` unconditionally. The caller `gdb_generate_target_description()` ignores the return value, so if either allocation here fails, the generated target description can be incomplete while the outer `retval` remains `ERROR_OK`\n\u003e \n\nDear AI agent 😊\nthis is actually an issue in the old code from 2013 and has been hiding at least errors from `xml_printf()`\nTherefore not directly related to this patch and should be fixed preferably in a separate patch.\n\nDaniel, please re-upload previous patchset 2 and if you like look at the error propagation issue.","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1002247,"name":"Daniel Lizewski","display_name":"Daniel Lizewski","email":"daniellizewski@geotab.com","username":"dlizewski"},"change_message_id":"418bec6905871914f316a74560582afd9e8c1224","unresolved":false,"context_lines":[{"line_number":2257,"context_line":"\t\t}"},{"line_number":2258,"context_line":"\t\t/* \u003cvector id\u003d\"id\" type\u003d\"type\" count\u003d\"count\"/\u003e */"},{"line_number":2259,"context_line":"\t\tchar *id \u003d xml_escape_string(\u0026retval, type-\u003eid);"},{"line_number":2260,"context_line":"\t\tchar *type_id \u003d xml_escape_string(\u0026retval, type-\u003ereg_type_vector-\u003etype-\u003eid);"},{"line_number":2261,"context_line":""},{"line_number":2262,"context_line":"\t\txml_printf(\u0026retval, tdesc, pos, size,"},{"line_number":2263,"context_line":"\t\t\t\t\"\u003cvector id\u003d\\\"%s\\\" type\u003d\\\"%s\\\" count\u003d\\\"%\" PRIu32 \"\\\"/\u003e\\n\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"f0427225_99a16b36","line":2260,"in_reply_to":"9aec7c78_d89051b0","updated":"2026-09-18 13:53:31.000000000","message":"This was an existing problem with gdb_generate_reg_type_description and would happen if xml_printf failed. I did fix it through by extending the pattern for gdb_generate_reg_type_description to accept a pointer to retval so a failure deep in gdb_generate_reg_type_description is seen upward","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1002247,"name":"Daniel Lizewski","display_name":"Daniel Lizewski","email":"daniellizewski@geotab.com","username":"dlizewski"},"change_message_id":"be82b02849d4a89a89df1e74f46e8c46687267ec","unresolved":false,"context_lines":[{"line_number":2257,"context_line":"\t\t}"},{"line_number":2258,"context_line":"\t\t/* \u003cvector id\u003d\"id\" type\u003d\"type\" count\u003d\"count\"/\u003e */"},{"line_number":2259,"context_line":"\t\tchar *id \u003d xml_escape_string(\u0026retval, type-\u003eid);"},{"line_number":2260,"context_line":"\t\tchar *type_id \u003d xml_escape_string(\u0026retval, type-\u003ereg_type_vector-\u003etype-\u003eid);"},{"line_number":2261,"context_line":""},{"line_number":2262,"context_line":"\t\txml_printf(\u0026retval, tdesc, pos, size,"},{"line_number":2263,"context_line":"\t\t\t\t\"\u003cvector id\u003d\\\"%s\\\" type\u003d\\\"%s\\\" count\u003d\\\"%\" PRIu32 \"\\\"/\u003e\\n\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aebe8beb_976a3fc1","line":2260,"in_reply_to":"f0427225_99a16b36","updated":"2026-09-18 13:54:41.000000000","message":"EDIT: It has since been reverted back to the original and this comment will be ignored","commit_id":"451650494bbac1498d5fc41ff301b8d35d9f5ba7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"19cd14b5a2211e45c7b8aa5d08a64af254212261","unresolved":true,"context_lines":[{"line_number":2240,"context_line":"\treturn -1;"},{"line_number":2241,"context_line":"}"},{"line_number":2242,"context_line":""},{"line_number":2243,"context_line":"static void gdb_generate_reg_type_description(int *retval, struct target *target,"},{"line_number":2244,"context_line":"\t\tchar **tdesc, int *pos, int *size, struct reg_data_type *type,"},{"line_number":2245,"context_line":"\t\tchar const **arch_defined_types_list[], int *num_arch_defined_types)"},{"line_number":2246,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"25f02342_4c99844c","line":2243,"range":{"start_line":2243,"start_character":7,"end_line":2243,"end_character":57},"updated":"2026-09-18 13:37:20.000000000","message":"Please not this way.\nOpenOCD standard is a function returning the error code and eventual additional output parameters are passed by reference.\n`xml_printf()` was probably the only exception from this rule.\nYou added another one `xml_escape_string()` - I would tolerate it as it fits well using together with `xml_printf()`\nBut stop here and don\u0027t convert another function to this silly format.","commit_id":"d2795662a2fcb54965419269da4bcc7501a8d17a"},{"author":{"_account_id":1002247,"name":"Daniel Lizewski","display_name":"Daniel Lizewski","email":"daniellizewski@geotab.com","username":"dlizewski"},"change_message_id":"418bec6905871914f316a74560582afd9e8c1224","unresolved":false,"context_lines":[{"line_number":2240,"context_line":"\treturn -1;"},{"line_number":2241,"context_line":"}"},{"line_number":2242,"context_line":""},{"line_number":2243,"context_line":"static void gdb_generate_reg_type_description(int *retval, struct target *target,"},{"line_number":2244,"context_line":"\t\tchar **tdesc, int *pos, int *size, struct reg_data_type *type,"},{"line_number":2245,"context_line":"\t\tchar const **arch_defined_types_list[], int *num_arch_defined_types)"},{"line_number":2246,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"4d13e4d4_f134b12d","line":2243,"range":{"start_line":2243,"start_character":7,"end_line":2243,"end_character":57},"in_reply_to":"25f02342_4c99844c","updated":"2026-09-18 13:53:31.000000000","message":"Ok, works for me. I agree that return code by reference is not ideal, but I was just trying to resolve the AI\u0027s comment and didn\u0027t want to have to re-write all of the functions using xml_printf.\n\nI have reverted back to patch2","commit_id":"d2795662a2fcb54965419269da4bcc7501a8d17a"}]}
