)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"ebda39ee800e663d0cc7ca6eb1ee39ac93c39b27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"0577a136_d9b92a68","updated":"2026-05-29 13:51:57.000000000","message":"LGTM. Thanks for the fix!\n\nThough I\u0027d prefer `GDB_REGNO_DSCRATCH0` dropped altogether -- it is not used in any meaningful way.\n\nGenerally, I believe we should only cache CSRs if a performance gain is expected (e.g. we are accessing them internally). Caching registers \"just because\" is IMHO asking for trouble.\n\nOn that note: what do you think about dropping stopping to cache `vstart`, `vxsat`, `vxrm` -- these are not accessed unless a user asks to.\n\nAlso `mepc` caching seems unnecessary: it is only accessed when an algorithm ran is timed out to log the value.\n\nTo sum up -- it seems minimizing the set of cached CSRs is a worthwhile endeavor that can improve the robustness of OpenOCD.\n\nWhat do you think?","commit_id":"cb1c25363fc68bee15bc92796dd5e0bbd2e080ed"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"7eeac643e2108d56a5b49ec107a22a76da6812fd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"42c8ff39_b9573e9d","in_reply_to":"0577a136_d9b92a68","updated":"2026-06-01 07:12:45.000000000","message":"Hi Evgeniy,\n\nthank you for reviewing this patch.\n\n\u003e Evgeniy: I\u0027d prefer GDB_REGNO_DSCRATCH0 dropped altogether (...)\n\nQuite surprisingly, the `dscratch` registers will become essential for certain debug actions on CPUs that have the RISC-V CHERI extension (see [1]). So I would prefer to keep them in the list.\n\n[1] https://riscv.github.io/riscv-cheri/snapshot/riscv-cheri-full/#_integrating_rvy_with_sdext\n\n\u003e Evgeniy: what do you think about dropping stopping to cache vstart, vxsat, vxrm (...)\n\n\u003e Evgeniy: Also mepc caching seems unnecessary (...)\n\n\u003e Evgeniy: To sum up -- it seems minimizing the set of cached CSRs is a worthwhile endeavor that can improve the robustness of OpenOCD.\n\nAbout the concrete registers you mentioned: I don\u0027t know out of top of my head, would need to take a closer look, but what you suggest sounds reasonable.\n\nAnyway, I am very much in favor of reducing the register caching in favor of robustness, algorithm simplicity and code simplicity!","commit_id":"cb1c25363fc68bee15bc92796dd5e0bbd2e080ed"}]}
