)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"4e2401bfd985448e911e12217c53049820287dcd","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2025-11-17 16:48:02 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"target.c: add warn about overwriting a breakpoint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Call function \u0027is_breakpoint_in_range()\u0027 in handler_load_image_command for"},{"line_number":10,"context_line":"detecting breakpoint memory overwriting."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"c19209a7_a01a14f7","line":7,"updated":"2025-11-22 20:05:13.000000000","message":"Please change it:\n`target: warn when image load overwrites a breakpoint`","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"e344b251e13e2eaaaa772ab27593053d1e9fb3e8","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2025-11-17 16:48:02 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"target.c: add warn about overwriting a breakpoint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Call function \u0027is_breakpoint_in_range()\u0027 in handler_load_image_command for"},{"line_number":10,"context_line":"detecting breakpoint memory overwriting."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ce061dd5_5dd427c7","line":7,"in_reply_to":"c19209a7_a01a14f7","updated":"2025-11-27 13:41:26.000000000","message":"Done","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a8b470173da664606c7caade20b729e871bdb44e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2025-11-17 16:48:02 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"target.c: add warn about overwriting a breakpoint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Call function \u0027is_breakpoint_in_range()\u0027 in handler_load_image_command for"},{"line_number":10,"context_line":"detecting breakpoint memory overwriting."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"c3170f73_dbf169c3","line":7,"in_reply_to":"ce061dd5_5dd427c7","updated":"2026-09-01 22:44:13.000000000","message":"Done","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"e1f4c8c8177071d9c8876f62ff4921828674f75b","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2026-09-16 16:59:17 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"target: warn when image load overwrites a breakpoint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Call function \u0027is_breakpoint_in_range()\u0027 in handler_load_image_command for"},{"line_number":10,"context_line":"detecting breakpoint memory overwriting."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"d53df849_a1ad5bcc","line":7,"updated":"2026-09-20 15:00:34.000000000","message":"Actually it is not a warning, but the image load returns error, associated with an error message. What about:\n`target: prevent image load to overwrite a breakpoint`\n?","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2026-09-16 16:59:17 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"target: warn when image load overwrites a breakpoint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Call function \u0027is_breakpoint_in_range()\u0027 in handler_load_image_command for"},{"line_number":10,"context_line":"detecting breakpoint memory overwriting."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"262215e0_8f84e50d","line":7,"in_reply_to":"567f16d2_a031a288","updated":"2026-09-24 14:50:53.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"8e257cdea106baa15fb5943084483bca6d8626d0","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Kulyatskaya Alexandra \u003ca.kulyatskaya@syntacore.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2026-09-16 16:59:17 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"target: warn when image load overwrites a breakpoint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Call function \u0027is_breakpoint_in_range()\u0027 in handler_load_image_command for"},{"line_number":10,"context_line":"detecting breakpoint memory overwriting."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"567f16d2_a031a288","line":7,"in_reply_to":"d53df849_a1ad5bcc","updated":"2026-09-24 14:04:38.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"35a98caafbe6dd9ebb0037eb20236f6af00afe23","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"69b1dcbf_d8a78d79","updated":"2026-02-12 16:11:32.000000000","message":"@Antonio, could you please check it again?","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"ecc2273aab8766e8c350c4e8a3007161eafaf755","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"dc2efe1b_8c9a46d1","updated":"2026-04-17 11:34:46.000000000","message":"@Antonio, could you please check?","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"55b524cae36f42417e4e806ee7a0b310e935ec3f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"818857f5_a7aa5996","updated":"2026-09-03 06:01:33.000000000","message":"Be aware that there is also `fast_load` command.\nHonestly I never used it and I doubt that the speedup is substantial even if you really need to load the same image more than once. The bottle neck is usually between OpenOCD and the device debugged.\n\nAntonio, what is you opinion, could we deprecate `fast_load` and `fast_load_image`?","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"a3fd9e36a905431b224f21d2cafff2ae81b7aa8f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"2dd1b122_d9a34bc0","updated":"2026-03-20 11:17:07.000000000","message":"gentle ping","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"c39518426514442e48ca99f0c923473750de617a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"46bcab15_f9efc0d1","updated":"2026-07-02 08:48:41.000000000","message":"gentle ping","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"adacb84849f53983f385abfd8849da4f42a05897","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"58451c41_e7cddc5b","updated":"2026-02-26 17:03:48.000000000","message":"gentle ping","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"91424052184d4b8ab090abe775bb64b286f848aa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"657383e2_435f48f0","updated":"2026-05-12 09:54:54.000000000","message":"gentle ping","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"246697c7d61ee68a026c8bbc9409d1d302e9d7c1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"df09050b_07a09ac1","updated":"2026-08-25 07:52:51.000000000","message":"gentle ping","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"71982aaed55a23f96fa34ccfebfeeb5cf0d8605d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"e3f3d8a1_08c560e2","in_reply_to":"3c56a2e2_df224a63","updated":"2026-09-03 08:21:43.000000000","message":"+1 for deprecating `fast_load` and `fast_load_image`.","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5a2e74563ea0502ddd29797bfa58600550a15da2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3c56a2e2_df224a63","in_reply_to":"818857f5_a7aa5996","updated":"2026-09-03 08:17:14.000000000","message":"Tomas, I also never used `fast_load` and `fast_load_image`.\nWhile reading the doc again, I don\u0027t consider them really useful. For benchmarking  write-to-target operation I prefer creating a Tcl array of data and measure the time while writing it to target with `write_memory`.\nI\u0027m ok to deprecate them, but in mean time this patch should address `fast_load_image` too. It should be enough to call `detect_breakpoints_in_section()` in the loop of `handle_fast_load_image_command()`.","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"87e0ea08_1d3e96ba","in_reply_to":"908df82f_b0f811a1","updated":"2026-09-24 14:50:53.000000000","message":"Done","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a8b470173da664606c7caade20b729e871bdb44e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1dc498dd_9f5500d8","in_reply_to":"df09050b_07a09ac1","updated":"2026-09-01 22:44:13.000000000","message":"Sorry for this long wait time","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ebc99ff2f4f4240a299f280a1b10e8fa0873db5e","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"908df82f_b0f811a1","in_reply_to":"e3f3d8a1_08c560e2","updated":"2026-09-03 08:51:49.000000000","message":"Please see https://review.openocd.org/c/openocd/+/9953","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"e1f4c8c8177071d9c8876f62ff4921828674f75b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"cb31abe8_a5908f9d","updated":"2026-09-20 15:00:34.000000000","message":"Please notice that this commit does not compile anymore on current master branch.\nIt is still based on upstream commit 88b9bd396d5a that was the master branch on 2025-10-18.\nThe macro `ERROR_TARGET_INTERSECT_BREAKPOINT` does not exist upstream anymore. You should add it again on simply use `ERROR_FAIL`.","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"8e257cdea106baa15fb5943084483bca6d8626d0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"f1658774_e16e99cd","in_reply_to":"cb31abe8_a5908f9d","updated":"2026-09-24 14:04:38.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"8fad150b_876853ad","in_reply_to":"f1658774_e16e99cd","updated":"2026-09-24 14:50:53.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"5bc569d4_98b53778","updated":"2026-09-24 14:50:53.000000000","message":"Thanks.\nTested with `load_image` and fast load.\nI think the error message is misleading and should be changed. After that, I\u0027m fine with this","commit_id":"fb305e6fbe4f20ec37e2bfdeb2fde4ae120342b8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"b318bfd989fd713d64e46d6133efba016aa0bafc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"65ab5923_9120d47e","updated":"2026-10-04 14:24:40.000000000","message":"Thanks!","commit_id":"f4b6f26c797614fc92140702843103d54e4cf35b"}],"src/target/breakpoints.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a8b470173da664606c7caade20b729e871bdb44e","unresolved":true,"context_lines":[{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":"\treturn found_breakpoint;"},{"line_number":66,"context_line":"}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"static int breakpoint_add_internal(struct target *target,"},{"line_number":69,"context_line":"\ttarget_addr_t address,"},{"line_number":70,"context_line":"\tunsigned int length,"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"56b13df3_75c91d50","line":67,"updated":"2026-09-01 22:44:13.000000000","message":"A `COMMAND_HELPER()` returns `int`, not `boot`.\n\nPlus It could be easier to read if written as below, or similar\n```\nCOMMAND_HELPER(detect_breakpoints_in_section, struct target *target,\n\t\tstruct imagesection section)\n{\n\ttarget_addr_t start \u003d section.base_address;\n\tuint32_t length \u003d section.size;\n\tbool found_breakpoint \u003d false;\n\n\tfor (struct breakpoint *bp \u003d target-\u003ebreakpoints; bp; bp \u003d bp-\u003enext)\n\t\tif (is_memory_regions_overlap(start, length, bp-\u003eaddress, bp-\u003elength)) {\n\t\t\tfound_breakpoint \u003d true;\n\t\t\tcommand_print(cmd, \"overwriting ...\");\n\t\t}\n\t\t\n\treturn found_breakpoint ? ERROR_BREAKPOINT_OVERLAPPED : ERROR_OK;\n}\n```\n\nI\u0027m not sure that `ERROR_BREAKPOINT_OVERLAPPED` is the right one. Feel free to change it if you find something more appropriate. `ERROR_FAIL` is also ok.","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"6830dc02943ad03dab2a3509fc47e3efb1d0621a","unresolved":true,"context_lines":[{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":"\treturn found_breakpoint;"},{"line_number":66,"context_line":"}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"static int breakpoint_add_internal(struct target *target,"},{"line_number":69,"context_line":"\ttarget_addr_t address,"},{"line_number":70,"context_line":"\tunsigned int length,"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"f39d6d77_684cb21b","line":67,"in_reply_to":"56b13df3_75c91d50","updated":"2026-09-16 15:16:49.000000000","message":"Done","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"e1f4c8c8177071d9c8876f62ff4921828674f75b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"\t}"},{"line_number":65,"context_line":"\treturn found_breakpoint;"},{"line_number":66,"context_line":"}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"static int breakpoint_add_internal(struct target *target,"},{"line_number":69,"context_line":"\ttarget_addr_t address,"},{"line_number":70,"context_line":"\tunsigned int length,"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"f5abc4f0_6e0d46fd","line":67,"in_reply_to":"f39d6d77_684cb21b","updated":"2026-09-20 15:00:34.000000000","message":"Done","commit_id":"606a84439f1e597a3c5dea662ad20951fc479878"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":true,"context_lines":[{"line_number":47,"context_line":"\tfor (struct breakpoint *bp \u003d target-\u003ebreakpoints; bp; bp \u003d bp-\u003enext)"},{"line_number":48,"context_line":"\t\tif (is_memory_regions_overlap(start, length, bp-\u003eaddress, bp-\u003elength)) {"},{"line_number":49,"context_line":"\t\t\tfound_breakpoint \u003d true;"},{"line_number":50,"context_line":"\t\t\tcommand_print(cmd, \"overwriting a breakpoint at the address: \""},{"line_number":51,"context_line":"\t\t\t\t\tTARGET_ADDR_FMT, bp-\u003eaddress);"},{"line_number":52,"context_line":"\t\t}"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":11,"id":"124a793e_5b107af9","line":50,"updated":"2026-09-24 14:50:53.000000000","message":"we are not overwriting, because the load is stopped and we return error.\nThis should be changed, e.g. as:\n`\"conflicting breakpoint at address: \"","commit_id":"fb305e6fbe4f20ec37e2bfdeb2fde4ae120342b8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"b318bfd989fd713d64e46d6133efba016aa0bafc","unresolved":false,"context_lines":[{"line_number":47,"context_line":"\tfor (struct breakpoint *bp \u003d target-\u003ebreakpoints; bp; bp \u003d bp-\u003enext)"},{"line_number":48,"context_line":"\t\tif (is_memory_regions_overlap(start, length, bp-\u003eaddress, bp-\u003elength)) {"},{"line_number":49,"context_line":"\t\t\tfound_breakpoint \u003d true;"},{"line_number":50,"context_line":"\t\t\tcommand_print(cmd, \"overwriting a breakpoint at the address: \""},{"line_number":51,"context_line":"\t\t\t\t\tTARGET_ADDR_FMT, bp-\u003eaddress);"},{"line_number":52,"context_line":"\t\t}"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":11,"id":"ac3cabdd_bff4b0ec","line":50,"in_reply_to":"10a92a6d_01bbcceb","updated":"2026-10-04 14:24:40.000000000","message":"Done","commit_id":"fb305e6fbe4f20ec37e2bfdeb2fde4ae120342b8"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"5349e9f8f31c14cfd2446610fbd207dc73e2f24a","unresolved":true,"context_lines":[{"line_number":47,"context_line":"\tfor (struct breakpoint *bp \u003d target-\u003ebreakpoints; bp; bp \u003d bp-\u003enext)"},{"line_number":48,"context_line":"\t\tif (is_memory_regions_overlap(start, length, bp-\u003eaddress, bp-\u003elength)) {"},{"line_number":49,"context_line":"\t\t\tfound_breakpoint \u003d true;"},{"line_number":50,"context_line":"\t\t\tcommand_print(cmd, \"overwriting a breakpoint at the address: \""},{"line_number":51,"context_line":"\t\t\t\t\tTARGET_ADDR_FMT, bp-\u003eaddress);"},{"line_number":52,"context_line":"\t\t}"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":11,"id":"10a92a6d_01bbcceb","line":50,"in_reply_to":"124a793e_5b107af9","updated":"2026-09-29 11:02:23.000000000","message":"Done","commit_id":"fb305e6fbe4f20ec37e2bfdeb2fde4ae120342b8"}],"src/target/breakpoints.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"4e2401bfd985448e911e12217c53049820287dcd","unresolved":true,"context_lines":[{"line_number":71,"context_line":"struct breakpoint *find_breakpoint_in_range(struct target *target,"},{"line_number":72,"context_line":"\t\tstruct breakpoint *breakpoint, target_addr_t start, uint32_t length);"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"int watchpoint_clear_target(struct target *target);"},{"line_number":75,"context_line":"int watchpoint_add(struct target *target,"},{"line_number":76,"context_line":"\t\ttarget_addr_t address, unsigned int length,"},{"line_number":77,"context_line":"\t\tenum watchpoint_rw rw, uint64_t value, uint64_t mask);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"bccc16b3_ab54f7e7","line":74,"updated":"2025-11-22 20:05:13.000000000","message":"This function `watchpoint_clear_target()` does not exist!","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"e344b251e13e2eaaaa772ab27593053d1e9fb3e8","unresolved":true,"context_lines":[{"line_number":71,"context_line":"struct breakpoint *find_breakpoint_in_range(struct target *target,"},{"line_number":72,"context_line":"\t\tstruct breakpoint *breakpoint, target_addr_t start, uint32_t length);"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"int watchpoint_clear_target(struct target *target);"},{"line_number":75,"context_line":"int watchpoint_add(struct target *target,"},{"line_number":76,"context_line":"\t\ttarget_addr_t address, unsigned int length,"},{"line_number":77,"context_line":"\t\tenum watchpoint_rw rw, uint64_t value, uint64_t mask);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"f67f6320_46bc2c0d","line":74,"in_reply_to":"bccc16b3_ab54f7e7","updated":"2025-11-27 13:41:26.000000000","message":"Done","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a8b470173da664606c7caade20b729e871bdb44e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"struct breakpoint *find_breakpoint_in_range(struct target *target,"},{"line_number":72,"context_line":"\t\tstruct breakpoint *breakpoint, target_addr_t start, uint32_t length);"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"int watchpoint_clear_target(struct target *target);"},{"line_number":75,"context_line":"int watchpoint_add(struct target *target,"},{"line_number":76,"context_line":"\t\ttarget_addr_t address, unsigned int length,"},{"line_number":77,"context_line":"\t\tenum watchpoint_rw rw, uint64_t value, uint64_t mask);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"cb376baa_529848c1","line":74,"in_reply_to":"f67f6320_46bc2c0d","updated":"2026-09-01 22:44:13.000000000","message":"Done","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"}],"src/target/target.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"4e2401bfd985448e911e12217c53049820287dcd","unresolved":true,"context_lines":[{"line_number":3653,"context_line":"\t\t\t\t\t\timage.sections[i].base_address,"},{"line_number":3654,"context_line":"\t\t\t\t\t\timage.sections[i].size)) {"},{"line_number":3655,"context_line":"\t\t\tLOG_WARNING(\"overwriting a breakpoint at the address: \""},{"line_number":3656,"context_line":"\t\t\t\t\tTARGET_ADDR_FMT, breakpoint-\u003eaddress);"},{"line_number":3657,"context_line":"\t\t}"},{"line_number":3658,"context_line":""},{"line_number":3659,"context_line":"\t\tretval \u003d image_read_section(\u0026image, i, 0x0, image.sections[i].size, buffer, \u0026buf_cnt);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"97c27201_8698a386","line":3656,"updated":"2025-11-22 20:05:13.000000000","message":"If the breakpoint is a SW one, we should not limit to a warning but return error.\nOpenOCD has cached the old instruction to write it back in memory when the breakpoint gets removed.\nIf here we continue loading and later we remove the breakpoint, we will corrupt the image just loaded.\n\nIf the breakpoint is instead a HW one, the warning is OK. Removing it later will not cause any side effect.\nBut we cannot guarantee that the old HW breakpoint will be functional, due to possible incorrect alignment, or due to memory address not anymore pointing to code.\nMaybe returning error in this case too in both the simpler and the safer solution.\n\nReturning error, the message should go in `command_print()`.","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"a8b470173da664606c7caade20b729e871bdb44e","unresolved":false,"context_lines":[{"line_number":3653,"context_line":"\t\t\t\t\t\timage.sections[i].base_address,"},{"line_number":3654,"context_line":"\t\t\t\t\t\timage.sections[i].size)) {"},{"line_number":3655,"context_line":"\t\t\tLOG_WARNING(\"overwriting a breakpoint at the address: \""},{"line_number":3656,"context_line":"\t\t\t\t\tTARGET_ADDR_FMT, breakpoint-\u003eaddress);"},{"line_number":3657,"context_line":"\t\t}"},{"line_number":3658,"context_line":""},{"line_number":3659,"context_line":"\t\tretval \u003d image_read_section(\u0026image, i, 0x0, image.sections[i].size, buffer, \u0026buf_cnt);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"5d8ed2f0_29f7b5f9","line":3656,"in_reply_to":"6a09c1bb_edf34199","updated":"2026-09-01 22:44:13.000000000","message":"Done","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"e344b251e13e2eaaaa772ab27593053d1e9fb3e8","unresolved":true,"context_lines":[{"line_number":3653,"context_line":"\t\t\t\t\t\timage.sections[i].base_address,"},{"line_number":3654,"context_line":"\t\t\t\t\t\timage.sections[i].size)) {"},{"line_number":3655,"context_line":"\t\t\tLOG_WARNING(\"overwriting a breakpoint at the address: \""},{"line_number":3656,"context_line":"\t\t\t\t\tTARGET_ADDR_FMT, breakpoint-\u003eaddress);"},{"line_number":3657,"context_line":"\t\t}"},{"line_number":3658,"context_line":""},{"line_number":3659,"context_line":"\t\tretval \u003d image_read_section(\u0026image, i, 0x0, image.sections[i].size, buffer, \u0026buf_cnt);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"6a09c1bb_edf34199","line":3656,"in_reply_to":"97c27201_8698a386","updated":"2025-11-27 13:41:26.000000000","message":"Done","commit_id":"705fce5698f69a9a1256bd9f9965450998b34ea8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"e1f4c8c8177071d9c8876f62ff4921828674f75b","unresolved":true,"context_lines":[{"line_number":3646,"context_line":"\t\t\tbreak;"},{"line_number":3647,"context_line":"\t\t}"},{"line_number":3648,"context_line":""},{"line_number":3649,"context_line":"\t\tif (CALL_COMMAND_HANDLER(detect_breakpoints_in_section, target, image.sections[i]))"},{"line_number":3650,"context_line":"\t\t\treturn ERROR_FAIL;"},{"line_number":3651,"context_line":""},{"line_number":3652,"context_line":"\t\tretval \u003d image_read_section(\u0026image, i, 0x0, image.sections[i].size, buffer, \u0026buf_cnt);"}],"source_content_type":"text/x-csrc","patch_set":9,"id":"75b64f44_7334d40a","line":3649,"updated":"2026-09-20 15:00:34.000000000","message":"Use\n```\nretval \u003d CALL_COMMAND_HANDLER(..);\nif (retval !\u003d ERROR_OK)\n  return retval;\n```\nplus, since `free(buffer)` is missing when returning error, then it\u0027s better to move this new code before the `malloc()`","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"8e257cdea106baa15fb5943084483bca6d8626d0","unresolved":true,"context_lines":[{"line_number":3646,"context_line":"\t\t\tbreak;"},{"line_number":3647,"context_line":"\t\t}"},{"line_number":3648,"context_line":""},{"line_number":3649,"context_line":"\t\tif (CALL_COMMAND_HANDLER(detect_breakpoints_in_section, target, image.sections[i]))"},{"line_number":3650,"context_line":"\t\t\treturn ERROR_FAIL;"},{"line_number":3651,"context_line":""},{"line_number":3652,"context_line":"\t\tretval \u003d image_read_section(\u0026image, i, 0x0, image.sections[i].size, buffer, \u0026buf_cnt);"}],"source_content_type":"text/x-csrc","patch_set":9,"id":"daecc0ea_6301aa4a","line":3649,"in_reply_to":"75b64f44_7334d40a","updated":"2026-09-24 14:04:38.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":false,"context_lines":[{"line_number":3646,"context_line":"\t\t\tbreak;"},{"line_number":3647,"context_line":"\t\t}"},{"line_number":3648,"context_line":""},{"line_number":3649,"context_line":"\t\tif (CALL_COMMAND_HANDLER(detect_breakpoints_in_section, target, image.sections[i]))"},{"line_number":3650,"context_line":"\t\t\treturn ERROR_FAIL;"},{"line_number":3651,"context_line":""},{"line_number":3652,"context_line":"\t\tretval \u003d image_read_section(\u0026image, i, 0x0, image.sections[i].size, buffer, \u0026buf_cnt);"}],"source_content_type":"text/x-csrc","patch_set":9,"id":"c1b9bc00_9db8da03","line":3649,"in_reply_to":"daecc0ea_6301aa4a","updated":"2026-09-24 14:50:53.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"e1f4c8c8177071d9c8876f62ff4921828674f75b","unresolved":true,"context_lines":[{"line_number":6232,"context_line":"\t\tLOG_ERROR(\"No image in memory\");"},{"line_number":6233,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":6234,"context_line":"\t}"},{"line_number":6235,"context_line":"\tint i;"},{"line_number":6236,"context_line":"\tint64_t ms \u003d timeval_ms();"},{"line_number":6237,"context_line":"\tint size \u003d 0;"},{"line_number":6238,"context_line":"\tint retval \u003d ERROR_OK;"}],"source_content_type":"text/x-csrc","patch_set":9,"id":"1b8b9a51_4dcf879c","line":6235,"updated":"2026-09-20 15:00:34.000000000","message":"Somewhere here, before loading the image to the target, there should be another loop to check the overwrite of the breakpoints. Maybe\n```\nfor (i \u003d 0; i \u003c fastload_num; i++) {\n   struct imagesection section;\n   section.base_address \u003d fastload[i].address;\n   section.size \u003d fastload[i].length;\n   retval \u003d CALL_COMMAND_HANDLER(detect_breakpoints_in_section, target, \u0026section);\n   ...\n}\n```","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1002437,"name":"AlexandraKulyatskaya","email":"a.kulyatskaya@syntacore.com","username":"AlexandraKulyatskaya"},"change_message_id":"8e257cdea106baa15fb5943084483bca6d8626d0","unresolved":true,"context_lines":[{"line_number":6232,"context_line":"\t\tLOG_ERROR(\"No image in memory\");"},{"line_number":6233,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":6234,"context_line":"\t}"},{"line_number":6235,"context_line":"\tint i;"},{"line_number":6236,"context_line":"\tint64_t ms \u003d timeval_ms();"},{"line_number":6237,"context_line":"\tint size \u003d 0;"},{"line_number":6238,"context_line":"\tint retval \u003d ERROR_OK;"}],"source_content_type":"text/x-csrc","patch_set":9,"id":"7ce9dbcc_3e10114c","line":6235,"in_reply_to":"1b8b9a51_4dcf879c","updated":"2026-09-24 14:04:38.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ea4c12e786ae31a3ba3cd57d3420f63af79e673d","unresolved":false,"context_lines":[{"line_number":6232,"context_line":"\t\tLOG_ERROR(\"No image in memory\");"},{"line_number":6233,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":6234,"context_line":"\t}"},{"line_number":6235,"context_line":"\tint i;"},{"line_number":6236,"context_line":"\tint64_t ms \u003d timeval_ms();"},{"line_number":6237,"context_line":"\tint size \u003d 0;"},{"line_number":6238,"context_line":"\tint retval \u003d ERROR_OK;"}],"source_content_type":"text/x-csrc","patch_set":9,"id":"ef2e3bc0_95617f20","line":6235,"in_reply_to":"7ce9dbcc_3e10114c","updated":"2026-09-24 14:50:53.000000000","message":"Done","commit_id":"dc79c6c1f986ba4c3f50ea3c11127936db9ca7a0"}]}
