)]}'
{"src/target/breakpoints.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"e7d5523a0f992dfa9c50fd4bcffdec60883a57f2","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"d268f56e_efd72077","line":217,"updated":"2025-05-19 11:47:31.000000000","message":"Same comment as previous patch. What about targets not examined?","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"5600be9bf32b82562da0baa68bddf24fe8f9a2cb","unresolved":false,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"0c2d4d41_a03aab35","line":217,"in_reply_to":"66bf3933_72b94b72","updated":"2025-10-22 15:46:19.000000000","message":"I reduced this import to minor change of text describing reason why breakpoint was not set.\n\nBreakpoints on unavailable targets are now handled the new patches\n9125: target/breakpoints: breakpoint_add() rework | https://review.openocd.org/c/openocd/+/9125\n9126: target/riscv: return ERROR_BREAKPOINT_NOT_SET_TRY_NEXT_SMP_CORE | https://review.openocd.org/c/openocd/+/9126","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"7f260954ee2db4f97a71e3978114d8c9c37662df","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"bf85aa57_bc72666c","line":217,"in_reply_to":"710c81b1_bd8dee81","updated":"2025-05-26 07:31:22.000000000","message":"Antonio,\nbreakpoint.c is full of copy\u0026paste mess. I propose to extend\n`enum breakpoint_type` to distinguish also `BKPT_HARD_CONTEXT` and `BKPT_HARD_HYBRID`. Then we can replace context and hybrid specific handling\nwith one-for-all `breakpoint_add_ext(target, addr, asid, len, type)` which will be called also from `breakpoint_add()` which will serve as compatibility wrapper.\n\nJust to be sure please confirm: a soft context or soft hybrid breakpoint is nonsense, isn\u0027t it? Both `context_breakpoint_add()` and `hybrid_breakpoint_add()` have `enum breakpoint_type` parameter, however never get called with `BKPT_SOFT`","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"88d4596fcb4db98caae26979591479abc58fddbf","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"710c81b1_bd8dee81","line":217,"in_reply_to":"726fa84e_fbd993b5","updated":"2025-05-25 21:12:11.000000000","message":"I\u0027ll send reworked version","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2fdc2a5cff2f93b886561886ae6f9f21abfc70f6","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"726fa84e_fbd993b5","line":217,"in_reply_to":"b5806254_d7613876","updated":"2025-05-19 14:47:54.000000000","message":"Humm, it depends what is accessible in the debug logic when the target is UNAVAILABLE.\nARMv8/9-A specify some register could still be available even with core powered off. Other architectures could do something similar.\nProbably it is correct to left the target specific code to handle this.\n\nAs an improvement, we should let each target to define a bitmask of properties:\n- HW bp/wp can be set/clear at target running\n- HW bp/wp can be set/clear at target unavailable\n- mem accessible at target running\n- core registers accessible at target running\n- ...\nand the centralize the check.\nSpecific target can have finer granularity by setting all available and checking in the target specific code.","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea028c99ea69375d97e5c6db6a4b653fd35390c0","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"c57101d6_9c58ce78","line":217,"in_reply_to":"bf85aa57_bc72666c","updated":"2025-06-07 08:36:34.000000000","message":"We need an update on the doc, as context and hybrid BP are not covered!\nI\u0027m thinking if we can emulate a SW context and hybrid BP, but I think it\u0027s impossible!\n\nContext BP halts when entering a specific context. I don\u0027t see a way to do it without HW support. Intercepting all the exceptions? Maybe this could be a workaround for specific CPU, but not for general OpenOCD code.\n\nFor SW hybrid BP we should make OpenOCD changing context to get the right MMU settings, then set the SW BP, then switch back. Complex, plus the specific context could be not started yet or not loaded in memory yet, or get swapped out...","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"2346be0523c125b8c2825d2102e310e9e4642351","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"66bf3933_72b94b72","line":217,"in_reply_to":"c57101d6_9c58ce78","updated":"2025-06-10 12:39:23.000000000","message":"\u003e We need an update on the doc, as context and hybrid BP are not covered!\n\nYup, I noticed too.\nSee 8934: doc: fix bp usage | https://review.openocd.org/c/openocd/+/8934\n\n\u003e For SW hybrid BP we should make OpenOCD changing context to get the right MMU settings, then set the SW BP, then switch back. Complex, plus the specific context could be not started yet or not loaded in memory yet, or get swapped out...\n\nHmmm, in theory feasible. I\u0027d better leave the independent soft breakpoint flag as is.","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"467778c5fa3905bf7486dccae23127f62d6d722e","unresolved":true,"context_lines":[{"line_number":214,"context_line":"\t\tstruct target_list *head;"},{"line_number":215,"context_line":"\t\tforeach_smp_target(head, target-\u003esmp_targets) {"},{"line_number":216,"context_line":"\t\t\tstruct target *curr \u003d head-\u003etarget;"},{"line_number":217,"context_line":"\t\t\tif (curr-\u003estate \u003d\u003d TARGET_UNAVAILABLE)"},{"line_number":218,"context_line":"\t\t\t\tcontinue;"},{"line_number":219,"context_line":"\t\t\tint retval \u003d breakpoint_add_internal(curr, address, length, type);"},{"line_number":220,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"b5806254_d7613876","line":217,"in_reply_to":"d268f56e_efd72077","updated":"2025-05-19 13:50:16.000000000","message":"I\u0027m little bit unsure here.\nHere at target layer we don\u0027t know the details how target availability is related to bp/wp logic state. This code is fitted to RISC-V but would fit others as well?\nShould not we take a more general approach and call `breakpoint_add_internal()` unconditionally and let the target specific code to decide what to do in what target state? Similarly as we do not check here if target is halted...","commit_id":"ea98a805b5510b297bef87c7c38988b149f94f0f"}]}
