)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"d58d91ea026e5425f19fbdc334124a6beab14c5a","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To simplify the ipdbg start/stop command and be able to"},{"line_number":10,"context_line":"add additional commands in the future, we introduce the"},{"line_number":11,"context_line":"concept of a hub which has to be created in the ui."},{"line_number":12,"context_line":"The hub was created on the fly in previous versions."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I55f317542d01a7324990b2cacd496a41fa5ff875"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"f48c1102_b09e0e97","line":11,"updated":"2024-02-17 21:41:31.000000000","message":"??? Which \"ui\"?","commit_id":"a2f0dd0df3cdad65e391d67d5468f70950ae3017"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"12dc47826e2f74edd852644ac61977deb562d7e5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To simplify the ipdbg start/stop command and be able to"},{"line_number":10,"context_line":"add additional commands in the future, we introduce the"},{"line_number":11,"context_line":"concept of a hub which has to be created in the ui."},{"line_number":12,"context_line":"The hub was created on the fly in previous versions."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I55f317542d01a7324990b2cacd496a41fa5ff875"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"2f7bac72_a73b0bb0","line":11,"in_reply_to":"f48c1102_b09e0e97","updated":"2024-02-18 21:17:44.000000000","message":"Done","commit_id":"a2f0dd0df3cdad65e391d67d5468f70950ae3017"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"5e4f2acd46b226d7526ae8cd0a7eec83206bf90d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2cca0e09_9247a392","updated":"2023-12-18 21:14:56.000000000","message":"Hi Antonio\nI really appreciate your effort!\nThanks","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"20a0498f04a8d597f912445e2ca38467d542f3f5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"51c1b411_a52636cb","updated":"2024-01-09 23:24:43.000000000","message":"Thanks again","commit_id":"a43f40a0e46b82cd0701055d4210148f5d01b58e"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"63c08eb2_0b809d84","updated":"2024-01-27 17:30:55.000000000","message":"Still some minor comment, but the result looks great!","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"d58d91ea026e5425f19fbdc334124a6beab14c5a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"933131ce_db75cb25","updated":"2024-02-17 21:41:31.000000000","message":"I think this last version is good enough. I only have two minor comments below, then it would be ready.","commit_id":"a2f0dd0df3cdad65e391d67d5468f70950ae3017"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2c8e3e33_a8ea2adb","updated":"2024-01-29 20:04:57.000000000","message":"Thank you very much Antonio! I really appreciate your help.","commit_id":"a2f0dd0df3cdad65e391d67d5468f70950ae3017"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"12dc47826e2f74edd852644ac61977deb562d7e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"dc549ef2_43f17e1e","updated":"2024-02-18 21:17:44.000000000","message":"Thanks a lot for your help!","commit_id":"ac148aee0e719546f4e83d5e7876385bcf7efb15"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"9af54518ee6f6a109d8b8b35b17b843a0defc788","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"1c8be6ca_f6dcf30b","updated":"2024-03-03 17:51:09.000000000","message":"Thanks!","commit_id":"c57926ce4732e1d0472c45710359c9fff2601fd7"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"c2c28795d68eaff68e5c402f4b75e335ece72f71","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"5bac7e09_a67cd734","in_reply_to":"1c8be6ca_f6dcf30b","updated":"2024-03-07 17:22:09.000000000","message":"Thanks to you!","commit_id":"c57926ce4732e1d0472c45710359c9fff2601fd7"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"18c03e2a_15515112","updated":"2024-03-16 21:11:01.000000000","message":"Daniel,\nthis patch introduces a double free(), detected by scan-build in\nhttps://build.openocd.org/job/openocd-clang/1217/clang/new/source.4ffb6b68-fdf4-422c-9cda-e5355a1bd0d2/#1128\nI have re-run scan-build on my PC to get more details, and I have added the whole trace in the comments below.\nWould you mind checking it and providing a fix?","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"f58c14dc_b92e58db","updated":"2024-03-17 00:21:45.000000000","message":"Hi Antonio\n\nSure, I checked it. Thanks!\nThe fix is quite easy since ipdbg_create_hub() takes ownership of virtual_ir.\n \nFixed in: https://review.openocd.org/c/openocd/+/8085","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"}],"doc/openocd.texi":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"46562410435c10dd6f62d0cd760514ad21613fd6","unresolved":true,"context_lines":[{"line_number":11990,"context_line":"of a JTAG-Host. The JTAG-Host is needed to connect the circuit over JTAG to the"},{"line_number":11991,"context_line":"control-software. For more details see @url{http://ipdbg.org}."},{"line_number":11992,"context_line":""},{"line_number":11993,"context_line":"@deffn {Command} {ipdbg start} @option{-tap @var{tapname}} @option{-hub @var{ir_value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}] [@option{-port @var{number}}] [@option{-tool @var{number}}]"},{"line_number":11994,"context_line":"Starts a IPDBG JTAG-Host server. Arguments can be specified in any order."},{"line_number":11995,"context_line":""},{"line_number":11996,"context_line":"Command options:"}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"830ce9c4_2bbc16d9","line":11993,"updated":"2023-12-17 20:34:40.000000000","message":"so the command \"ipdbg start\" has two completely independent syntax. It\u0027s quite confusing...\nPlus the command \"ipdbg stop\" requires adding again all the options used for start.\nI don\u0027t have better proposal, but since you are changing the commands this could be the opportunity to improve them","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"ddd7aa836f358c67c90f48dfc8e25338338a9ddb","unresolved":true,"context_lines":[{"line_number":11990,"context_line":"of a JTAG-Host. The JTAG-Host is needed to connect the circuit over JTAG to the"},{"line_number":11991,"context_line":"control-software. For more details see @url{http://ipdbg.org}."},{"line_number":11992,"context_line":""},{"line_number":11993,"context_line":"@deffn {Command} {ipdbg start} @option{-tap @var{tapname}} @option{-hub @var{ir_value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}] [@option{-port @var{number}}] [@option{-tool @var{number}}]"},{"line_number":11994,"context_line":"Starts a IPDBG JTAG-Host server. Arguments can be specified in any order."},{"line_number":11995,"context_line":""},{"line_number":11996,"context_line":"Command options:"}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"2105bd63_cd8b9e53","line":11993,"in_reply_to":"02c99ed2_a62c7c5b","updated":"2023-12-31 09:54:58.000000000","message":"I\u0027m not fully aware of the details of ipdbg-hub, so please review/refuse anything I write here.\n\nStart/stop here operates on tools, which are inside one ipdbg-hub.\nIt could be \u0027cool\u0027 (?) to decouple the ipdbg-hub from the operations, like having some sort of\nipdbg-hub create NAME params\nand later\nNAME ipdbg-tool start number -port port\nNAME ipdbg-tool stop number\nDetail: is the port number per tool or per ipdbg-hub?\n\nRegarding the \u0027create\u0027 command, can it be simply\nipdbg-hub create NAME -tap tapname [other params]\nand the command searches internally if there is already a PLD on that TAP?\nThen either use the default provided by the PLD driver or overwrite all or part of the parameters with the ones listed in the command?\nOr\nipdbg-hub create NAME (-tap tapname | -pld pldname) [other params]\n\nDo you need to program the PLD with OpenOCD and then in the same OpenOCD session work with the ipdbg-hub created by the PLD programming?","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"41125a2aa35227d89ca8142e1e10f9d8b539bc8c","unresolved":true,"context_lines":[{"line_number":11990,"context_line":"of a JTAG-Host. The JTAG-Host is needed to connect the circuit over JTAG to the"},{"line_number":11991,"context_line":"control-software. For more details see @url{http://ipdbg.org}."},{"line_number":11992,"context_line":""},{"line_number":11993,"context_line":"@deffn {Command} {ipdbg start} @option{-tap @var{tapname}} @option{-hub @var{ir_value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}] [@option{-port @var{number}}] [@option{-tool @var{number}}]"},{"line_number":11994,"context_line":"Starts a IPDBG JTAG-Host server. Arguments can be specified in any order."},{"line_number":11995,"context_line":""},{"line_number":11996,"context_line":"Command options:"}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"e3997570_d6bc4b33","line":11993,"in_reply_to":"2105bd63_cd8b9e53","updated":"2024-01-02 20:05:00.000000000","message":"Thanks!\n\nI like your idea. I changed this patch accordingly. We have now a \u0027ipdbg create-hub\u0027 command and \u0027ipdbg start\u0027/\u0027ipdbg stop\u0027. The code handling the commands is now much easier to follow. The concept of the hub was already there.\n\na few open points:\n\u0027ipdbg -start\u0027 created the hub when it didn\u0027t exist. \u0027ipdbg -stop\u0027 removed (freed) the hub if there were no connections/sessions active on it.\nTo provide some migration aids in \"startup.tcl\" i have to \"catch\" the old -start command and split into create-hub and start. But this can fail if start is called multiple times.\nI already have the splitting implemented (~100 lines of tcl), and I don\u0027t handle the case where -start is called multiple times.\nShall I follow this path?\n\nSecond, now the created hub is never freed. I think this is also the case for created pld-devices and probably taps. Can we live with it?","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"20a0498f04a8d597f912445e2ca38467d542f3f5","unresolved":false,"context_lines":[{"line_number":11990,"context_line":"of a JTAG-Host. The JTAG-Host is needed to connect the circuit over JTAG to the"},{"line_number":11991,"context_line":"control-software. For more details see @url{http://ipdbg.org}."},{"line_number":11992,"context_line":""},{"line_number":11993,"context_line":"@deffn {Command} {ipdbg start} @option{-tap @var{tapname}} @option{-hub @var{ir_value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}] [@option{-port @var{number}}] [@option{-tool @var{number}}]"},{"line_number":11994,"context_line":"Starts a IPDBG JTAG-Host server. Arguments can be specified in any order."},{"line_number":11995,"context_line":""},{"line_number":11996,"context_line":"Command options:"}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"fd50f670_a4d3d571","line":11993,"in_reply_to":"80b6469f_a64c0446","updated":"2024-01-09 23:24:43.000000000","message":"Hi Antonio\n\nThe solution with \u0027catch\u0027 works for multiple -start calls, thanks.\nI decided to forego additional checks with the return value from create-hub.\nI believe ipdbg with openocd is not that much in use yet.\n\nAbout the never freed hub: it\u0027s not about a problem for the functionality. I asked just because of the memory leak. So I added the call to ipdbg_server_free() in server_free(). \n\nAlso the requested syntax change is done (also for 7980). It\u0027s much easier to use now! I am quite happy with it :) !","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"5e4f2acd46b226d7526ae8cd0a7eec83206bf90d","unresolved":true,"context_lines":[{"line_number":11990,"context_line":"of a JTAG-Host. The JTAG-Host is needed to connect the circuit over JTAG to the"},{"line_number":11991,"context_line":"control-software. For more details see @url{http://ipdbg.org}."},{"line_number":11992,"context_line":""},{"line_number":11993,"context_line":"@deffn {Command} {ipdbg start} @option{-tap @var{tapname}} @option{-hub @var{ir_value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}] [@option{-port @var{number}}] [@option{-tool @var{number}}]"},{"line_number":11994,"context_line":"Starts a IPDBG JTAG-Host server. Arguments can be specified in any order."},{"line_number":11995,"context_line":""},{"line_number":11996,"context_line":"Command options:"}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"02c99ed2_a62c7c5b","line":11993,"in_reply_to":"830ce9c4_2bbc16d9","updated":"2023-12-18 21:14:56.000000000","message":"Yes it\u0027s confusing. Also in the code. That\u0027s one of the reasons I tried to split start/stop with this patch.\nI will try to explain so maybe someone can help me improving the commands please.\n\nAn ipdbg-hub (some hw in the FPGA) is identified by a Tap and ir_value (and an optional vir_value).\nThere can be multiple hubs in a JTAG chain and even in a single FPGA.\nIf the FPGA is supported by the pld-driver, the driver is able to tell which tap and ir_value to use. If there is no support from the pld drivers one has to select tap and ir manually. \n\nConnected to the hub are up to 7 tools (like logic analyzers or waveform generators). For each tool it is possible to start/stop the server individually. This \"connects\" a tool with a tcp-port.\n\nTo start: we need to select the hub, the tool and the tcp-port. \nTo stop: we need to select the hub and the tool.\nTo configure the hub (e.g. queueing in 7980) we need to select the hub. As You have realized in 7980 this could be an additional option to start.\n\nOne simplification could be to start/stop for all 7 tools at once. Other ideas?\n\nI hope this gives some insight. It\u0027s also hard to document.\n\nAnd again thanks for your support!","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6b6a804c8b551884a613ff6d43c896dba3edf165","unresolved":true,"context_lines":[{"line_number":11990,"context_line":"of a JTAG-Host. The JTAG-Host is needed to connect the circuit over JTAG to the"},{"line_number":11991,"context_line":"control-software. For more details see @url{http://ipdbg.org}."},{"line_number":11992,"context_line":""},{"line_number":11993,"context_line":"@deffn {Command} {ipdbg start} @option{-tap @var{tapname}} @option{-hub @var{ir_value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}] [@option{-port @var{number}}] [@option{-tool @var{number}}]"},{"line_number":11994,"context_line":"Starts a IPDBG JTAG-Host server. Arguments can be specified in any order."},{"line_number":11995,"context_line":""},{"line_number":11996,"context_line":"Command options:"}],"source_content_type":"text/x-texinfo","patch_set":2,"id":"80b6469f_a64c0446","line":11993,"in_reply_to":"e3997570_d6bc4b33","updated":"2024-01-07 16:55:26.000000000","message":"for the multiple \"start\", you can run the command in tcl as\ncatch {ipdbg create ..}\nThis will ignore the error and continue. You can even make it more smart to check the returned error code and detect it is really the same command replicated.\nhttps://www.tcl.tk/man/tcl/TclCmd/catch.html\nhttps://wiki.tcl-lang.org/page/catch\n\nRegarding created hub is never freed. Is it a problem for the functionality of ipdbg? Do you need to destroy the hub to re-create one with different parameters?\nRegarding the associated memory leak in OpenOCD, please add a ipdbg call in the existing server_free() to cleanup all the existing hubs.\n\nRegarding the new commands, I prefer the syntax (already used in openocd)\nNAME ipdbg start ...\nNAME ipdbg stop ...\ninstead of\nipdbg start NAME ...\nipdbg stop NAME ...\nIt requires some extra coding, but keeps coherent the syntax of openocd commands.\nYou can see a simple implementation in arm_tpiu_swo_create().","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":12109,"context_line":"different tools connected to the Hub. Hub implementations for most major FPGA vendors/families"},{"line_number":12110,"context_line":"are provided. For more details see @url{http://ipdbg.org}."},{"line_number":12111,"context_line":""},{"line_number":12112,"context_line":"@deffn {Command} {ipdbg create-hub} @var{hub_name} @option{-tap @var{tapname}} @option{-ir @var{value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}]"},{"line_number":12113,"context_line":"Creates a IPDBG JTAG Hub. The created hub is later used to start/stop IPDBG JTAG Host servers."},{"line_number":12114,"context_line":"The first argument @var{hub_name} is the name of the created hub. It can be used later as a reference."},{"line_number":12115,"context_line":""}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"302b876d_ad1f12be","line":12112,"updated":"2024-01-27 17:30:55.000000000","message":"You can use:\n@deffn {Command} {ipdbg create-hub} @var{hub_name} @option{-tap @var{tapname}} ...\n@deffnx {Command} {ipdbg create-hub} @var{hub_name} @option{-pld @var{name}} ...\nto report the two alternative ways to run the command, with a single\n@end deffn\nat the end of the description","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":12109,"context_line":"different tools connected to the Hub. Hub implementations for most major FPGA vendors/families"},{"line_number":12110,"context_line":"are provided. For more details see @url{http://ipdbg.org}."},{"line_number":12111,"context_line":""},{"line_number":12112,"context_line":"@deffn {Command} {ipdbg create-hub} @var{hub_name} @option{-tap @var{tapname}} @option{-ir @var{value} [@var{dr_length}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}]"},{"line_number":12113,"context_line":"Creates a IPDBG JTAG Hub. The created hub is later used to start/stop IPDBG JTAG Host servers."},{"line_number":12114,"context_line":"The first argument @var{hub_name} is the name of the created hub. It can be used later as a reference."},{"line_number":12115,"context_line":""}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"35e23404_db1f8b5c","line":12112,"in_reply_to":"302b876d_ad1f12be","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":12122,"context_line":"@item @option{-tap @var{tapname}} targeting the TAP @var{tapname}."},{"line_number":12123,"context_line":""},{"line_number":12124,"context_line":"@item @option{-ir @var{value}} states that the JTAG hub is"},{"line_number":12125,"context_line":"reachable with dr-scans while the JTAG instruction register has the value @var{ir_value}. The optional @var{dr_length} is the length of the dr."},{"line_number":12126,"context_line":"A value dr_length !\u003d 13 is only useful with changes in the JTAG-Hub implementation."},{"line_number":12127,"context_line":""},{"line_number":12128,"context_line":"@item @option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]} To support more Hubs than USER registers in a single FPGA it is possible to"}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"d68e2ccf_58718de9","line":12125,"updated":"2024-01-27 17:30:55.000000000","message":"you have changed name so here is @var{value}, or you put back @var{ir_value} above in the @option declaration.","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":12122,"context_line":"@item @option{-tap @var{tapname}} targeting the TAP @var{tapname}."},{"line_number":12123,"context_line":""},{"line_number":12124,"context_line":"@item @option{-ir @var{value}} states that the JTAG hub is"},{"line_number":12125,"context_line":"reachable with dr-scans while the JTAG instruction register has the value @var{ir_value}. The optional @var{dr_length} is the length of the dr."},{"line_number":12126,"context_line":"A value dr_length !\u003d 13 is only useful with changes in the JTAG-Hub implementation."},{"line_number":12127,"context_line":""},{"line_number":12128,"context_line":"@item @option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]} To support more Hubs than USER registers in a single FPGA it is possible to"}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"64034e8d_3ae6fe2c","line":12125,"in_reply_to":"d68e2ccf_58718de9","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":12123,"context_line":""},{"line_number":12124,"context_line":"@item @option{-ir @var{value}} states that the JTAG hub is"},{"line_number":12125,"context_line":"reachable with dr-scans while the JTAG instruction register has the value @var{ir_value}. The optional @var{dr_length} is the length of the dr."},{"line_number":12126,"context_line":"A value dr_length !\u003d 13 is only useful with changes in the JTAG-Hub implementation."},{"line_number":12127,"context_line":""},{"line_number":12128,"context_line":"@item @option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]} To support more Hubs than USER registers in a single FPGA it is possible to"},{"line_number":12129,"context_line":"use a mechanism known as virtual-ir where the user data-register is reachable if there is a specific value in a second dr."}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"cdf7b911_608b6652","line":12126,"updated":"2024-01-27 17:30:55.000000000","message":"Maybe rephrase it (if I understand correctly):\nCurrent JTAG-Hub implementation only supports dr_length\u003d13, which is also the default value.","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":12123,"context_line":""},{"line_number":12124,"context_line":"@item @option{-ir @var{value}} states that the JTAG hub is"},{"line_number":12125,"context_line":"reachable with dr-scans while the JTAG instruction register has the value @var{ir_value}. The optional @var{dr_length} is the length of the dr."},{"line_number":12126,"context_line":"A value dr_length !\u003d 13 is only useful with changes in the JTAG-Hub implementation."},{"line_number":12127,"context_line":""},{"line_number":12128,"context_line":"@item @option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]} To support more Hubs than USER registers in a single FPGA it is possible to"},{"line_number":12129,"context_line":"use a mechanism known as virtual-ir where the user data-register is reachable if there is a specific value in a second dr."}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"306a75b1_d28c7c18","line":12126,"in_reply_to":"cdf7b911_608b6652","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":12136,"context_line":"or"},{"line_number":12137,"context_line":"@deffn {Command} {ipdbg create-hub} @var{hub_name} @option{-pld @var{name} [@var{user}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}]"},{"line_number":12138,"context_line":"Also creates a IPDBG JTAG Hub. The pld drivers are able to provide the tap and ir_value for the IPDBG JTAG-Host server."},{"line_number":12139,"context_line":"With the @option{-pld @var{name} [@var{user}]} the information from the pld-driver is used and the options @option{-tap} and @option{-ir} are not required."},{"line_number":12140,"context_line":"The defined driver for the pld @var{name} gets selected. (The pld devices names can be shown by the command @command{pld devices})."},{"line_number":12141,"context_line":""},{"line_number":12142,"context_line":"The @verb{|USERx|} instructions are vendor specific and don\u0027t change between families of the same vendor."}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"f3f7b8eb_f7371089","line":12139,"updated":"2024-01-27 17:30:55.000000000","message":"this sentence sounds redundant as already mentioned in former sentence","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":12136,"context_line":"or"},{"line_number":12137,"context_line":"@deffn {Command} {ipdbg create-hub} @var{hub_name} @option{-pld @var{name} [@var{user}]} [@option{-vir [@var{vir_value} [@var{length} [@var{instr_code}]]]}]"},{"line_number":12138,"context_line":"Also creates a IPDBG JTAG Hub. The pld drivers are able to provide the tap and ir_value for the IPDBG JTAG-Host server."},{"line_number":12139,"context_line":"With the @option{-pld @var{name} [@var{user}]} the information from the pld-driver is used and the options @option{-tap} and @option{-ir} are not required."},{"line_number":12140,"context_line":"The defined driver for the pld @var{name} gets selected. (The pld devices names can be shown by the command @command{pld devices})."},{"line_number":12141,"context_line":""},{"line_number":12142,"context_line":"The @verb{|USERx|} instructions are vendor specific and don\u0027t change between families of the same vendor."}],"source_content_type":"text/x-texinfo","patch_set":5,"id":"58b403c5_bb3ca906","line":12139,"in_reply_to":"f3f7b8eb_f7371089","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"}],"src/server/ipdbg.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"46562410435c10dd6f62d0cd760514ad21613fd6","unresolved":true,"context_lines":[{"line_number":1066,"context_line":"\t\t.handler \u003d handle_ipdbg_start_command,"},{"line_number":1067,"context_line":"\t\t.mode \u003d COMMAND_EXEC,"},{"line_number":1068,"context_line":"\t\t.help \u003d \"Starts an IPDBG JTAG-Host server.\","},{"line_number":1069,"context_line":"\t\t.usage \u003d \"-tap device.tap -hub ir_value [dr_length]\""},{"line_number":1070,"context_line":"\t\t\t\t \" [-port number] [-tool number] [-vir [vir_value [length [instr_code]]]]\","},{"line_number":1071,"context_line":"\t}, {"},{"line_number":1072,"context_line":"\t\t.name \u003d \"stop\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"7b28f192_dc4a1699","line":1069,"updated":"2023-12-17 20:34:40.000000000","message":"already in the old code, the usage was not complete.\nAlso the \"stop\" has incomplete usage","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8f91a82bd2bca0353348300b86347b54fd410a66","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"\t\t.handler \u003d handle_ipdbg_start_command,"},{"line_number":1067,"context_line":"\t\t.mode \u003d COMMAND_EXEC,"},{"line_number":1068,"context_line":"\t\t.help \u003d \"Starts an IPDBG JTAG-Host server.\","},{"line_number":1069,"context_line":"\t\t.usage \u003d \"-tap device.tap -hub ir_value [dr_length]\""},{"line_number":1070,"context_line":"\t\t\t\t \" [-port number] [-tool number] [-vir [vir_value [length [instr_code]]]]\","},{"line_number":1071,"context_line":"\t}, {"},{"line_number":1072,"context_line":"\t\t.name \u003d \"stop\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"1d3e371c_4d8bdd5a","line":1069,"in_reply_to":"503fc823_1783df18","updated":"2024-01-09 23:25:02.000000000","message":"Done","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"5e4f2acd46b226d7526ae8cd0a7eec83206bf90d","unresolved":true,"context_lines":[{"line_number":1066,"context_line":"\t\t.handler \u003d handle_ipdbg_start_command,"},{"line_number":1067,"context_line":"\t\t.mode \u003d COMMAND_EXEC,"},{"line_number":1068,"context_line":"\t\t.help \u003d \"Starts an IPDBG JTAG-Host server.\","},{"line_number":1069,"context_line":"\t\t.usage \u003d \"-tap device.tap -hub ir_value [dr_length]\""},{"line_number":1070,"context_line":"\t\t\t\t \" [-port number] [-tool number] [-vir [vir_value [length [instr_code]]]]\","},{"line_number":1071,"context_line":"\t}, {"},{"line_number":1072,"context_line":"\t\t.name \u003d \"stop\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"503fc823_1783df18","line":1069,"in_reply_to":"7b28f192_dc4a1699","updated":"2023-12-18 21:14:56.000000000","message":"I will fix when we agree on the previous topic.","commit_id":"93420d388ff1d76faa655b8904c6d27b469a9571"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"\tif (virtual_ir)"},{"line_number":289,"context_line":"\t\tnew_hub-\u003escratch_memory.vir_out_val \u003d calloc(1, DIV_ROUND_UP(virtual_ir-\u003elength, 8));"},{"line_number":290,"context_line":"}"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"static void ipdbg_free_hub(struct ipdbg_hub *hub)"},{"line_number":293,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aef77536_f955042f","line":290,"updated":"2024-01-27 17:30:55.000000000","message":"Also the allocation of hub can be moved here, and passing \"name\" in the list of parameters, the strdup() can be moved here too.\nFor consistency with OpenOCD code and to be help reading this code, I prefer you move here the check for the allocated memories, and issue a\nLOG_ERROR(\"Out of memory\");\nis one of them fails.\nTo free the partial allocation, you can call ipdbg_free_hub() below.\nThen this function returns NULL or hub.","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"\tif (virtual_ir)"},{"line_number":289,"context_line":"\t\tnew_hub-\u003escratch_memory.vir_out_val \u003d calloc(1, DIV_ROUND_UP(virtual_ir-\u003elength, 8));"},{"line_number":290,"context_line":"}"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"static void ipdbg_free_hub(struct ipdbg_hub *hub)"},{"line_number":293,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"0ed1f94c_76e50003","line":290,"in_reply_to":"aef77536_f955042f","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":888,"context_line":"\t{"},{"line_number":889,"context_line":"\t\t.name \u003d \"ipdbg\","},{"line_number":890,"context_line":"\t\t.mode \u003d COMMAND_EXEC,"},{"line_number":891,"context_line":"\t\t.handler \u003d handle_ipdbg_start_command,"},{"line_number":892,"context_line":"\t\t.help \u003d \"IPDBG Hub commands.\","},{"line_number":893,"context_line":"\t\t.usage \u003d \"\","},{"line_number":894,"context_line":"\t\t.chain \u003d ipdbg_hostserver_subcommand_handlers"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"fce98c95_d812519a","line":891,"updated":"2024-01-27 17:30:55.000000000","message":"I think this should not be here","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":888,"context_line":"\t{"},{"line_number":889,"context_line":"\t\t.name \u003d \"ipdbg\","},{"line_number":890,"context_line":"\t\t.mode \u003d COMMAND_EXEC,"},{"line_number":891,"context_line":"\t\t.handler \u003d handle_ipdbg_start_command,"},{"line_number":892,"context_line":"\t\t.help \u003d \"IPDBG Hub commands.\","},{"line_number":893,"context_line":"\t\t.usage \u003d \"\","},{"line_number":894,"context_line":"\t\t.chain \u003d ipdbg_hostserver_subcommand_handlers"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"dca6a115_e60efb3d","line":891,"in_reply_to":"fce98c95_d812519a","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":960,"context_line":"\treturn ERROR_OK;"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"err2:"},{"line_number":963,"context_line":"\tfree(new_hub-\u003escratch_memory.vir_out_val);"},{"line_number":964,"context_line":"\tfree(new_hub-\u003econnections);"},{"line_number":965,"context_line":"\tfree(new_hub-\u003escratch_memory.fields);"},{"line_number":966,"context_line":"\tfree(new_hub-\u003escratch_memory.dr_in_vals);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"030315b4_2466cba2","line":963,"updated":"2024-01-27 17:30:55.000000000","message":"here you can call ipdbg_free_hub(), I think","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":960,"context_line":"\treturn ERROR_OK;"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"err2:"},{"line_number":963,"context_line":"\tfree(new_hub-\u003escratch_memory.vir_out_val);"},{"line_number":964,"context_line":"\tfree(new_hub-\u003econnections);"},{"line_number":965,"context_line":"\tfree(new_hub-\u003escratch_memory.fields);"},{"line_number":966,"context_line":"\tfree(new_hub-\u003escratch_memory.dr_in_vals);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"361bd51e_4324d8d6","line":963,"in_reply_to":"030315b4_2466cba2","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6ddeb282955ab6db70ed6e384a7ae6faf5c4f55f","unresolved":true,"context_lines":[{"line_number":1095,"context_line":"\t\t.name \u003d \"create-hub\","},{"line_number":1096,"context_line":"\t\t.mode \u003d COMMAND_ANY,"},{"line_number":1097,"context_line":"\t\t.handler \u003d handle_ipdbg_create_hub_command,"},{"line_number":1098,"context_line":"\t\t/*.jim_handler \u003d jim_handle_ipdbg_create_hub_command,*/"},{"line_number":1099,"context_line":"\t\t.help \u003d \"create a IPDBG Hub\","},{"line_number":1100,"context_line":"\t\t.usage \u003d \"name.ipdbghub (-tap device.tap -ir value [dr_length] |\""},{"line_number":1101,"context_line":"\t\t\t\" -pld name.pld [user]) [-vir [vir_value [length [instr_code]]]]\","}],"source_content_type":"text/x-csrc","patch_set":5,"id":"391b3747_76af3416","line":1098,"updated":"2024-01-27 17:30:55.000000000","message":"drop this line. I\u0027m removing all the .jim_handler around","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"8778a5536417677f1488960ad100cecad9788c37","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"\t\t.name \u003d \"create-hub\","},{"line_number":1096,"context_line":"\t\t.mode \u003d COMMAND_ANY,"},{"line_number":1097,"context_line":"\t\t.handler \u003d handle_ipdbg_create_hub_command,"},{"line_number":1098,"context_line":"\t\t/*.jim_handler \u003d jim_handle_ipdbg_create_hub_command,*/"},{"line_number":1099,"context_line":"\t\t.help \u003d \"create a IPDBG Hub\","},{"line_number":1100,"context_line":"\t\t.usage \u003d \"name.ipdbghub (-tap device.tap -ir value [dr_length] |\""},{"line_number":1101,"context_line":"\t\t\t\" -pld name.pld [user]) [-vir [vir_value [length [instr_code]]]]\","}],"source_content_type":"text/x-csrc","patch_set":5,"id":"94f7a936_be9c3375","line":1098,"in_reply_to":"391b3747_76af3416","updated":"2024-01-29 20:04:57.000000000","message":"Done","commit_id":"c505a88ac10ba856811e93d945e18c6b9f3753f8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"d58d91ea026e5425f19fbdc334124a6beab14c5a","unresolved":true,"context_lines":[{"line_number":820,"context_line":"\tchar port_str_buffer[IPDBG_TCP_PORT_STR_MAX_LENGTH];"},{"line_number":821,"context_line":"\tsnprintf(port_str_buffer, IPDBG_TCP_PORT_STR_MAX_LENGTH, \"%u\", port);"},{"line_number":822,"context_line":"\tretval \u003d add_service(\u0026ipdbg_service_driver, port_str_buffer, 1, service);"},{"line_number":823,"context_line":"\tif (retval \u003d\u003d ERROR_OK) {"},{"line_number":824,"context_line":"\t\tipdbg_add_service(service);"},{"line_number":825,"context_line":"\t\thub-\u003eactive_services++;"},{"line_number":826,"context_line":"\t} else {"},{"line_number":827,"context_line":"\t\tfree(service);"},{"line_number":828,"context_line":"\t}"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"\treturn retval;"},{"line_number":831,"context_line":"}"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"COMMAND_HANDLER(handle_ipdbg_start_command)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"6472da6f_d6804064","line":830,"range":{"start_line":823,"start_character":1,"end_line":830,"end_character":15},"updated":"2024-02-17 21:41:31.000000000","message":"it\u0027s not mandate in the coding style, but it\u0027s a common way in openocd code, so it helps to keep code consistent.\nHere it\u0027s preferred to write this part as:\n```\n  if (retval !\u003d ERROR_OK) {\n    free(service);\n    return retval;\n  }\n  ipdbg_add_service(service);\n  hub-\u003eactive_services++;\n  return ERROR_OK;\n```","commit_id":"a2f0dd0df3cdad65e391d67d5468f70950ae3017"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"12dc47826e2f74edd852644ac61977deb562d7e5","unresolved":false,"context_lines":[{"line_number":820,"context_line":"\tchar port_str_buffer[IPDBG_TCP_PORT_STR_MAX_LENGTH];"},{"line_number":821,"context_line":"\tsnprintf(port_str_buffer, IPDBG_TCP_PORT_STR_MAX_LENGTH, \"%u\", port);"},{"line_number":822,"context_line":"\tretval \u003d add_service(\u0026ipdbg_service_driver, port_str_buffer, 1, service);"},{"line_number":823,"context_line":"\tif (retval \u003d\u003d ERROR_OK) {"},{"line_number":824,"context_line":"\t\tipdbg_add_service(service);"},{"line_number":825,"context_line":"\t\thub-\u003eactive_services++;"},{"line_number":826,"context_line":"\t} else {"},{"line_number":827,"context_line":"\t\tfree(service);"},{"line_number":828,"context_line":"\t}"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"\treturn retval;"},{"line_number":831,"context_line":"}"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"COMMAND_HANDLER(handle_ipdbg_start_command)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"8bf6758e_8d82c39f","line":830,"range":{"start_line":823,"start_character":1,"end_line":830,"end_character":15},"in_reply_to":"6472da6f_d6804064","updated":"2024-02-18 21:17:44.000000000","message":"Done","commit_id":"a2f0dd0df3cdad65e391d67d5468f70950ae3017"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":true,"context_lines":[{"line_number":279,"context_line":"\tif (!hub)"},{"line_number":280,"context_line":"\t\treturn;"},{"line_number":281,"context_line":"\tfree(hub-\u003econnections);"},{"line_number":282,"context_line":"\tfree(hub-\u003evirtual_ir);"},{"line_number":283,"context_line":"\tfree(hub-\u003ename);"},{"line_number":284,"context_line":"\tfree(hub-\u003escratch_memory.dr_out_vals);"},{"line_number":285,"context_line":"\tfree(hub-\u003escratch_memory.dr_in_vals);"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"c4ee4dd4_16b6c54c","line":282,"updated":"2024-03-16 21:11:01.000000000","message":"2.1.1. here is where ```virtual_ir``` is freed the first time","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[{"line_number":279,"context_line":"\tif (!hub)"},{"line_number":280,"context_line":"\t\treturn;"},{"line_number":281,"context_line":"\tfree(hub-\u003econnections);"},{"line_number":282,"context_line":"\tfree(hub-\u003evirtual_ir);"},{"line_number":283,"context_line":"\tfree(hub-\u003ename);"},{"line_number":284,"context_line":"\tfree(hub-\u003escratch_memory.dr_out_vals);"},{"line_number":285,"context_line":"\tfree(hub-\u003escratch_memory.dr_in_vals);"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"97030783_0a0b64f8","line":282,"in_reply_to":"c4ee4dd4_16b6c54c","updated":"2024-03-17 00:21:45.000000000","message":"Done","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":true,"context_lines":[{"line_number":958,"context_line":"\tnew_hub-\u003exoff_mask            \u003d BIT(data_register_length - 2);"},{"line_number":959,"context_line":"\tnew_hub-\u003etool_mask            \u003d (new_hub-\u003exoff_mask - 1) \u003e\u003e 8;"},{"line_number":960,"context_line":"\tnew_hub-\u003elast_dn_tool         \u003d new_hub-\u003etool_mask;"},{"line_number":961,"context_line":"\tnew_hub-\u003evirtual_ir           \u003d virtual_ir;"},{"line_number":962,"context_line":"\tnew_hub-\u003emax_tools            \u003d ipdbg_max_tools_from_data_register_length(data_register_length);"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"\tint retval \u003d ipdbg_register_hub_command(new_hub, cmd);"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"bb9040f2_64448642","line":961,"updated":"2024-03-16 21:11:01.000000000","message":"2.1. ```virtual_ir``` is assigned to ```new_hub-\u003evirtual_ir```","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[{"line_number":958,"context_line":"\tnew_hub-\u003exoff_mask            \u003d BIT(data_register_length - 2);"},{"line_number":959,"context_line":"\tnew_hub-\u003etool_mask            \u003d (new_hub-\u003exoff_mask - 1) \u003e\u003e 8;"},{"line_number":960,"context_line":"\tnew_hub-\u003elast_dn_tool         \u003d new_hub-\u003etool_mask;"},{"line_number":961,"context_line":"\tnew_hub-\u003evirtual_ir           \u003d virtual_ir;"},{"line_number":962,"context_line":"\tnew_hub-\u003emax_tools            \u003d ipdbg_max_tools_from_data_register_length(data_register_length);"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"\tint retval \u003d ipdbg_register_hub_command(new_hub, cmd);"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"22244fd7_baf98e60","line":961,"in_reply_to":"bb9040f2_64448642","updated":"2024-03-17 00:21:45.000000000","message":"Done","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":true,"context_lines":[{"line_number":964,"context_line":"\tint retval \u003d ipdbg_register_hub_command(new_hub, cmd);"},{"line_number":965,"context_line":"\tif (retval !\u003d ERROR_OK) {"},{"line_number":966,"context_line":"\t\tLOG_ERROR(\"Creating hub failed\");"},{"line_number":967,"context_line":"\t\tipdbg_free_hub(new_hub);"},{"line_number":968,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":969,"context_line":"\t}"},{"line_number":970,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":10,"id":"5cea7ff4_77b44851","line":967,"updated":"2024-03-16 21:11:01.000000000","message":"2.2. in case of error, ipdbg_free_hub() free all the fields in ```new_hub```, including ```virtual_ir```","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[{"line_number":964,"context_line":"\tint retval \u003d ipdbg_register_hub_command(new_hub, cmd);"},{"line_number":965,"context_line":"\tif (retval !\u003d ERROR_OK) {"},{"line_number":966,"context_line":"\t\tLOG_ERROR(\"Creating hub failed\");"},{"line_number":967,"context_line":"\t\tipdbg_free_hub(new_hub);"},{"line_number":968,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":969,"context_line":"\t}"},{"line_number":970,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":10,"id":"2832767c_b37fa702","line":967,"in_reply_to":"5cea7ff4_77b44851","updated":"2024-03-17 00:21:45.000000000","message":"Done","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":true,"context_lines":[{"line_number":1067,"context_line":"\t}"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"\tif (has_virtual_ir) {"},{"line_number":1070,"context_line":"\t\tvirtual_ir \u003d calloc(1, sizeof(struct ipdbg_virtual_ir_info));"},{"line_number":1071,"context_line":"\t\tif (!virtual_ir) {"},{"line_number":1072,"context_line":"\t\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":1073,"context_line":"\t\t\treturn ERROR_FAIL;"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"5544c047_04d19047","line":1070,"updated":"2024-03-16 21:11:01.000000000","message":"1. ```virtual_ir``` is allocated","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"\t}"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"\tif (has_virtual_ir) {"},{"line_number":1070,"context_line":"\t\tvirtual_ir \u003d calloc(1, sizeof(struct ipdbg_virtual_ir_info));"},{"line_number":1071,"context_line":"\t\tif (!virtual_ir) {"},{"line_number":1072,"context_line":"\t\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":1073,"context_line":"\t\t\treturn ERROR_FAIL;"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"b43780a5_eed5bae8","line":1070,"in_reply_to":"5544c047_04d19047","updated":"2024-03-17 00:21:45.000000000","message":"Done","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":true,"context_lines":[{"line_number":1083,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1084,"context_line":"\t}"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"\tint retval \u003d ipdbg_create_hub(tap, user_instruction, data_register_length, virtual_ir, hub_name, cmd);"},{"line_number":1087,"context_line":"\tif (retval !\u003d ERROR_OK)"},{"line_number":1088,"context_line":"\t\tfree(virtual_ir);"},{"line_number":1089,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":10,"id":"e42a0d10_df5a73f0","line":1086,"updated":"2024-03-16 21:11:01.000000000","message":"2. an error in ipdbg_create_hub() causes a free() of ```virtual_ir```\n   details in the function","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[{"line_number":1083,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1084,"context_line":"\t}"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"\tint retval \u003d ipdbg_create_hub(tap, user_instruction, data_register_length, virtual_ir, hub_name, cmd);"},{"line_number":1087,"context_line":"\tif (retval !\u003d ERROR_OK)"},{"line_number":1088,"context_line":"\t\tfree(virtual_ir);"},{"line_number":1089,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":10,"id":"40e5c41c_38912d98","line":1086,"in_reply_to":"e42a0d10_df5a73f0","updated":"2024-03-17 00:21:45.000000000","message":"Done","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"bf2c6fd3fe74a3ad6ea1a1d3abf40bebcd29452b","unresolved":true,"context_lines":[{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"\tint retval \u003d ipdbg_create_hub(tap, user_instruction, data_register_length, virtual_ir, hub_name, cmd);"},{"line_number":1087,"context_line":"\tif (retval !\u003d ERROR_OK)"},{"line_number":1088,"context_line":"\t\tfree(virtual_ir);"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"\treturn retval;"},{"line_number":1091,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"0f9415a1_ba740938","line":1088,"updated":"2024-03-16 21:11:01.000000000","message":"3. double free() as ```virtual_ir``` is freed again","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"4c142c7c76a1c8752e981067e260d33fd1f75ae1","unresolved":false,"context_lines":[{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"\tint retval \u003d ipdbg_create_hub(tap, user_instruction, data_register_length, virtual_ir, hub_name, cmd);"},{"line_number":1087,"context_line":"\tif (retval !\u003d ERROR_OK)"},{"line_number":1088,"context_line":"\t\tfree(virtual_ir);"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"\treturn retval;"},{"line_number":1091,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":10,"id":"2ee5dd77_42696b1c","line":1088,"in_reply_to":"0f9415a1_ba740938","updated":"2024-03-17 00:21:45.000000000","message":"Doen","commit_id":"7a77355a3ea574dc5b7fc0a6ea8be413589ef847"}]}
