)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"f0dd005d7266698ada627377af611953c8e9b278","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d450370a_31a5ce22","updated":"2022-02-25 20:21:30.000000000","message":"Although LGTM, I propose to postpone this patch after 0.12 release.\nThe reasons to do so are similar as those listed in 6548: target: reset target examined flag if target::examine() fails | https://review.openocd.org/c/openocd/+/6548\nand 6753: Revert \"target: reset target examined flag if target::examine() fails\" | https://review.openocd.org/c/openocd/+/6753\n\nFirst we should make sure the target_examined flag usage is homogeneous and clear in all targets and then make such changes.","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"5a828126e7435e388f2da13b5b96fd9bf4984c49","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"278b687c_0dc82a4d","updated":"2022-05-03 20:28:23.000000000","message":"https://review.openocd.org/c/openocd/+/6964 should be discussed first before we can do anything more with this change.","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"4bfd751689a133e115583a6a8240c9a6e9735eca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8c5509d4_681082f3","in_reply_to":"c9a454d6_7602e144","updated":"2022-05-03 07:23:23.000000000","message":"Sorry Tim, I was convinced that 0.12 rc1 is question of weeks. I was too optimistic.\n\nI looked at the patch more carefully today.","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"b08fabb030a1962c88cd7b77c990111ec86fc6db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c9a454d6_7602e144","in_reply_to":"d450370a_31a5ce22","updated":"2022-04-20 17:08:04.000000000","message":"That makes sense, but when will 0.12 be? I really want to upstream as much of riscv-openocd as possible. Whenever merges like this get put off, it means more work down the line, dealing with possible future conflicts, etc. This change fixes a bug for me.","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"}],"src/target/target.c":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"4bfd751689a133e115583a6a8240c9a6e9735eca","unresolved":true,"context_lines":[{"line_number":3032,"context_line":"\t\t\tis_jtag_poll_safe() \u0026\u0026 target;"},{"line_number":3033,"context_line":"\t\t\ttarget \u003d target-\u003enext) {"},{"line_number":3034,"context_line":""},{"line_number":3035,"context_line":"\t\tif (!target_was_examined(target))"},{"line_number":3036,"context_line":"\t\t\tcontinue;"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"\t\tif (!target-\u003etap-\u003eenabled)"},{"line_number":3039,"context_line":"\t\t\tcontinue;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"ad836f27_78a5a7de","line":3036,"range":{"start_line":3035,"start_character":0,"end_line":3036,"end_character":12},"updated":"2022-05-03 07:23:23.000000000","message":"This should ensure (on per target basis) what your patch is trying to do (globally). As I described in late comments to\n6548: target: reset target examined flag if target::examine() fails | https://review.openocd.org/c/openocd/+/6548\nthe examine logic is very buggy.\nI would prefer to rework the examine logic over adding new hacks and further complicate the code.\n\nBy the way, can you replicate too early re-examination without this patch and with already merged\n 6548: target: reset target examined flag if target::examine() fails | https://review.openocd.org/c/openocd/+/6548\n?","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"5a828126e7435e388f2da13b5b96fd9bf4984c49","unresolved":true,"context_lines":[{"line_number":3032,"context_line":"\t\t\tis_jtag_poll_safe() \u0026\u0026 target;"},{"line_number":3033,"context_line":"\t\t\ttarget \u003d target-\u003enext) {"},{"line_number":3034,"context_line":""},{"line_number":3035,"context_line":"\t\tif (!target_was_examined(target))"},{"line_number":3036,"context_line":"\t\t\tcontinue;"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"\t\tif (!target-\u003etap-\u003eenabled)"},{"line_number":3039,"context_line":"\t\t\tcontinue;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"94c202de_8f5c3d40","line":3036,"range":{"start_line":3035,"start_character":0,"end_line":3036,"end_character":12},"in_reply_to":"45acbb6f_9f849b08","updated":"2022-05-03 20:28:23.000000000","message":"OK. I removed the highlighted lines in riscv-openocd fork, for the following case:\n\nMulti-core target. When OpenOCD connects, one core is running normally, and the others are held in reset. For the cores that are held in reset, examine() fails. I made a change to make sure examine() is called repeatedly, so that it ends up being called when the targets come out of reset. I\u0027ll see if I can upstream that change first, and in reading that code hopefully we can figure out why it caused the bug which I then fixed with this change (which hopefully won\u0027t be necessary anymore).","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"},{"author":{"_account_id":1001242,"name":"Tim Newsome","email":"tim@sifive.com","username":"timsifive"},"change_message_id":"eee28aa0a36b6bd611cc06e7da409ebbda0532b1","unresolved":true,"context_lines":[{"line_number":3032,"context_line":"\t\t\tis_jtag_poll_safe() \u0026\u0026 target;"},{"line_number":3033,"context_line":"\t\t\ttarget \u003d target-\u003enext) {"},{"line_number":3034,"context_line":""},{"line_number":3035,"context_line":"\t\tif (!target_was_examined(target))"},{"line_number":3036,"context_line":"\t\t\tcontinue;"},{"line_number":3037,"context_line":""},{"line_number":3038,"context_line":"\t\tif (!target-\u003etap-\u003eenabled)"},{"line_number":3039,"context_line":"\t\t\tcontinue;"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"45acbb6f_9f849b08","line":3036,"range":{"start_line":3035,"start_character":0,"end_line":3036,"end_character":12},"in_reply_to":"ad836f27_78a5a7de","updated":"2022-05-03 17:27:01.000000000","message":"I don\u0027t have a way to reproduce the behavior. It was based on a user report: https://github.com/riscv/riscv-openocd/issues/663\n\nI don\u0027t have the few lines you highlighted in target.c in the riscv-openocd fork. Looks like I removed it in https://github.com/riscv/riscv-openocd/pull/654, which is what the user identified as the source of the problem. So probably I can fix things by reintroducing those lines.\n\nI\u0027m going to dig into this more. Thank you for pointing out how this is really supposed to work.","commit_id":"930ea439f0e5b2cc452c23d3aaffa699b15940a7"}]}
