)]}'
{
  "commit": "d4c4ea75838091b6bf52d97208bd2fa4021951db",
  "tree": "9dd2c5494784d339b133ccfeb43c58a25b26245b",
  "parents": [
    "8abd06e066be7ad41d608b500187e90736c9e8fa"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Fri Jan 06 13:26:19 2023 -0500"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Thu Jan 26 14:31:33 2023 -0500"
  },
  "message": "gdb/testsuite/dap: fix gdb.dap/basic-dap.exp disassembly test for PIE\n\nPrior to this patch, I get:\n\n    \u003e\u003e\u003e {\"seq\": 17, \"type\": \"request\", \"command\": \"disassemble\", \"arguments\": {\"memoryReference\": \"0x115d\", \"instructionCount\": 1}}\n    Content-Length: 147\n\n    {\"request_seq\": 17, \"type\": \"response\", \"command\": \"disassemble\", \"success\": false, \"message\": \"Cannot access memory at address 0x115d\", \"seq\": 41}FAIL: gdb.dap/basic-dap.exp: disassemble one instruction success\n    FAIL: gdb.dap/basic-dap.exp: instructions in disassemble output\n\nThe problem is that the PC to disassemble is taken from the breakpoint\ninsertion response, which happens before running.  With a PIE\nexecutable, that PC is unrelocated, but the disassembly request happens\nafter relocation.\n\nI chose to fix this by watching for a breakpoint changed event giving\nthe new breakpoint address, and recording the address from there.  I\nthink this is an interesting way to fix it, because it adds a bit of\ntest coverage, I don\u0027t think these events are checked right now.\n\nOther ways to fix it would be:\n\n - Get the address by doing a breakpoint insertion after the program is\n   started, or some other way.\n - Do the disassembly by symbol instead of by address.\n - Do the disassembly before running the program.\n\nChange-Id: I3c396f796ac4c8b22e7dfd2fa1c5467f7a47e84e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "795702a5a8f9af333a643e94f5b2f7385edda5d0",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.dap/basic-dap.exp",
      "new_id": "5303e94332009768f154b96ca4f7b3c7f1222c80",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dap/basic-dap.exp"
    }
  ]
}
