)]}'
{
  "commit": "be437614a1ea4aba0c3df9d71328cf798ecc3353",
  "tree": "d3305bf19a1a8624990e2403478194e63345545f",
  "parents": [
    "0ea1e5df96b15f3652ca6a9182c428101271caa5"
  ],
  "author": {
    "name": "Tankut Baris Aktemur",
    "email": "tankut.baris.aktemur@intel.com",
    "time": "Mon May 12 09:10:56 2025 +0200"
  },
  "committer": {
    "name": "Tankut Baris Aktemur",
    "email": "tankut.baris.aktemur@intel.com",
    "time": "Mon May 12 09:11:25 2025 +0200"
  },
  "message": "gdb: add \u0027-stopped\u0027 and \u0027-running\u0027 options to \"info threads\"\n\nAdd two options to \"info threads\": `-stopped` and `-running`.\n\nThe purpose of these options is to filter the output of the command.\nThe `-stopped` option means \"print stopped threads only\" and,\nsimilarly, `-running` means \"print the running threads only\".  When\nboth options are provided by the user, the indication is that the user\nwants the union.  That is, the output contains both stopped and\nrunning threads.\n\nSuppose we have an application with 5 threads, 2 of which have hit a\nbreakpoint.  The \"info threads\" command in the non-stop mode gives:\n\n  (gdb) info threads\n    Id   Target Id             Frame\n  * 1    Thread 0x7ffff7d99740 (running)\n    2    Thread 0x7ffff7d98700 something () at file.c:30\n    3    Thread 0x7ffff7597700 (running)\n    4    Thread 0x7ffff6d96700 something () at file.c:30\n    5    Thread 0x7ffff6595700 (running)\n  (gdb)\n\nUsing the \"-stopped\" flag, we get\n\n  (gdb) info threads -stopped\n    Id   Target Id             Frame\n    2    Thread 0x7ffff7d98700 something () at file.c:30\n    4    Thread 0x7ffff6d96700 something () at file.c:30\n  (gdb)\n\nUsing the \"-running\" flag, we get\n\n  (gdb) info threads -running\n    Id   Target Id             Frame\n  * 1    Thread 0x7ffff7d99740 (running)\n    3    Thread 0x7ffff7597700 (running)\n    5    Thread 0x7ffff6595700 (running)\n  (gdb)\n\nUsing both flags prints all:\n\n  (gdb) info threads -stopped -running\n    Id   Target Id             Frame\n  * 1    Thread 0x7ffff7d99740 (running)\n    2    Thread 0x7ffff7d98700 something () at file.c:30\n    3    Thread 0x7ffff7597700 (running)\n    4    Thread 0x7ffff6d96700 something () at file.c:30\n    5    Thread 0x7ffff6595700 (running)\n  (gdb)\n\nWhen combined with a thread ID, filtering applies to those threads that\nare matched by the ID.\n\n  (gdb) info threads 3\n    Id   Target Id             Frame\n    3    Thread 0x7ffff7597700 (running)\n  (gdb) info threads -stopped 3\n  No threads matched.\n  (gdb)\n\nRegression-tested on X86_64 Linux.\n\nReviewed-By: Eli Zaretskii \u003celiz@gnu.org\u003e\nReviewed-By: Guinevere Larsen \u003cguinevere@redhat.com\u003e\nApproved-by: Pedro Alves \u003cpedro@palves.net\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "18a8b7475b44b54c6ab3c857d84e84717e728639",
      "old_mode": 33188,
      "old_path": "gdb/NEWS",
      "new_id": "d3699de1653275ad8b8f2c97321ebe494d221b46",
      "new_mode": 33188,
      "new_path": "gdb/NEWS"
    },
    {
      "type": "modify",
      "old_id": "5e5e888cf38cea33a9d7b4e77039207374ec2d5e",
      "old_mode": 33188,
      "old_path": "gdb/doc/gdb.texinfo",
      "new_id": "05f550233fe2f2925859f9301b8e24acb75172a7",
      "new_mode": 33188,
      "new_path": "gdb/doc/gdb.texinfo"
    },
    {
      "type": "modify",
      "old_id": "7822e4a0baa7470d975ab36d132d1aa07c055bf2",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/options.exp",
      "new_id": "a0947e2f6f4be3903266575af562bd2faae35795",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/options.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2c4cd854bb7e2431d89c92fa409976fce14a18d6",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.threads/info-threads-options.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "38e4e67f08b69381a18fccd9102550aca138164e",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.threads/info-threads-options.exp"
    },
    {
      "type": "modify",
      "old_id": "d84d326a8c3b9dd916af9b65ae3aa4954b52a66f",
      "old_mode": 33188,
      "old_path": "gdb/thread.c",
      "new_id": "0228027fb928160fde98e338a4eb8498722dd539",
      "new_mode": 33188,
      "new_path": "gdb/thread.c"
    }
  ]
}
