)]}'
{"id":"openocd~master~I9ca8e78630611597d15984bd0e8634c8fc3c32b9","project":"openocd","branch":"master","hashtags":[],"change_id":"I9ca8e78630611597d15984bd0e8634c8fc3c32b9","subject":"gdb_server: add async-notif keep-alive during memory read/write","status":"MERGED","created":"2024-02-26 17:16:27.000000000","updated":"2024-03-24 13:40:11.000000000","submitted":"2024-03-24 13:40:11.000000000","submitter":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"8165","meta_rev_id":"4df968a1dbfb846ffb4f10ba7cbe5852c4dd6228","_number":8165,"owner":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"tag":"autogenerated:gerrit:merged","value":1,"date":"2024-03-24 13:40:11.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}],"values":{"-1":"Fails"," 0":"No score","+1":"Verified"},"description":"","default_value":0},"Code-Review":{"approved":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"all":[{"tag":"autogenerated:gerrit:merged","value":2,"date":"2024-03-24 13:40:11.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"value":0,"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2024-02-26 17:42:43.000000000","updated_by":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"4b63a50538cbd159f16f73009732ca669fb7515d","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"real_author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"date":"2024-02-26 17:16:27.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"91c1a1a808cdba760301fa4c1d747fb96a6947c4","tag":"autogenerated:jenkins-gerrit-trigger","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2024-02-26 17:42:43.000000000","message":"Patch Set 1: Verified+1\n\nBuild Successful \n\nhttps://build.openocd.org/job/openocd-gerrit/19396/ : SUCCESS\n\nhttps://build.openocd.org/job/openocd-gerrit-build/18557/ : SUCCESS","accounts_in_message":[],"_revision_number":1},{"id":"fa42b0f054175862e6eaae2700c4c38ce7150886","author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"real_author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"date":"2024-02-26 17:53:01.000000000","message":"Patch Set 1: Code-Review+1","accounts_in_message":[],"_revision_number":1},{"id":"87dfe4d0d70536fdae3fde53c3c8b1df72de5f9d","author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"real_author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"date":"2024-03-09 12:26:50.000000000","message":"Patch Set 1: Code-Review+2","accounts_in_message":[],"_revision_number":1},{"id":"4df968a1dbfb846ffb4f10ba7cbe5852c4dd6228","tag":"autogenerated:gerrit:merged","author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"real_author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"date":"2024-03-24 13:40:11.000000000","message":"Change has been successfully cherry-picked as 0c0243228cb958b7c12c2e5a81c84d35734fce25","accounts_in_message":[],"_revision_number":2}],"current_revision":"0c0243228cb958b7c12c2e5a81c84d35734fce25","revisions":{"0c0243228cb958b7c12c2e5a81c84d35734fce25":{"kind":"REWORK","_number":2,"created":"2024-03-24 13:40:11.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/65/8165/2","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/65/8165/2","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/2 \u0026\u0026 git checkout -b change-8165 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/65/8165/2","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/2 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"01a797af143398c6f3aa1eb6f8949deff4ccf044","subject":"target/mips32: add fpu access support"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2024-02-25 21:55:35.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2024-03-24 13:40:11.000000000","tz":0},"subject":"gdb_server: add async-notif keep-alive during memory read/write","message":"gdb_server: add async-notif keep-alive during memory read/write\n\nTo avoid gdb to timeout, OpenOCD implements a keep-alive mechanism\nthat consists in sending periodically to gdb empty strings embedded\nin the \"O\" remote reply packet.\n\nThe main purpose of \"O\" packets is to forward in the gdb console\nthe output of the remote execution; the gdb-remote puts in the \"O\"\npacket the string that gdb will print. It\u0027s use is restricted to\nfew \"running/execution\" contexts listed in\nhttp://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html\nand this currently limits the keep-alive capabilities of OpenOCD.\n\nLong data transfer (memory R/W) can also cause gdb to timeout if\nthe interface is too slow. In this case the usual keep-alive based\non \"O\" packet cannot be used and, if used, would trigger a protocol\nerror that causes the transfer to be dropped.\nThe slow transfer rate can be simulated by adding some delay in the\nmain loop of mem_ap_write() and mem_ap_read(), then using the gdb\ncommands \"dump\" and \"restore\".\n\nIn the wait loop during a memory R/W, gdb drops any extra character\nreceived from the gdb-remote that is not recognized as a valid\nreply to the memory command. Every dropped character re-initializes\nthe timeout counter and could be used as keep-alive.\n\nFrom gdb 7.0 (released 2009-10-06), an asynchronous notification\ncan also be received from gdb-remote during a memory R/W and has\nthe effect to reset the timeout counter, thus can be used as\nkeep-alive.\nThe notification would be treated as \"junk\" extra characters by any\ngdb older than 7.0, being still valid as keep-alive.\nCheck putpkt_binary() and getpkt_sane() in gdb commit\n74531fed1f2d662debc2c209b8b3faddceb55960\n\nCurrently, only one notification packet (\"Stop\") is recognized by\ngdb, and gdb documentation reports that notification packets that\nare not recognized should be silently dropped.\nUse \u0027set debug remote 1\u0027 in gdb to dump the received notifications\nand the junk extra characters.\n\nAdd a new level in enum gdb_output_flag for using the asynchronous\nnotifications.\nActivate this new level during memory transfers.\nSend a custom \"oocd_keepalive\" notification packet as keep_alive.\nWhile there, drop a useless return in the switch/case, already\nmanaged in case of break.\n\nAfter this commit, the proper calls to keep_alive() have to be\nadded in the loops that code the memory transfers. Of course, the\nkeep_alive() should be placed during the wait for JTAG flush, not\nwhile locally queuing the JTAG elementary transfers.\n\nChange-Id: I9ca8e78630611597d15984bd0e8634c8fc3c32b9\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\nReviewed-on: https://review.openocd.org/c/openocd/+/8165\nTested-by: jenkins\n"}},"40c8db64e10c1eb718d1e3dcfef5ced78a92328c":{"kind":"REWORK","_number":1,"created":"2024-02-26 17:16:27.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/65/8165/1","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/65/8165/1","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/1 \u0026\u0026 git checkout -b change-8165 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/65/8165/1","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/65/8165/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"179169268ca1bbac092324f597fbea090d75355e","subject":"jtag/commands: fixed buffer overflow"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2024-02-25 21:55:35.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2024-02-26 17:14:53.000000000","tz":60},"subject":"gdb_server: add async-notif keep-alive during memory read/write","message":"gdb_server: add async-notif keep-alive during memory read/write\n\nTo avoid gdb to timeout, OpenOCD implements a keep-alive mechanism\nthat consists in sending periodically to gdb empty strings embedded\nin the \"O\" remote reply packet.\n\nThe main purpose of \"O\" packets is to forward in the gdb console\nthe output of the remote execution; the gdb-remote puts in the \"O\"\npacket the string that gdb will print. It\u0027s use is restricted to\nfew \"running/execution\" contexts listed in\nhttp://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html\nand this currently limits the keep-alive capabilities of OpenOCD.\n\nLong data transfer (memory R/W) can also cause gdb to timeout if\nthe interface is too slow. In this case the usual keep-alive based\non \"O\" packet cannot be used and, if used, would trigger a protocol\nerror that causes the transfer to be dropped.\nThe slow transfer rate can be simulated by adding some delay in the\nmain loop of mem_ap_write() and mem_ap_read(), then using the gdb\ncommands \"dump\" and \"restore\".\n\nIn the wait loop during a memory R/W, gdb drops any extra character\nreceived from the gdb-remote that is not recognized as a valid\nreply to the memory command. Every dropped character re-initializes\nthe timeout counter and could be used as keep-alive.\n\nFrom gdb 7.0 (released 2009-10-06), an asynchronous notification\ncan also be received from gdb-remote during a memory R/W and has\nthe effect to reset the timeout counter, thus can be used as\nkeep-alive.\nThe notification would be treated as \"junk\" extra characters by any\ngdb older than 7.0, being still valid as keep-alive.\nCheck putpkt_binary() and getpkt_sane() in gdb commit\n74531fed1f2d662debc2c209b8b3faddceb55960\n\nCurrently, only one notification packet (\"Stop\") is recognized by\ngdb, and gdb documentation reports that notification packets that\nare not recognized should be silently dropped.\nUse \u0027set debug remote 1\u0027 in gdb to dump the received notifications\nand the junk extra characters.\n\nAdd a new level in enum gdb_output_flag for using the asynchronous\nnotifications.\nActivate this new level during memory transfers.\nSend a custom \"oocd_keepalive\" notification packet as keep_alive.\nWhile there, drop a useless return in the switch/case, already\nmanaged in case of break.\n\nAfter this commit, the proper calls to keep_alive() have to be\nadded in the loops that code the memory transfers. Of course, the\nkeep_alive() should be placed during the wait for JTAG flush, not\nwhile locally queuing the JTAG elementary transfers.\n\nChange-Id: I9ca8e78630611597d15984bd0e8634c8fc3c32b9\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\n"}}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"CLOSED","labels":[{"label":"Verified","status":"OK","applied_by":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"}}]}],"submit_requirements":[{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dMAX -label:Verified\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dMAX","-label:Verified\u003dMIN"],"failing_atoms":[]}},{"name":"Code-Review","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX -label:Code-Review\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dMAX","-label:Code-Review\u003dMIN"],"failing_atoms":[]}}]}
