)]}'
{
  "commit": "37dff3c3bb185ebd735882300a7fefabd9f30e0f",
  "tree": "2d0557651c3a123dd8042f4608c2d75912c03f06",
  "parents": [
    "daf510bf56541306c5904af87b37385f7de0933c"
  ],
  "author": {
    "name": "Pedro Alves",
    "email": "pedro@palves.net",
    "time": "Tue Jun 21 18:05:19 2022 +0100"
  },
  "committer": {
    "name": "Pedro Alves",
    "email": "pedro@palves.net",
    "time": "Mon Dec 12 20:01:20 2022 +0000"
  },
  "message": "Cancel execution command on thread exit, when stepping, nexting, etc.\n\nIf your target has no support for TARGET_WAITKIND_NO_RESUMED events\n(and no way to support them, such as the yet-unsubmitted AMDGPU\ntarget), and you step over thread exit with scheduler-locking on, this\nis what you get:\n\n (gdb) n\n [Thread ... exited]\n *hang*\n\nGetting back the prompt by typing Ctrl-C may not even work, since no\ninferior thread is running to receive the SIGINT.  Even if it works,\nit seems unnecessarily harsh.  If you started an execution command for\nwhich there\u0027s a clear thread of interest (step, next, until, etc.),\nand that thread disappears, then I think it\u0027s more user friendly if\nGDB just detects the situation and aborts the command, giving back the\nprompt.\n\nThat is what this commit implements.  It does this by explicitly\nrequesting the target to report thread exit events whenever the main\nresumed thread has a thread_fsm.  Note that unlike stepping over a\nbreakpoint, we don\u0027t need to enable clone events in this case.\n\nWith this patch, we get:\n\n (gdb) n\n [Thread 0x7ffff7d89700 (LWP 3961883) exited]\n Command aborted, thread exited.\n (gdb)\n\nChange-Id: I901ab64c91d10830590b2dac217b5264635a2b95",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "21e5aa0f50e0c9492ae0bca9f7697786943df1d6",
      "old_mode": 33188,
      "old_path": "gdb/infrun.c",
      "new_id": "61d2a14c6461490770d83f80bd47e3f0ea106ceb",
      "new_mode": 33188,
      "new_path": "gdb/infrun.c"
    },
    {
      "type": "modify",
      "old_id": "ed8534cf518d5bc3bacd779c9f0da04ece70568c",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.threads/step-over-thread-exit.exp",
      "new_id": "a0056740478e017819018cd3d17ef9278fdf5833",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.threads/step-over-thread-exit.exp"
    }
  ]
}
