)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"3042f4515cc7bf5fe9e83e3d26f2cfdf871511a4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8744f9b1_b332e524","updated":"2021-11-09 10:23:24.000000000","message":"thanks Tomas !","commit_id":"38b2ec0f2828584375be2899ee2e658d49186327"}],"src/target/cortex_m.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"84d804ad0b5a1764ff61465cbba4d4c57f360a6c","unresolved":false,"context_lines":[{"line_number":672,"context_line":""},{"line_number":673,"context_line":"\tif (target-\u003estate \u003d\u003d TARGET_UNKNOWN) {"},{"line_number":674,"context_line":"\t\t/* check if processor is retiring instructions or sleeping */"},{"line_number":675,"context_line":"\t\tif (cortex_m-\u003edcb_dhcsr \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {"},{"line_number":676,"context_line":"\t\t\ttarget-\u003estate \u003d TARGET_RUNNING;"},{"line_number":677,"context_line":"\t\t\tretval \u003d ERROR_OK;"},{"line_number":678,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_23cea2ba","line":675,"updated":"2021-05-05 21:34:34.000000000","message":"S_RETIRE_ST is the other sticky bit\nShould be handled as S_RESET_ST ?\nif (cortex_m-\u003edcb_dhcsr_cumulated_sticky \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {\ncortex_m-\u003edcb_dhcsr_cumulated_sticky \u0026\u003d ~S_RETIRE_ST;","commit_id":"e0abf4015f4bce67dc5ca3275d472fd6b24f00a7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"16b2dccb005028af57b168ebdfe4935e2979a5e3","unresolved":false,"context_lines":[{"line_number":672,"context_line":""},{"line_number":673,"context_line":"\tif (target-\u003estate \u003d\u003d TARGET_UNKNOWN) {"},{"line_number":674,"context_line":"\t\t/* check if processor is retiring instructions or sleeping */"},{"line_number":675,"context_line":"\t\tif (cortex_m-\u003edcb_dhcsr \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {"},{"line_number":676,"context_line":"\t\t\ttarget-\u003estate \u003d TARGET_RUNNING;"},{"line_number":677,"context_line":"\t\t\tretval \u003d ERROR_OK;"},{"line_number":678,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_e3c73a99","line":675,"in_reply_to":"aedf27f1_23cea2ba","updated":"2021-05-05 21:55:36.000000000","message":"Unlike S_RESET_ST here we test if the target *is* running now, not if it has been running (possibly in the past). Instructions are typically processed much faster than OpenOCD can read DHCSR so S_RETIRE_ST is read always 1. That\u0027s why I decided not to use the cumulated value.\nIf you agree with my explanation I\u0027ll add it to a comment.","commit_id":"e0abf4015f4bce67dc5ca3275d472fd6b24f00a7"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"752e2a4cbf53b02eda0596da340c4be075bdec3f","unresolved":false,"context_lines":[{"line_number":672,"context_line":""},{"line_number":673,"context_line":"\tif (target-\u003estate \u003d\u003d TARGET_UNKNOWN) {"},{"line_number":674,"context_line":"\t\t/* check if processor is retiring instructions or sleeping */"},{"line_number":675,"context_line":"\t\tif (cortex_m-\u003edcb_dhcsr \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {"},{"line_number":676,"context_line":"\t\t\ttarget-\u003estate \u003d TARGET_RUNNING;"},{"line_number":677,"context_line":"\t\t\tretval \u003d ERROR_OK;"},{"line_number":678,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_a35052da","line":675,"in_reply_to":"aedf27f1_e3c73a99","updated":"2021-05-05 23:10:55.000000000","message":"Yes, should be correct.\nI cannot imagine any corner case that arrives here with the sticky cleared.","commit_id":"e0abf4015f4bce67dc5ca3275d472fd6b24f00a7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c56884405c1a30dbb38e3fec6d74634c0432744f","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"\t\t\t\tarmv7m-\u003edebug_ap-\u003etar_autoincr_block \u003d (1 \u003c\u003c 10);"},{"line_number":2092,"context_line":"\t\t}"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"\t\tretval \u003d target_read_u32(target, DCB_DHCSR, \u0026cortex_m-\u003edcb_dhcsr);"},{"line_number":2095,"context_line":"\t\tif (retval !\u003d ERROR_OK)"},{"line_number":2096,"context_line":"\t\t\treturn retval;"},{"line_number":2097,"context_line":"\t\tcortex_m_cumulate_dhcsr_sticky(cortex_m, cortex_m-\u003edcb_dhcsr);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_83b74ed3","line":2094,"range":{"start_line":2094,"start_character":11,"end_line":2094,"end_character":26},"updated":"2021-05-07 19:30:11.000000000","message":"Here mem_ap_read_atomic_u32() is not possible as cortex_m_examine() works for hla adapters as well.","commit_id":"9b8a839fc5d09c3927b71a42613989d3b0b72f4f"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"58e1d5a6436004ede71a734f8e2c1fc11b2b1d4b","unresolved":true,"context_lines":[{"line_number":142,"context_line":"\t\treturn retval;"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"\tcortex_m_cumulate_dhcsr_sticky(cortex_m, cortex_m-\u003edcb_dhcsr);"},{"line_number":145,"context_line":"\treturn retval;"},{"line_number":146,"context_line":"}"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"static int cortex_m_load_core_reg_u32(struct target *target,"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"3c46e0e0_037759a9","line":145,"updated":"2021-11-08 22:00:11.000000000","message":"This could be directly\nreturn ERROR_OK;\nbut not really a blocking point","commit_id":"fc71bf0108d29c3b8bd07b3a193076a8f0f35ecf"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67c86fb10c84f57d40379b860e8337943f545186","unresolved":false,"context_lines":[{"line_number":142,"context_line":"\t\treturn retval;"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"\tcortex_m_cumulate_dhcsr_sticky(cortex_m, cortex_m-\u003edcb_dhcsr);"},{"line_number":145,"context_line":"\treturn retval;"},{"line_number":146,"context_line":"}"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"static int cortex_m_load_core_reg_u32(struct target *target,"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"9984beb0_ff4d1c37","line":145,"in_reply_to":"3c46e0e0_037759a9","updated":"2021-11-09 09:07:20.000000000","message":"Ack","commit_id":"fc71bf0108d29c3b8bd07b3a193076a8f0f35ecf"},{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"e46d0fa205a9846089b8f08ae73192361b8b3c1a","unresolved":true,"context_lines":[{"line_number":742,"context_line":""},{"line_number":743,"context_line":"\tif (target-\u003estate \u003d\u003d TARGET_UNKNOWN) {"},{"line_number":744,"context_line":"\t\t/* check if processor is retiring instructions or sleeping */"},{"line_number":745,"context_line":"\t\tif (cortex_m-\u003edcb_dhcsr \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {"},{"line_number":746,"context_line":"\t\t\ttarget-\u003estate \u003d TARGET_RUNNING;"},{"line_number":747,"context_line":"\t\t\tretval \u003d ERROR_OK;"},{"line_number":748,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"66af5c59_dd97fc75","line":745,"range":{"start_line":745,"start_character":6,"end_line":745,"end_character":39},"updated":"2021-11-09 09:44:03.000000000","message":"I\u0027m wondering if we need to use dcb_dhcsr_cumulated_sticky here\nand clear S_RETIRE_ST after it\u0027s checked ?","commit_id":"6deb12a0f29a506817b6179f945263b1e7f27809"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"27a493fb4c1a3c6958c94cdf011b4f8404c4d238","unresolved":true,"context_lines":[{"line_number":742,"context_line":""},{"line_number":743,"context_line":"\tif (target-\u003estate \u003d\u003d TARGET_UNKNOWN) {"},{"line_number":744,"context_line":"\t\t/* check if processor is retiring instructions or sleeping */"},{"line_number":745,"context_line":"\t\tif (cortex_m-\u003edcb_dhcsr \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {"},{"line_number":746,"context_line":"\t\t\ttarget-\u003estate \u003d TARGET_RUNNING;"},{"line_number":747,"context_line":"\t\t\tretval \u003d ERROR_OK;"},{"line_number":748,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"8eb942b8_f1440cc4","line":745,"range":{"start_line":745,"start_character":6,"end_line":745,"end_character":39},"in_reply_to":"66af5c59_dd97fc75","updated":"2021-11-09 09:53:18.000000000","message":"Antonio asked very similar question. See my reply from May 5th.\nI just noticed I promised to extend the comment. I\u0027ll do","commit_id":"6deb12a0f29a506817b6179f945263b1e7f27809"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"de6fff840207007777bd1e86534a2db8b8f60816","unresolved":false,"context_lines":[{"line_number":742,"context_line":""},{"line_number":743,"context_line":"\tif (target-\u003estate \u003d\u003d TARGET_UNKNOWN) {"},{"line_number":744,"context_line":"\t\t/* check if processor is retiring instructions or sleeping */"},{"line_number":745,"context_line":"\t\tif (cortex_m-\u003edcb_dhcsr \u0026 S_RETIRE_ST || cortex_m-\u003edcb_dhcsr \u0026 S_SLEEP) {"},{"line_number":746,"context_line":"\t\t\ttarget-\u003estate \u003d TARGET_RUNNING;"},{"line_number":747,"context_line":"\t\t\tretval \u003d ERROR_OK;"},{"line_number":748,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"6138e427_f9bc5265","line":745,"range":{"start_line":745,"start_character":6,"end_line":745,"end_character":39},"in_reply_to":"8eb942b8_f1440cc4","updated":"2021-11-09 10:28:42.000000000","message":"Done","commit_id":"6deb12a0f29a506817b6179f945263b1e7f27809"}],"src/target/cortex_m.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3a4770e80da5cc972a6111a4ab47e88f00e28ddb","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"\t/* Context information */"},{"line_number":192,"context_line":"\tuint32_t dcb_dhcsr;"},{"line_number":193,"context_line":"\tuint32_t dcb_dhcsr_cumulated_sticky;"},{"line_number":194,"context_line":"\tuint32_t nvic_dfsr;  /* Debug Fault Status Register - shows reason for debug halt */"},{"line_number":195,"context_line":"\tuint32_t nvic_icsr;  /* Interrupt Control State Register - shows active and pending IRQ */"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_6386ea6c","line":193,"updated":"2021-05-05 16:12:48.000000000","message":"maybe we don\u0027t need to add a new field only for the sticky.\nI have an old patch that I have never submitted, with some more aggressive change.","commit_id":"e0abf4015f4bce67dc5ca3275d472fd6b24f00a7"}]}
