)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"8aadcc17b1122060261c799d33bac2c0880cab17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"105d5294_0c08bed1","updated":"2025-11-20 01:44:35.000000000","message":"Imported from\nhttps://github.com/riscv-collab/riscv-openocd/pull/1255","commit_id":"37a5fae1631b55525649c7bd2823576f06f4ae25"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"6b4a55362fa49ad3691aa3c260568139f79d4476","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"64290932_47b231d7","updated":"2026-01-06 09:52:40.000000000","message":"Please remove all periods at the end of sentences from log messages.","commit_id":"70bbf9727baca22cff5c61498b87d5b049f3a0a9"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"2fc83a9433df0daa7ec611285041cf9c55e984c5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"4c550df6_bf1374f5","updated":"2026-05-18 03:11:59.000000000","message":"@Antonio can we merged this?","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"393fb9521ab35dadfb3b3c8076bcadf8157f34f8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"150c3480_8a1a0155","updated":"2026-05-26 08:43:42.000000000","message":"LGTM","commit_id":"aa97a89dcb3e25dbdb095e55bfc8a7ee802a5f12"}],"doc/openocd.texi":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"b1e1c489e502b7705ce40e714d95ce7c44dcf1a3","unresolved":true,"context_lines":[{"line_number":11722,"context_line":"@item @code{-cetrig} @option{off}|@option{on} -- determines how OpenOCD should"},{"line_number":11723,"context_line":"configure the @code{cetrig} in the dcsr register. Defaults to @option{on}."},{"line_number":11724,"context_line":""},{"line_number":11725,"context_line":"@itemize"},{"line_number":11726,"context_line":"@item @code{cget} returns the currently configured state for @code{-cetrig}."},{"line_number":11727,"context_line":"@end itemize"},{"line_number":11728,"context_line":"@end itemize"}],"source_content_type":"text/x-texinfo","patch_set":6,"id":"436ab1a2_118fa418","line":11725,"updated":"2026-05-21 12:30:05.000000000","message":"This `@itemize` seems like a mistake -- AFAIU, you are just continuing an existing list.","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"7b61bc55cfa2abb850992500a8f6755bd6bb4d61","unresolved":false,"context_lines":[{"line_number":11722,"context_line":"@item @code{-cetrig} @option{off}|@option{on} -- determines how OpenOCD should"},{"line_number":11723,"context_line":"configure the @code{cetrig} in the dcsr register. Defaults to @option{on}."},{"line_number":11724,"context_line":""},{"line_number":11725,"context_line":"@itemize"},{"line_number":11726,"context_line":"@item @code{cget} returns the currently configured state for @code{-cetrig}."},{"line_number":11727,"context_line":"@end itemize"},{"line_number":11728,"context_line":"@end itemize"}],"source_content_type":"text/x-texinfo","patch_set":6,"id":"08c85c75_64936120","line":11725,"in_reply_to":"436ab1a2_118fa418","updated":"2026-05-22 02:33:54.000000000","message":"Thanks, done","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"}],"src/target/riscv/riscv-013.c":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"92be15c79b142ea9e5587cf057e6c0e0f9af0828","unresolved":true,"context_lines":[{"line_number":5386,"context_line":"\tcase CSR_DCSR_CAUSE_OTHER:"},{"line_number":5387,"context_line":"\t\tswitch (get_field(dcsr, CSR_DCSR_EXTCAUSE)) {"},{"line_number":5388,"context_line":"\t\tcase 0:"},{"line_number":5389,"context_line":"\t\t\tLOG_TARGET_WARNING(target, \"halted because of hart in a critical error state.\");"},{"line_number":5390,"context_line":"\t\t\treturn RISCV_HALT_CRITICAL_ERROR;"},{"line_number":5391,"context_line":"\t\tdefault:"},{"line_number":5392,"context_line":"\t\t\tLOG_TARGET_ERROR(target, \"Unknown DCSR extcause field: 0x%\""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"ab15c674_dcad968e","line":5389,"updated":"2025-11-20 10:21:44.000000000","message":"Just transferring a [comment from GitHub review](https://github.com/riscv-collab/riscv-openocd/pull/1255#discussion_r2087173459).\n\nI believe this should be an `_INFO` level log, not a warning. From the point of view of the debugger everything is fine.\nFrom `doc/manual/style.txt`:\n```\n- Use `LOG_WARNING()` to inform the user of about an unexpected behavior that can be handled and the intended operation is still be performed. For example, in case a command is deprecated but is nevertheless executed.\n- Use `LOG_INFO()` to provide insightful or necessary information to the user. For example, features or capabilities of a discovered target.\n```\nThere is nothing unexpected from the point of view of the debugger in this behavior. It may be an unexpected behavior for the SW running on the target, but the debugger shouldn\u0027t have any expectations about the software that runs under it.","commit_id":"6f87066e59b9af2b26ee186e3ff8311eaebf9f8c"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"b6e31e9da019e5630a7c09308e395cdc1fbb0065","unresolved":false,"context_lines":[{"line_number":5386,"context_line":"\tcase CSR_DCSR_CAUSE_OTHER:"},{"line_number":5387,"context_line":"\t\tswitch (get_field(dcsr, CSR_DCSR_EXTCAUSE)) {"},{"line_number":5388,"context_line":"\t\tcase 0:"},{"line_number":5389,"context_line":"\t\t\tLOG_TARGET_WARNING(target, \"halted because of hart in a critical error state.\");"},{"line_number":5390,"context_line":"\t\t\treturn RISCV_HALT_CRITICAL_ERROR;"},{"line_number":5391,"context_line":"\t\tdefault:"},{"line_number":5392,"context_line":"\t\t\tLOG_TARGET_ERROR(target, \"Unknown DCSR extcause field: 0x%\""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"67587672_0ade5265","line":5389,"in_reply_to":"ab15c674_dcad968e","updated":"2025-11-21 01:17:57.000000000","message":"Done","commit_id":"6f87066e59b9af2b26ee186e3ff8311eaebf9f8c"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"b1e1c489e502b7705ce40e714d95ce7c44dcf1a3","unresolved":true,"context_lines":[{"line_number":1705,"context_line":"\tif (dcsr !\u003d original_dcsr \u0026\u0026"},{"line_number":1706,"context_line":"\t\t\triscv_reg_set(target, GDB_REGNO_DCSR, dcsr) !\u003d ERROR_OK)"},{"line_number":1707,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1708,"context_line":"\t// TODO: Read back the DCSR and check if these WARL bits are set as the user intended."},{"line_number":1709,"context_line":"\tinfo-\u003edcsr_register_is_set \u003d true;"},{"line_number":1710,"context_line":"\treturn ERROR_OK;"},{"line_number":1711,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"1491d9bd_3115635f","line":1708,"updated":"2026-05-21 12:30:05.000000000","message":"This seems a bit counter-intuitive. We should attempt to report this issue when setting these controls or when examining the target.","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"7b61bc55cfa2abb850992500a8f6755bd6bb4d61","unresolved":true,"context_lines":[{"line_number":1705,"context_line":"\tif (dcsr !\u003d original_dcsr \u0026\u0026"},{"line_number":1706,"context_line":"\t\t\triscv_reg_set(target, GDB_REGNO_DCSR, dcsr) !\u003d ERROR_OK)"},{"line_number":1707,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1708,"context_line":"\t// TODO: Read back the DCSR and check if these WARL bits are set as the user intended."},{"line_number":1709,"context_line":"\tinfo-\u003edcsr_register_is_set \u003d true;"},{"line_number":1710,"context_line":"\treturn ERROR_OK;"},{"line_number":1711,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"e3d52c43_8557ed60","line":1708,"in_reply_to":"1491d9bd_3115635f","updated":"2026-05-22 02:33:54.000000000","message":"\u003e We should attempt to report this issue when setting these controls\n\nI don\u0027t quite understand what you mean. Didn\u0027t we plan to do it this way? It\u0027s just that we didn\u0027t do it on this PR, but make a TODO comment here.","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"393fb9521ab35dadfb3b3c8076bcadf8157f34f8","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"\tif (dcsr !\u003d original_dcsr \u0026\u0026"},{"line_number":1706,"context_line":"\t\t\triscv_reg_set(target, GDB_REGNO_DCSR, dcsr) !\u003d ERROR_OK)"},{"line_number":1707,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1708,"context_line":"\t// TODO: Read back the DCSR and check if these WARL bits are set as the user intended."},{"line_number":1709,"context_line":"\tinfo-\u003edcsr_register_is_set \u003d true;"},{"line_number":1710,"context_line":"\treturn ERROR_OK;"},{"line_number":1711,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"6f0fe532_b1382e61","line":1708,"in_reply_to":"e3d52c43_8557ed60","updated":"2026-05-26 08:43:42.000000000","message":"Oh, sorry. I have forgotten about this)","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"}],"src/target/riscv/riscv.c":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"d65425fdbf2aa1bf4c7591acbfa12be0036da7fd","unresolved":true,"context_lines":[{"line_number":645,"context_line":"{"},{"line_number":646,"context_line":"\tconst char *cetrig_opt \u003d jim_nvp_value2name_simple(nvp_cetrig_opts,"},{"line_number":647,"context_line":"\t\t\tconfig-\u003edcsr_cetrig)-\u003ename;"},{"line_number":648,"context_line":"\tJim_SetResultString(interp, cetrig_opt, strlen(cetrig_opt));"},{"line_number":649,"context_line":"\treturn JIM_OK;"},{"line_number":650,"context_line":"}"},{"line_number":651,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"1bd06bb5_b1d90e56","line":648,"updated":"2025-11-20 10:27:57.000000000","message":"I\u0027d suggest using\n```\nJim_SetResultString(interp, cetrig_opt, -1);\n```\nIt has the same effect, but is a bit more concise.","commit_id":"6f87066e59b9af2b26ee186e3ff8311eaebf9f8c"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"b6e31e9da019e5630a7c09308e395cdc1fbb0065","unresolved":false,"context_lines":[{"line_number":645,"context_line":"{"},{"line_number":646,"context_line":"\tconst char *cetrig_opt \u003d jim_nvp_value2name_simple(nvp_cetrig_opts,"},{"line_number":647,"context_line":"\t\t\tconfig-\u003edcsr_cetrig)-\u003ename;"},{"line_number":648,"context_line":"\tJim_SetResultString(interp, cetrig_opt, strlen(cetrig_opt));"},{"line_number":649,"context_line":"\treturn JIM_OK;"},{"line_number":650,"context_line":"}"},{"line_number":651,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"709d22ba_e817b891","line":648,"in_reply_to":"1bd06bb5_b1d90e56","updated":"2025-11-21 01:17:57.000000000","message":"Done","commit_id":"6f87066e59b9af2b26ee186e3ff8311eaebf9f8c"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"b1e1c489e502b7705ce40e714d95ce7c44dcf1a3","unresolved":true,"context_lines":[{"line_number":486,"context_line":"\tfor (unsigned int i \u003d 0; i \u003c ARRAY_SIZE(config-\u003edcsr_ebreak_fields); ++i)"},{"line_number":487,"context_line":"\t\tconfig-\u003edcsr_ebreak_fields[i] \u003d true;"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"\tconfig-\u003edcsr_cetrig \u003d true;"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"\treturn config;"},{"line_number":492,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"03347930_79ddcb67","line":489,"updated":"2026-05-21 12:30:05.000000000","message":"I don\u0027t think it should default to `true`.\n1. The `dcsr.cetrig` bit is optional.\n2. Changing it to `false` will preserve the current behavior.\n3. This differs from the reset value.","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"7b61bc55cfa2abb850992500a8f6755bd6bb4d61","unresolved":false,"context_lines":[{"line_number":486,"context_line":"\tfor (unsigned int i \u003d 0; i \u003c ARRAY_SIZE(config-\u003edcsr_ebreak_fields); ++i)"},{"line_number":487,"context_line":"\t\tconfig-\u003edcsr_ebreak_fields[i] \u003d true;"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"\tconfig-\u003edcsr_cetrig \u003d true;"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"\treturn config;"},{"line_number":492,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"73331db8_0d9efc6d","line":489,"in_reply_to":"03347930_79ddcb67","updated":"2026-05-22 02:33:54.000000000","message":"Done","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"b1e1c489e502b7705ce40e714d95ce7c44dcf1a3","unresolved":true,"context_lines":[{"line_number":2641,"context_line":"\t\tbreak;"},{"line_number":2642,"context_line":"\tcase RISCV_HALT_INTERRUPT:"},{"line_number":2643,"context_line":"\tcase RISCV_HALT_GROUP:"},{"line_number":2644,"context_line":"\tcase RISCV_HALT_CRITICAL_ERROR:"},{"line_number":2645,"context_line":"\t\ttarget-\u003edebug_reason \u003d DBG_REASON_DBGRQ;"},{"line_number":2646,"context_line":"\t\tbreak;"},{"line_number":2647,"context_line":"\tcase RISCV_HALT_SINGLESTEP:"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"3f8442da_33b537d8","line":2644,"updated":"2026-05-21 12:30:05.000000000","message":"To me it seems like `DBG_REASON_EXC_CATCH` is better suited for this case.","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"},{"author":{"_account_id":1002315,"name":"liangzhen","email":"zhen.liang@spacemit.com","username":"liangzhen"},"change_message_id":"7b61bc55cfa2abb850992500a8f6755bd6bb4d61","unresolved":false,"context_lines":[{"line_number":2641,"context_line":"\t\tbreak;"},{"line_number":2642,"context_line":"\tcase RISCV_HALT_INTERRUPT:"},{"line_number":2643,"context_line":"\tcase RISCV_HALT_GROUP:"},{"line_number":2644,"context_line":"\tcase RISCV_HALT_CRITICAL_ERROR:"},{"line_number":2645,"context_line":"\t\ttarget-\u003edebug_reason \u003d DBG_REASON_DBGRQ;"},{"line_number":2646,"context_line":"\t\tbreak;"},{"line_number":2647,"context_line":"\tcase RISCV_HALT_SINGLESTEP:"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"9a73addd_6999be1b","line":2644,"in_reply_to":"3f8442da_33b537d8","updated":"2026-05-22 02:33:54.000000000","message":"Thanks, done","commit_id":"5fefdb71f4cfb1a662a082450b8b0c241e9ecece"}]}
