)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"56c6460f90a30026f6eb950f592a7d07c7d13029","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"32319fcd_f37b0c9f","updated":"2024-06-07 13:29:53.000000000","message":"Hey, thanks for the patch. I have found few things which I would prefer addressed.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"93c073ecf89b2a19ad57cb06fea27464827419e1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"593e21d8_64109396","updated":"2024-06-10 12:00:35.000000000","message":"Thanks for resolving it. I do believe you unintentionally left a blank line, please take a look.","commit_id":"161c88e294a9d95c511b9e601f94578d31e6276d"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ebeb5270c2ccbc0a02c9dc72166a2db9e879a9fe","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"331ad280_213ad6d4","updated":"2024-06-23 22:08:12.000000000","message":"Thanks!","commit_id":"161c88e294a9d95c511b9e601f94578d31e6276d"}],"src/helper/binarybuffer.c":[{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"b93466c849ca0da1f1bef02495165809a9e372b9","unresolved":true,"context_lines":[{"line_number":224,"context_line":"\tconst bool has_oct_prefix \u003d (str_len \u003e 1) \u0026\u0026 !has_hex_prefix \u0026\u0026"},{"line_number":225,"context_line":"\t\t(str[0] \u003d\u003d \u00270\u0027);"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"\tif (has_hex_prefix \u0026\u0026 (radix \u003d\u003d 16 || radix \u003d\u003d 0)) {"},{"line_number":228,"context_line":"\t\t/* OK, detected HEX number, strip the prefix */"},{"line_number":229,"context_line":"\t\tradix \u003d 16;"},{"line_number":230,"context_line":"\t\tstr +\u003d 2;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"58558b2f_eea1121f","line":227,"updated":"2024-06-09 10:05:43.000000000","message":"If we have hex prefix and _radix\u003d10, this function should raise an error, no? Instead it keeps _radix\u003d10.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"3dd8f7bdf00f56fd44bf406a6d098676a7466438","unresolved":true,"context_lines":[{"line_number":224,"context_line":"\tconst bool has_oct_prefix \u003d (str_len \u003e 1) \u0026\u0026 !has_hex_prefix \u0026\u0026"},{"line_number":225,"context_line":"\t\t(str[0] \u003d\u003d \u00270\u0027);"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"\tif (has_hex_prefix \u0026\u0026 (radix \u003d\u003d 16 || radix \u003d\u003d 0)) {"},{"line_number":228,"context_line":"\t\t/* OK, detected HEX number, strip the prefix */"},{"line_number":229,"context_line":"\t\tradix \u003d 16;"},{"line_number":230,"context_line":"\t\tstr +\u003d 2;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"eb5e5086_bb5a4e4e","line":227,"in_reply_to":"58558b2f_eea1121f","updated":"2024-06-10 10:16:21.000000000","message":"I have further refactored the function str_radix_guess() so this should no longer be an issue. \n\nPlease, let me know if you are fine with the current state.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"56c6460f90a30026f6eb950f592a7d07c7d13029","unresolved":true,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":"\tunsigned int str_len \u003d strlen(str);"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"\tstr_radix_guess(\u0026str, \u0026str_len, \u0026radix);"},{"line_number":255,"context_line":"\tassert(radix !\u003d 0);"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"\tif (_detected_radix)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"148db882_18499e7c","line":254,"range":{"start_line":254,"start_character":1,"end_line":254,"end_character":41},"updated":"2024-06-07 13:29:53.000000000","message":"Shouldn\u0027t the str_radix_guess() be only called if radix \u003d\u003d 0? eg. when caller asks us to guess?\n\nThe stripping of the prefix should be separate I feel.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"3dd8f7bdf00f56fd44bf406a6d098676a7466438","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":"\tunsigned int str_len \u003d strlen(str);"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"\tstr_radix_guess(\u0026str, \u0026str_len, \u0026radix);"},{"line_number":255,"context_line":"\tassert(radix !\u003d 0);"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"\tif (_detected_radix)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"979fe4fe_a9b4841e","line":254,"range":{"start_line":254,"start_character":1,"end_line":254,"end_character":41},"in_reply_to":"148db882_18499e7c","updated":"2024-06-10 10:16:21.000000000","message":"Thanks for the suggestion - addressed. \n\nI have split the former str_radix_guess() to two functions - radix detection \u0026 stripping of the prefix.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"56c6460f90a30026f6eb950f592a7d07c7d13029","unresolved":true,"context_lines":[{"line_number":321,"context_line":"\t}"},{"line_number":322,"context_line":"\t/* Check the partial byte: */"},{"line_number":323,"context_line":"\tif (buf_len % 8) {"},{"line_number":324,"context_line":"\t\tconst uint8_t mask \u003d 0xffu \u003c\u003c (buf_len % 8);"},{"line_number":325,"context_line":"\t\tif ((b256_buf[(buf_len / 8)] \u0026 mask) !\u003d 0x0) {"},{"line_number":326,"context_line":"\t\t\tfree(b256_buf);"},{"line_number":327,"context_line":"\t\t\treturn ERROR_NUMBER_EXCEEDS_BUFFER;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"6c5fa2d0_badc908b","line":324,"updated":"2024-06-07 13:29:53.000000000","message":"Hex literal should be in capital letters, in accordance with surrounding code.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"3dd8f7bdf00f56fd44bf406a6d098676a7466438","unresolved":false,"context_lines":[{"line_number":321,"context_line":"\t}"},{"line_number":322,"context_line":"\t/* Check the partial byte: */"},{"line_number":323,"context_line":"\tif (buf_len % 8) {"},{"line_number":324,"context_line":"\t\tconst uint8_t mask \u003d 0xffu \u003c\u003c (buf_len % 8);"},{"line_number":325,"context_line":"\t\tif ((b256_buf[(buf_len / 8)] \u0026 mask) !\u003d 0x0) {"},{"line_number":326,"context_line":"\t\t\tfree(b256_buf);"},{"line_number":327,"context_line":"\t\t\treturn ERROR_NUMBER_EXCEEDS_BUFFER;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"115e302e_7cbd7330","line":324,"in_reply_to":"6c5fa2d0_badc908b","updated":"2024-06-10 10:16:21.000000000","message":"Addressed.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"93c073ecf89b2a19ad57cb06fea27464827419e1","unresolved":true,"context_lines":[{"line_number":252,"context_line":"\t\tstr +\u003d 1;"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"\t/* No prefix to strip for radix \u003d\u003d 10. */"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"\t*_str \u003d str;"},{"line_number":257,"context_line":"}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"af3641f1_f6d531d0","line":255,"updated":"2024-06-10 12:00:35.000000000","message":"I would delete this empty line, for clarity","commit_id":"161c88e294a9d95c511b9e601f94578d31e6276d"},{"author":{"_account_id":1002143,"name":"Marek Vrbka","email":"marek.vrbka@codasip.com","username":"MarekVCodasip"},"change_message_id":"bca0dd86a2ee2cb66d17b6a7e441d1811b7dacd5","unresolved":false,"context_lines":[{"line_number":252,"context_line":"\t\tstr +\u003d 1;"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"\t/* No prefix to strip for radix \u003d\u003d 10. */"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"\t*_str \u003d str;"},{"line_number":257,"context_line":"}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"e35a8c7e_91245073","line":255,"in_reply_to":"4112ff05_126e4a5e","updated":"2024-06-10 13:20:27.000000000","message":"Alright, resolved","commit_id":"161c88e294a9d95c511b9e601f94578d31e6276d"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"1ab3c940a209354abf21a7ffa78d1b557cd86fb4","unresolved":true,"context_lines":[{"line_number":252,"context_line":"\t\tstr +\u003d 1;"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"\t/* No prefix to strip for radix \u003d\u003d 10. */"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"\t*_str \u003d str;"},{"line_number":257,"context_line":"}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"4112ff05_126e4a5e","line":255,"in_reply_to":"af3641f1_f6d531d0","updated":"2024-06-10 12:22:03.000000000","message":"The blank line 255 is there on purpose: I did not want to put the comment (line 254) right next to line 256 where it does not belong.","commit_id":"161c88e294a9d95c511b9e601f94578d31e6276d"}],"src/helper/command.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7411e90a9d0682da04d5920e8ee6e33097ec01be","unresolved":true,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"\t/* Provide a user-readable error message */"},{"line_number":1375,"context_line":"\tif (ret \u003d\u003d ERROR_INVALID_DIGIT)"},{"line_number":1376,"context_line":"\t\tLOG_ERROR(\"Number %s (base-%u) contains an invalid digit\", str, detected_radix);"},{"line_number":1377,"context_line":"\telse if (ret \u003d\u003d ERROR_NUMBER_EXCEEDS_BUFFER)"},{"line_number":1378,"context_line":"\t\tLOG_ERROR(\"Number %s exceeds %u bits\", str, buf_len);"},{"line_number":1379,"context_line":"\telse"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"ff77d9db_ba4ecfe3","line":1376,"updated":"2024-06-09 16:18:30.000000000","message":"This function ``command_parse_str_to_buf()`` is used during OpenOCD commands.\nEither add the argument ``struct command_invocation *cmd`` or convert this function in a ``__COMMAND_HANDLER()``, so you can replace these ``LOG_ERROR()`` with ``command_print()``.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"06b7feafbdc31d37475fe3f4668b303924c94df3","unresolved":true,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"\t/* Provide a user-readable error message */"},{"line_number":1375,"context_line":"\tif (ret \u003d\u003d ERROR_INVALID_DIGIT)"},{"line_number":1376,"context_line":"\t\tLOG_ERROR(\"Number %s (base-%u) contains an invalid digit\", str, detected_radix);"},{"line_number":1377,"context_line":"\telse if (ret \u003d\u003d ERROR_NUMBER_EXCEEDS_BUFFER)"},{"line_number":1378,"context_line":"\t\tLOG_ERROR(\"Number %s exceeds %u bits\", str, buf_len);"},{"line_number":1379,"context_line":"\telse"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"1ec4665f_bbb97cb2","line":1376,"in_reply_to":"8eb37233_78c33344","updated":"2024-06-10 10:17:45.000000000","message":"Typo correction: \n\n... I had to rework target_jim_set_reg() ...","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"3dd8f7bdf00f56fd44bf406a6d098676a7466438","unresolved":true,"context_lines":[{"line_number":1373,"context_line":""},{"line_number":1374,"context_line":"\t/* Provide a user-readable error message */"},{"line_number":1375,"context_line":"\tif (ret \u003d\u003d ERROR_INVALID_DIGIT)"},{"line_number":1376,"context_line":"\t\tLOG_ERROR(\"Number %s (base-%u) contains an invalid digit\", str, detected_radix);"},{"line_number":1377,"context_line":"\telse if (ret \u003d\u003d ERROR_NUMBER_EXCEEDS_BUFFER)"},{"line_number":1378,"context_line":"\t\tLOG_ERROR(\"Number %s exceeds %u bits\", str, buf_len);"},{"line_number":1379,"context_line":"\telse"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"8eb37233_78c33344","line":1376,"in_reply_to":"ff77d9db_ba4ecfe3","updated":"2024-06-10 10:16:21.000000000","message":"Addressed: I have used COMMAND_HANDLER() macro on command_parse_str_to_buf().\n\nIn order to accomplish that, I had to target_jim_set_reg() into a proper command handler that follows the current style of writing command handlers.\n\nPlease, help me check if that has been done correctly.","commit_id":"235258664506c9a27b2530dec0723faa24a1c422"}]}
