)]}'
{
  "commit": "cfb9cb1afd93dc71ea94ec7c7d9bfc0e43ace0bc",
  "tree": "49c2e275a679424765f953e76396ddadf7b0ea7d",
  "parents": [
    "dfec66ffff42d8274132f6df20d5281e10f0e746"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Feb 27 16:18:32 2024 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Feb 27 16:18:32 2024 +0100"
  },
  "message": "[gdb/testsuite] Fix test in gdb.python/py-finish-breakpoint.exp\n\nWith test-case gdb.python/py-finish-breakpoint.exp, we run into:\n...\n(gdb) python print (finishbp_default.hit_count)\nTraceback (most recent call last):\n  File \"\u003cstring\u003e\", line 1, in \u003cmodule\u003e\nRuntimeError: Breakpoint 3 is invalid.\nError while executing Python code.\n(gdb) PASS: gdb.python/py-finish-breakpoint.exp: normal conditions: \\\n  check finishBP on default frame has been hit\n...\n\nThe test producing the pass is:\n...\n    gdb_test \"python print (finishbp_default.hit_count)\" \"1.*\" \\\n      \"check finishBP on default frame has been hit\"\n...\nso the pass is produced because the 1 in \"line 1\" matches \"1.*\".\n\nTemporary breakpoints are removed when hit, and consequently accessing the\nhit_count attribute of a temporary python breakpoint (gdb.Breakpoint class) is\nnot possible, and as per spec we get a RuntimeError.\n\nSo the RuntimeError is correct, and not specific to finish breakpoints.\n\nThe test presumably attempts to match:\n...\n(gdb) python print (finishbp_default.hit_count)\n1\n...\nbut most likely this output was never produced by any gdb version.\n\nFix this by checking whether the finishbp_default breakpoint has hit by\nchecking that finishbp_default.is_valid() is False.\n\nTested on aarch64-linux.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n\nPR testsuite/31391\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d31391\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "45e2630337f6d7993b82265bfb8dbda35e27ebb2",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.python/py-finish-breakpoint.exp",
      "new_id": "600a2f3839242ca9a1d4f19a43645269171162de",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-finish-breakpoint.exp"
    }
  ]
}
