)]}'
{
  "commit": "99d7dc93ce3a5bbcf30ac6715edf3fb3c0e92d94",
  "tree": "17f48aaf87e61749ee70e2b64a9fc9652aa7146b",
  "parents": [
    "d0c1dcb58e8d88f2c4ede55573dac7f04c3cfd55"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Fri Jan 23 15:12:17 2026 +0000"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Thu Mar 05 17:45:28 2026 +0000"
  },
  "message": "gdb/python: don\u0027t allow FinishBreakpoints for inline frames\n\nCreating a Python gdb.FinishBreakpoint for an inline frame doesn\u0027t\nwork.\n\nIf we look at the \u0027finish\u0027 command, in the finish_command\nfunction (infcmd.c) then we see that GDB handles inline frames very\ndifferent to non-inline frames.\n\nFor non-inline frames GDB creates a temporary breakpoint and then\nresumes the inferior until the breakpoint is hit.\n\nBut for inline frames, GDB steps forward until we have left the inline\nframe.\n\nWhen it comes to gdb.FinishBreakpoint we only have the \"create a\ntemporary breakpoint\" mechanism; that is, after all, what the\nFinishBreakpoint is, it\u0027s a temporary breakpoint placed at the\nreturn address in the caller.\n\nCurrently, when a FinishBreakpoint is created within an inline frame,\nGDB ends up creating the breakpoint at the current $pc.  As a result\nthe breakpoint will not be hit before the current function\nexits (unless there\u0027s a loop going on, but that\u0027s not the point).\n\nWe could imagine what a solution to this problem would look like, GDB\nwould need to figure out the set of addresses for all possible exit\npoints from the inline function, and place a breakpoint at each of\nthese locations.  I don\u0027t propose doing that in this commit.\n\nInstead, I plan to update the docs to note that creating a\nFinishBreakpoint within an inline frame is not allowed, and I will\ncatch this case within bpfinishpy_init (python/py-finishbreakpoint.c)\nand throw an error.\n\nThough the error is new, all I\u0027m doing is raising an error for a case\nthat never worked.\n\nThere\u0027s a new test to cover this case.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d18339\n\nReviewed-By: Eli Zaretskii \u003celiz@gnu.org\u003e\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "009ac7a3f9fd52fa0228ad5c43ec6b3b22e7767b",
      "old_mode": 33188,
      "old_path": "gdb/doc/python.texi",
      "new_id": "2df3b7c042363fff83d7555846dbcb101d642c71",
      "new_mode": 33188,
      "new_path": "gdb/doc/python.texi"
    },
    {
      "type": "modify",
      "old_id": "4af8ec6c75f251a584b379cb1296f4c755cb4a3f",
      "old_mode": 33188,
      "old_path": "gdb/python/py-finishbreakpoint.c",
      "new_id": "834f85037c0da2af7962c47e344b347081de3678",
      "new_mode": 33188,
      "new_path": "gdb/python/py-finishbreakpoint.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c955917a873893856c4eea25a5007957a2d41350",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-finish-breakpoint-inline.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d1c3f3de8f0805af5bbbaa524df83085d8bcdb18",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-finish-breakpoint-inline.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e493dfa4017d192e439e27b36a14d679673b0747",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-finish-breakpoint-inline.py"
    }
  ]
}
