)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3f943a065ee8703d80c255e2d26a109ad8b26395","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Pavel Kirienko \u003cpavel.kirienko@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-01-21 19:16:09 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"semihosting: Replace incorrect semihosting file open mode flags pulled from sys/stat.h with correct values defined by the GDB remote protocol"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Values defined in sys/stat.h are not guaranteed to match"},{"line_number":10,"context_line":"the constants defined by the GDB remote protocol, which are defined in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"237b03e9_a181f88e","line":7,"updated":"2022-01-21 18:27:26.000000000","message":"please keep the title short, e.g.:\nsemihosting: use open mode flags from GDB, not from sys/stat.h","commit_id":"7c84ee233bb16c4c2e10d47fdc15cc56b5b861aa"},{"author":{"_account_id":1001953,"name":"Pavel Kirienko","email":"pavel.kirienko@gmail.com","username":"pavel-kirienko"},"change_message_id":"c4ae7c438a0ae41940c502c4a163a27d39a88cfa","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pavel Kirienko \u003cpavel.kirienko@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2022-01-21 19:16:09 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"semihosting: Replace incorrect semihosting file open mode flags pulled from sys/stat.h with correct values defined by the GDB remote protocol"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Values defined in sys/stat.h are not guaranteed to match"},{"line_number":10,"context_line":"the constants defined by the GDB remote protocol, which are defined in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf23056b_087e2dc9","line":7,"in_reply_to":"237b03e9_a181f88e","updated":"2022-01-21 18:51:28.000000000","message":"Done","commit_id":"7c84ee233bb16c4c2e10d47fdc15cc56b5b861aa"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"e4b39864a79a7e8282b204d5ff6c683837117028","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"03ad1c82_e3a6fd1a","updated":"2022-01-11 11:54:57.000000000","message":"Checked visually - looks all right.","commit_id":"72144621597eeeeeec91184d2f1279cfe1447e58"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"da3b680ed10009e48620a16330c77e19781a7f0e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"41316507_d730c483","updated":"2022-01-21 16:11:37.000000000","message":"I\u0027m ok with this patch.\nCan you please reformat the commit message to use 70 char max per line?\nCan you also specify, in the commit message, which is your \"local system\".\nPlus another minor comment in the code","commit_id":"72144621597eeeeeec91184d2f1279cfe1447e58"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3f943a065ee8703d80c255e2d26a109ad8b26395","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dc314d6d_8b41d849","updated":"2022-01-21 18:27:26.000000000","message":"I have checked what LLDB defines for open mode flags, but I cannot find a semihosting implementation in LLDB. Maybe does not exist yet!","commit_id":"7c84ee233bb16c4c2e10d47fdc15cc56b5b861aa"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a259ee16129d0840740e5112256bdb8aa5b53660","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"93d702f1_9c8734ae","in_reply_to":"28f402b4_e565382a","updated":"2022-01-29 18:24:43.000000000","message":"Thanks for confirm it.","commit_id":"7c84ee233bb16c4c2e10d47fdc15cc56b5b861aa"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"3a61e40e87f92f8c16ab2b92e3df43ed9ad3cb28","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"28f402b4_e565382a","in_reply_to":"dc314d6d_8b41d849","updated":"2022-01-24 13:11:59.000000000","message":"\u003e I have checked what LLDB defines for open mode flags, but I cannot find a semihosting implementation in LLDB. Maybe does not exist yet!\n\nYes, that is correct. I\u0027ve asked my colleagues who work with LLDB: FILEIO (semihosting) support in LLDB is currently not present (and not even in preparation, as far as they know).","commit_id":"7c84ee233bb16c4c2e10d47fdc15cc56b5b861aa"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"06858536944f394ed72157b1512d7911cfccb2b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"a914981c_efe6eee6","updated":"2022-01-21 23:28:35.000000000","message":"thanks!","commit_id":"9cce379c32a9198f2c91c02d1ecd5e4eaee78d6d"}],"src/target/semihosting_common.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"da3b680ed10009e48620a16330c77e19781a7f0e","unresolved":true,"context_lines":[{"line_number":64,"context_line":"\tTARGET_O_APPEND \u003d 0x008,"},{"line_number":65,"context_line":"\tTARGET_O_CREAT  \u003d 0x200,"},{"line_number":66,"context_line":"\tTARGET_O_TRUNC  \u003d 0x400,"},{"line_number":67,"context_line":"\t/* O_EXCL is not required in this implementation. */"},{"line_number":68,"context_line":"};"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"/* GDB remote protocol does not differentiate between text and binary open modes. */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"047b6821_e295012b","line":67,"updated":"2022-01-21 16:11:37.000000000","message":"Even if it\u0027s not used (yet?), could be useful to specify that in GDB O_EXCL is 0x800.\nJust add it in the comment:\n/* O_EXCL\u003d0x800 is not required in this implementation. */","commit_id":"72144621597eeeeeec91184d2f1279cfe1447e58"},{"author":{"_account_id":1001953,"name":"Pavel Kirienko","email":"pavel.kirienko@gmail.com","username":"pavel-kirienko"},"change_message_id":"53236780f7de6d051afee1b73a68ef2322812f7b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"\tTARGET_O_APPEND \u003d 0x008,"},{"line_number":65,"context_line":"\tTARGET_O_CREAT  \u003d 0x200,"},{"line_number":66,"context_line":"\tTARGET_O_TRUNC  \u003d 0x400,"},{"line_number":67,"context_line":"\t/* O_EXCL is not required in this implementation. */"},{"line_number":68,"context_line":"};"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"/* GDB remote protocol does not differentiate between text and binary open modes. */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9d0e7e8f_96aeaf31","line":67,"in_reply_to":"047b6821_e295012b","updated":"2022-01-21 17:25:08.000000000","message":"Done","commit_id":"72144621597eeeeeec91184d2f1279cfe1447e58"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fed049511500ec5209f9cc15d3e6c2a83d963c0c","unresolved":true,"context_lines":[{"line_number":81,"context_line":"\tTARGET_O_WRONLY | TARGET_O_CREAT | TARGET_O_APPEND,"},{"line_number":82,"context_line":"\tTARGET_O_RDWR   | TARGET_O_CREAT | TARGET_O_APPEND,"},{"line_number":83,"context_line":"\tTARGET_O_RDWR   | TARGET_O_CREAT | TARGET_O_APPEND"},{"line_number":84,"context_line":"};"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"static int semihosting_common_fileio_info(struct target *target,"},{"line_number":87,"context_line":"\tstruct gdb_fileio_info *fileio_info);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"b5020e56_1965ac6c","line":84,"updated":"2022-03-03 15:18:43.000000000","message":"This table converts the \"mode\" parameter from arm semihosting encoding to the posix O_XXX macros.\nBefore the patch we used the local host\u0027s OS macros, now we use the GDB internal macros.","commit_id":"dbbac5f11d662ab0827a997aa5d173fd62c51708"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fed049511500ec5209f9cc15d3e6c2a83d963c0c","unresolved":true,"context_lines":[{"line_number":740,"context_line":"\t\t\t\t\t\t\tfileio_info-\u003eidentifier \u003d \"open\";"},{"line_number":741,"context_line":"\t\t\t\t\t\t\tfileio_info-\u003eparam_1 \u003d addr;"},{"line_number":742,"context_line":"\t\t\t\t\t\t\tfileio_info-\u003eparam_2 \u003d len;"},{"line_number":743,"context_line":"\t\t\t\t\t\t\tfileio_info-\u003eparam_3 \u003d open_modeflags[mode];"},{"line_number":744,"context_line":"\t\t\t\t\t\t\tfileio_info-\u003eparam_4 \u003d 0644;"},{"line_number":745,"context_line":"\t\t\t\t\t\t}"},{"line_number":746,"context_line":"\t\t\t\t\t} else {"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"1bae0d67_30ba5d07","line":743,"updated":"2022-03-03 15:18:43.000000000","message":"As far as I understand, here the \"mode\" encoded for arm semihosting is sent to GDB, so have to follow the GDB encoding. The patch is correct, but here only!","commit_id":"dbbac5f11d662ab0827a997aa5d173fd62c51708"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fed049511500ec5209f9cc15d3e6c2a83d963c0c","unresolved":true,"context_lines":[{"line_number":774,"context_line":"\t\t\t\t\t\t\t * written file */"},{"line_number":775,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":776,"context_line":"\t\t\t\t\t\t\t\t\topen_modeflags[mode],"},{"line_number":777,"context_line":"\t\t\t\t\t\t\t\t\t0644);"},{"line_number":778,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003esys_errno \u003d errno;"},{"line_number":779,"context_line":"\t\t\t\t\t\t\tLOG_DEBUG(\"open(\u0027%s\u0027)\u003d%d\", fn,"},{"line_number":780,"context_line":"\t\t\t\t\t\t\t\t(int)semihosting-\u003eresult);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"77ac7ee4_46aa0fce","line":777,"updated":"2022-03-03 15:18:43.000000000","message":"Here, instead, the open is local, and depends on the local host\u0027s OS! We cannot use GDB encoding but we need the original values before this patch!\nI think we need to differentiate between two conversions:\n- line 743 open_gdb_modeflags[mode]\n- line 776 open_host_modeflags[mode]","commit_id":"dbbac5f11d662ab0827a997aa5d173fd62c51708"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"cf18f38d8221197d01f09aed6a7d43065c3a2eed","unresolved":true,"context_lines":[{"line_number":774,"context_line":"\t\t\t\t\t\t\t * written file */"},{"line_number":775,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":776,"context_line":"\t\t\t\t\t\t\t\t\topen_modeflags[mode],"},{"line_number":777,"context_line":"\t\t\t\t\t\t\t\t\t0644);"},{"line_number":778,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003esys_errno \u003d errno;"},{"line_number":779,"context_line":"\t\t\t\t\t\t\tLOG_DEBUG(\"open(\u0027%s\u0027)\u003d%d\", fn,"},{"line_number":780,"context_line":"\t\t\t\t\t\t\t\t(int)semihosting-\u003eresult);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"c5abe59d_48239753","line":777,"in_reply_to":"67221003_c8461784","updated":"2022-03-04 06:42:24.000000000","message":"\u003e I think we need to differentiate between two conversions: line 743 open_gdb_modeflags[mode], line 776 open_host_modeflags[mode]\n\nI\u0027ve checked this visually and agree this is a correct solution. Thank you for investigating.","commit_id":"dbbac5f11d662ab0827a997aa5d173fd62c51708"},{"author":{"_account_id":1001964,"name":"Erhan Kurubas","display_name":"Erhan Kurubas","email":"erhan.kurubas@espressif.com","username":"erhankur"},"change_message_id":"685d051b6e7a9c40daaf1b210f93042464694ab6","unresolved":true,"context_lines":[{"line_number":774,"context_line":"\t\t\t\t\t\t\t * written file */"},{"line_number":775,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003eresult \u003d open((char *)fn,"},{"line_number":776,"context_line":"\t\t\t\t\t\t\t\t\topen_modeflags[mode],"},{"line_number":777,"context_line":"\t\t\t\t\t\t\t\t\t0644);"},{"line_number":778,"context_line":"\t\t\t\t\t\t\tsemihosting-\u003esys_errno \u003d errno;"},{"line_number":779,"context_line":"\t\t\t\t\t\t\tLOG_DEBUG(\"open(\u0027%s\u0027)\u003d%d\", fn,"},{"line_number":780,"context_line":"\t\t\t\t\t\t\t\t(int)semihosting-\u003eresult);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"67221003_c8461784","line":777,"in_reply_to":"77ac7ee4_46aa0fce","updated":"2022-03-03 17:35:13.000000000","message":"Yes.I agree with the suggestion.","commit_id":"dbbac5f11d662ab0827a997aa5d173fd62c51708"}]}
