)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"c15c9eb8a1c97278f547801b389fb44eb84405ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8f058cc0_c2ab45d0","updated":"2022-04-07 08:57:04.000000000","message":"Can you please help to review these additions?","commit_id":"f1e80481d8ae9e63d9ff1f54661a8b5c6c2b8c1c"},{"author":{"_account_id":1001939,"name":"zedudi","display_name":"Zoltán Dudás","email":"zedudi@gmail.com","username":"zedudi"},"change_message_id":"3ac1b594e8e19989eadb4425fb57df1a10db2a6f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"30130e47_9c2bf025","updated":"2022-04-07 09:05:57.000000000","message":"Guys, I am very new here, I\u0027ve added Antonio with much greater knowledge.","commit_id":"f1e80481d8ae9e63d9ff1f54661a8b5c6c2b8c1c"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"e82462072c53a434a3a8cedf10a0221534891d2f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4e3ab0ac_051f5c18","updated":"2022-06-06 19:31:40.000000000","message":"Seems reasonable to me.  Couple of minor comments.  Thanks, Erhan.","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6e46e8799414297a47476d3f5c30b62efad5be4a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3ed5d75a_9d3d6c8e","updated":"2022-06-07 14:15:11.000000000","message":"minor comment inline.\nWhat is the C code you plan to add? Is it already available in the expressif fork?","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"9e74a47a6110d60e120f25772d779d93ec0ab714","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"83770539_9fb01ff2","in_reply_to":"3ed5d75a_9d3d6c8e","updated":"2022-06-07 15:22:56.000000000","message":"Yes. Added in our fork. \n\nhttps://github.com/espressif/openocd-esp32/blob/master/src/target/espressif/esp_xtensa_semihosting.c#L587\nhttps://github.com/espressif/openocd-esp32/blob/master/src/target/espressif/esp_semihosting.c#L79\n\nBeside that custom commands, we are working on an internal branch for the directory related syscalls such as, mdkdir opendir, readdir, closedir and stat, fstat, fsync etc.. Of course we can discuss maybe these extensions can be in the generic semihosting_common.c but eventually we will have some non-generic calls to help implement for the other features.","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"780bd9d98cc4b12722ba8a6d612e606b6756824d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dee2806d_5e1bc05f","updated":"2022-06-07 19:16:10.000000000","message":"Separate patch has been created. https://review.openocd.org/c/openocd/+/7018","commit_id":"08389244fdadeccfaa532d0f4a3a47f3c38618c1"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"785280cc8af078469a9c5130b2722fe324422a78","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"95a449a7_a389d33a","updated":"2022-06-11 09:27:31.000000000","message":"Only minor stuff on the comments","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"b9beb7c24d33c30a93c480ab2bb390c77b4dcb9c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"60a42b2c_43c689c8","updated":"2022-06-08 16:48:08.000000000","message":"Thanks, Erhan.","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"81f1dacd3b3fefe8b91bb4201a1713e7bf9922f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"15545e21_36a10299","updated":"2022-06-11 16:55:27.000000000","message":"thanks!","commit_id":"e12c1ff67eb4ff9960a14bf0267a3cc50b805142"}],"src/target/semihosting_common.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6e46e8799414297a47476d3f5c30b62efad5be4a","unresolved":true,"context_lines":[{"line_number":931,"context_line":"\t\t\t\t\t\t\t#ifdef _WIN32"},{"line_number":932,"context_line":"\t\t\t\t\t\t\t\t/* Windows needs O_BINARY flag for proper handling of EOLs */"},{"line_number":933,"context_line":"\t\t\t\t\t\t\t\tflags |\u003d O_BINARY;"},{"line_number":934,"context_line":"\t\t\t\t\t\t\t#endif"},{"line_number":935,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":936,"context_line":"\t\t\t\t\t\t\t\t\tflags,"},{"line_number":937,"context_line":"\t\t\t\t\t\t\t\t\t0644);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"f0b405b0_237ed935","line":934,"updated":"2022-06-07 14:15:11.000000000","message":"I think this should eventually go in an independent patch.\nAnd, by the way, I want to avoid #if/#endif inside the code.\nCan it be moved on top using\n #ifdef _WIN32\n #define WIN_FORCE_BINARY O_BINARY\n #else\n #define WIN_FORCE_BINARY 0\n #endif\nand or here\n ... open_host_modeflags[mode] | WIN_FORCE_BINARY,\nor probably better on top\n static const int open_host_modeflags[12] \u003d {\n\tO_RDONLY | WIN_FORCE_BINARY,\n\tO_RDONLY | O_BINARY,\n\tO_RDWR   | WIN_FORCE_BINARY,\n\tO_RDWR   | O_BINARY,","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"780bd9d98cc4b12722ba8a6d612e606b6756824d","unresolved":false,"context_lines":[{"line_number":931,"context_line":"\t\t\t\t\t\t\t#ifdef _WIN32"},{"line_number":932,"context_line":"\t\t\t\t\t\t\t\t/* Windows needs O_BINARY flag for proper handling of EOLs */"},{"line_number":933,"context_line":"\t\t\t\t\t\t\t\tflags |\u003d O_BINARY;"},{"line_number":934,"context_line":"\t\t\t\t\t\t\t#endif"},{"line_number":935,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":936,"context_line":"\t\t\t\t\t\t\t\t\tflags,"},{"line_number":937,"context_line":"\t\t\t\t\t\t\t\t\t0644);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"7ab5aabc_407b4b03","line":934,"in_reply_to":"f0b405b0_237ed935","updated":"2022-06-07 19:16:10.000000000","message":"Done","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"e82462072c53a434a3a8cedf10a0221534891d2f","unresolved":true,"context_lines":[{"line_number":1458,"context_line":"\t\t\t */"},{"line_number":1459,"context_line":"\t\t{"},{"line_number":1460,"context_line":"\t\t\tif (semihosting-\u003euser_command_handler)"},{"line_number":1461,"context_line":"\t\t\t\tretval \u003d semihosting-\u003euser_command_handler(target);"},{"line_number":1462,"context_line":"\t\t\telse {"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"\t\t\t\tassert(!semihosting_user_op_params);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"444105e4_167cd0ed","line":1461,"updated":"2022-06-06 19:31:40.000000000","message":"check retval and handle errors?","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"c599b8bb7fa2784e185bfdd882c733662ada5a72","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"\t\t\t */"},{"line_number":1459,"context_line":"\t\t{"},{"line_number":1460,"context_line":"\t\t\tif (semihosting-\u003euser_command_handler)"},{"line_number":1461,"context_line":"\t\t\t\tretval \u003d semihosting-\u003euser_command_handler(target);"},{"line_number":1462,"context_line":"\t\t\telse {"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"\t\t\t\tassert(!semihosting_user_op_params);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"daa83535_855647ef","line":1461,"in_reply_to":"1916e2bb_454e1fdd","updated":"2022-06-07 23:38:36.000000000","message":"OK, thanks.","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6b5d44281c68a5eb8c9ead6f36f520dd2a30b921","unresolved":true,"context_lines":[{"line_number":1458,"context_line":"\t\t\t */"},{"line_number":1459,"context_line":"\t\t{"},{"line_number":1460,"context_line":"\t\t\tif (semihosting-\u003euser_command_handler)"},{"line_number":1461,"context_line":"\t\t\t\tretval \u003d semihosting-\u003euser_command_handler(target);"},{"line_number":1462,"context_line":"\t\t\telse {"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"\t\t\t\tassert(!semihosting_user_op_params);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"906c6660_92bc4f5d","line":1461,"in_reply_to":"444105e4_167cd0ed","updated":"2022-06-07 16:16:32.000000000","message":"Don\u0027t use the if/the/else syntax, so you do not need to re-indent the rest of the code. Add instead:\n if (semihosting-\u003euser_command_handler) {\n   retval \u003d semihosting-\u003euser_command_handler(target);\n   if (retval !\u003d ERROR_NOT_IMPLEMENTED) {\n     do_something_with_retval();\n     /* we have finished, here. Quit */\n     break;\n   }\n   /* fallback to check for a TCL handler */\n }\n\nAs I wrote in the code, it would be good if the call returns a special value, e.g. ERROR_NOT_IMPLEMENTED, to report that the called does not know how to handle the specific SEMIHOSTING_USER_CMD_0xXXX.\nIf returns ERROR_NOT_IMPLEMENTED it means the semihosting call is not handled, and we can go ahead in the code below to see if there is any TCL handler for it.\n\nAnd maybe the name \"user_command_handler\" should be \"user_command_extension\"","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"3dd1772fc56c72373bd8eb4e4f5ece1d30e90272","unresolved":true,"context_lines":[{"line_number":1458,"context_line":"\t\t\t */"},{"line_number":1459,"context_line":"\t\t{"},{"line_number":1460,"context_line":"\t\t\tif (semihosting-\u003euser_command_handler)"},{"line_number":1461,"context_line":"\t\t\t\tretval \u003d semihosting-\u003euser_command_handler(target);"},{"line_number":1462,"context_line":"\t\t\telse {"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"\t\t\t\tassert(!semihosting_user_op_params);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"1916e2bb_454e1fdd","line":1461,"in_reply_to":"906c6660_92bc4f5d","updated":"2022-06-07 19:15:05.000000000","message":"@Antonio, @Ian, I intentionally didn\u0027t check the return value to allow OpenOCD to call the post_result() and inform the target.","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"e82462072c53a434a3a8cedf10a0221534891d2f","unresolved":true,"context_lines":[{"line_number":1503,"context_line":"\t\t\t\tsemihosting-\u003eresult \u003d 0;"},{"line_number":1504,"context_line":"\t\t\t}"},{"line_number":1505,"context_line":"\t\t}"},{"line_number":1506,"context_line":"\t\t\tbreak;"},{"line_number":1507,"context_line":"\t\tcase SEMIHOSTING_SYS_ELAPSED:\t/* 0x30 */"},{"line_number":1508,"context_line":"\t\t/*"},{"line_number":1509,"context_line":"\t\t * Returns the number of elapsed target ticks since execution"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"1ea1fb5d_50749f0f","line":1506,"updated":"2022-06-06 19:31:40.000000000","message":"minor nit: move break inside previous scope or change indentation","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"3dd1772fc56c72373bd8eb4e4f5ece1d30e90272","unresolved":false,"context_lines":[{"line_number":1503,"context_line":"\t\t\t\tsemihosting-\u003eresult \u003d 0;"},{"line_number":1504,"context_line":"\t\t\t}"},{"line_number":1505,"context_line":"\t\t}"},{"line_number":1506,"context_line":"\t\t\tbreak;"},{"line_number":1507,"context_line":"\t\tcase SEMIHOSTING_SYS_ELAPSED:\t/* 0x30 */"},{"line_number":1508,"context_line":"\t\t/*"},{"line_number":1509,"context_line":"\t\t * Returns the number of elapsed target ticks since execution"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"46e6adbe_772ab854","line":1506,"in_reply_to":"1ea1fb5d_50749f0f","updated":"2022-06-07 19:15:05.000000000","message":"Done","commit_id":"85eccc89a80275c987d842fd7ec2ae83e7a22bde"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"c599b8bb7fa2784e185bfdd882c733662ada5a72","unresolved":true,"context_lines":[{"line_number":942,"context_line":"\t\t\t\t\t\t\t * otherwise it will fail to reopen a previously"},{"line_number":943,"context_line":"\t\t\t\t\t\t\t * written file */"},{"line_number":944,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":945,"context_line":"\t\t\t\t\t\t\t\t\topen_host_modeflags[mode],"},{"line_number":946,"context_line":"\t\t\t\t\t\t\t\t\t0644);"},{"line_number":947,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003esys_errno \u003d errno;"},{"line_number":948,"context_line":"\t\t\t\t\t\t\tLOG_DEBUG(\"open(\u0027%s\u0027)\u003d%d\", fn,"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"f628a964_15d56130","side":"PARENT","line":945,"updated":"2022-06-07 23:38:36.000000000","message":"is this diff left over from the prior patchset and can be reverted?","commit_id":"4f42600541d2f96a3a134699091e12179c82401a"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"a2a07e2c86287b90d086db9146711130f8138e9d","unresolved":false,"context_lines":[{"line_number":942,"context_line":"\t\t\t\t\t\t\t * otherwise it will fail to reopen a previously"},{"line_number":943,"context_line":"\t\t\t\t\t\t\t * written file */"},{"line_number":944,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":945,"context_line":"\t\t\t\t\t\t\t\t\topen_host_modeflags[mode],"},{"line_number":946,"context_line":"\t\t\t\t\t\t\t\t\t0644);"},{"line_number":947,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003esys_errno \u003d errno;"},{"line_number":948,"context_line":"\t\t\t\t\t\t\tLOG_DEBUG(\"open(\u0027%s\u0027)\u003d%d\", fn,"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"a2bc0f95_8c96f345","side":"PARENT","line":945,"in_reply_to":"f628a964_15d56130","updated":"2022-06-08 07:07:59.000000000","message":"Yes. Thanks. No need to define flags variable now.","commit_id":"4f42600541d2f96a3a134699091e12179c82401a"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"c599b8bb7fa2784e185bfdd882c733662ada5a72","unresolved":true,"context_lines":[{"line_number":1468,"context_line":"\t\t\t\t/* If custom user command not handled, we are looking for the TCL handler */"},{"line_number":1469,"context_line":"\t\t\t}"},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"\t\t\tassert(!semihosting_user_op_params);"},{"line_number":1472,"context_line":"\t\t\tretval \u003d semihosting_read_fields(target, 2, fields);"},{"line_number":1473,"context_line":"\t\t\tif (retval !\u003d ERROR_OK) {"},{"line_number":1474,"context_line":"\t\t\t\tLOG_ERROR(\"Failed to read fields for user defined command\""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"a82419d4_3fcf05fd","line":1471,"updated":"2022-06-07 23:38:36.000000000","message":"is it more important to check that semihosting_user_op_params is non-NULL in the above conditional rather than checking that it\u0027s NULL here?","commit_id":"08389244fdadeccfaa532d0f4a3a47f3c38618c1"},{"author":{"_account_id":1001982,"name":"Ian Thompson","email":"ianst@cadence.com","username":"ianstcdns"},"change_message_id":"b9beb7c24d33c30a93c480ab2bb390c77b4dcb9c","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"\t\t\t\t/* If custom user command not handled, we are looking for the TCL handler */"},{"line_number":1469,"context_line":"\t\t\t}"},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"\t\t\tassert(!semihosting_user_op_params);"},{"line_number":1472,"context_line":"\t\t\tretval \u003d semihosting_read_fields(target, 2, fields);"},{"line_number":1473,"context_line":"\t\t\tif (retval !\u003d ERROR_OK) {"},{"line_number":1474,"context_line":"\t\t\t\tLOG_ERROR(\"Failed to read fields for user defined command\""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"04cf73c0_5c1722ff","line":1471,"in_reply_to":"41f359d9_2f87db13","updated":"2022-06-08 16:48:08.000000000","message":"Fair enough; thanks.","commit_id":"08389244fdadeccfaa532d0f4a3a47f3c38618c1"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"a2a07e2c86287b90d086db9146711130f8138e9d","unresolved":true,"context_lines":[{"line_number":1468,"context_line":"\t\t\t\t/* If custom user command not handled, we are looking for the TCL handler */"},{"line_number":1469,"context_line":"\t\t\t}"},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"\t\t\tassert(!semihosting_user_op_params);"},{"line_number":1472,"context_line":"\t\t\tretval \u003d semihosting_read_fields(target, 2, fields);"},{"line_number":1473,"context_line":"\t\t\tif (retval !\u003d ERROR_OK) {"},{"line_number":1474,"context_line":"\t\t\t\tLOG_ERROR(\"Failed to read fields for user defined command\""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"41f359d9_2f87db13","line":1471,"in_reply_to":"a82419d4_3fcf05fd","updated":"2022-06-08 07:07:59.000000000","message":"I didn\u0027t want to touch the existing codes. This will behave same if user_command_extension is null or return ERROR_NOT_IMPLEMENTED","commit_id":"08389244fdadeccfaa532d0f4a3a47f3c38618c1"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"785280cc8af078469a9c5130b2722fe324422a78","unresolved":true,"context_lines":[{"line_number":1459,"context_line":"\t\t\tif (semihosting-\u003euser_command_extension) {"},{"line_number":1460,"context_line":"\t\t\t\tretval \u003d semihosting-\u003euser_command_extension(target);"},{"line_number":1461,"context_line":"\t\t\t\tif (retval !\u003d ERROR_NOT_IMPLEMENTED) {"},{"line_number":1462,"context_line":"\t\t\t\t\t/* In any case, we want to inform the target by calling the post_result()"},{"line_number":1463,"context_line":"\t\t\t\t\t * So, it is expecting to fill the related fields in the user_command_extension()"},{"line_number":1464,"context_line":"\t\t\t\t\t * e.g. Assign correct return values into semihosting-\u003eresult and semihosting-\u003esys_errno */"},{"line_number":1465,"context_line":"\t\t\t\t\tbreak;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"07cdfc2c_b9056ffe","line":1462,"updated":"2022-06-11 09:27:31.000000000","message":"I prefer this comment replaced by the one in include file.","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"576d6f62df561b73d0a3bdc46ca46efbb40b8ace","unresolved":false,"context_lines":[{"line_number":1459,"context_line":"\t\t\tif (semihosting-\u003euser_command_extension) {"},{"line_number":1460,"context_line":"\t\t\t\tretval \u003d semihosting-\u003euser_command_extension(target);"},{"line_number":1461,"context_line":"\t\t\t\tif (retval !\u003d ERROR_NOT_IMPLEMENTED) {"},{"line_number":1462,"context_line":"\t\t\t\t\t/* In any case, we want to inform the target by calling the post_result()"},{"line_number":1463,"context_line":"\t\t\t\t\t * So, it is expecting to fill the related fields in the user_command_extension()"},{"line_number":1464,"context_line":"\t\t\t\t\t * e.g. Assign correct return values into semihosting-\u003eresult and semihosting-\u003esys_errno */"},{"line_number":1465,"context_line":"\t\t\t\t\tbreak;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"e30b777d_4af12151","line":1462,"in_reply_to":"07cdfc2c_b9056ffe","updated":"2022-06-11 15:54:41.000000000","message":"Done","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"785280cc8af078469a9c5130b2722fe324422a78","unresolved":true,"context_lines":[{"line_number":1506,"context_line":"\t\t\tfree(semihosting_user_op_params);"},{"line_number":1507,"context_line":"\t\t\tsemihosting_user_op_params \u003d NULL;"},{"line_number":1508,"context_line":"\t\t\tsemihosting-\u003eresult \u003d 0;"},{"line_number":1509,"context_line":"\t\t\tbreak;"},{"line_number":1510,"context_line":"\t\tcase SEMIHOSTING_SYS_ELAPSED:\t/* 0x30 */"},{"line_number":1511,"context_line":"\t\t/*"},{"line_number":1512,"context_line":"\t\t * Returns the number of elapsed target ticks since execution"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"acec5f2b_2e49264e","line":1509,"updated":"2022-06-11 09:27:31.000000000","message":"Thanks for removing the useless {} around this \"case\" block.\nBut please keep one empty line between this \"break;\" and following \"case ...\"","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"576d6f62df561b73d0a3bdc46ca46efbb40b8ace","unresolved":false,"context_lines":[{"line_number":1506,"context_line":"\t\t\tfree(semihosting_user_op_params);"},{"line_number":1507,"context_line":"\t\t\tsemihosting_user_op_params \u003d NULL;"},{"line_number":1508,"context_line":"\t\t\tsemihosting-\u003eresult \u003d 0;"},{"line_number":1509,"context_line":"\t\t\tbreak;"},{"line_number":1510,"context_line":"\t\tcase SEMIHOSTING_SYS_ELAPSED:\t/* 0x30 */"},{"line_number":1511,"context_line":"\t\t/*"},{"line_number":1512,"context_line":"\t\t * Returns the number of elapsed target ticks since execution"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"2d8c6b24_84e62cb6","line":1509,"in_reply_to":"acec5f2b_2e49264e","updated":"2022-06-11 15:54:41.000000000","message":"Done","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"}],"src/target/semihosting_common.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"785280cc8af078469a9c5130b2722fe324422a78","unresolved":true,"context_lines":[{"line_number":179,"context_line":"\t/** Base directory for semihosting I/O operations. */"},{"line_number":180,"context_line":"\tchar *basedir;"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"\tint (*user_command_extension)(struct target *target);"},{"line_number":183,"context_line":"\tint (*setup)(struct target *target, int enable);"},{"line_number":184,"context_line":"\tint (*post_result)(struct target *target);"},{"line_number":185,"context_line":"};"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"df85edf1_84a77ee5","line":182,"updated":"2022-06-11 09:27:31.000000000","message":"Put here a comment on what this function is supposed to do and to return, e.g.\n /**\n  * Target\u0027s extension of semihosting user commands.\n  * @returns ERROR_NOT_IMPLEMENTED when user command is not handled, otherwise\n  * sets semihosting-\u003eresult and semihosting-\u003esys_errno and returns ERROR_OK.\n  */","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"576d6f62df561b73d0a3bdc46ca46efbb40b8ace","unresolved":false,"context_lines":[{"line_number":179,"context_line":"\t/** Base directory for semihosting I/O operations. */"},{"line_number":180,"context_line":"\tchar *basedir;"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"\tint (*user_command_extension)(struct target *target);"},{"line_number":183,"context_line":"\tint (*setup)(struct target *target, int enable);"},{"line_number":184,"context_line":"\tint (*post_result)(struct target *target);"},{"line_number":185,"context_line":"};"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"8491a79d_919c1411","line":182,"in_reply_to":"df85edf1_84a77ee5","updated":"2022-06-11 15:54:41.000000000","message":"Done","commit_id":"5f10c73e25e67a6da2c2f6e54de57828b99abe9d"}]}
