)]}'
{
  "commit": "61fb73769a0168afa466bb2245a1a233942203bb",
  "tree": "d8f1ca94d686cfca7fbc7cff14c1d54bc0ebecdd",
  "parents": [
    "2b826f759256b77b447da9831b079e32a7bb0cdb"
  ],
  "author": {
    "name": "Tankut Baris Aktemur",
    "email": "tankut.baris.aktemur@intel.com",
    "time": "Mon Feb 07 08:26:56 2022 +0100"
  },
  "committer": {
    "name": "Tankut Baris Aktemur",
    "email": "tankut.baris.aktemur@intel.com",
    "time": "Mon Feb 07 08:26:56 2022 +0100"
  },
  "message": "gdb: add the \u0027set/show suppress-cli-notifications\u0027 command\n\nGDB already has a flag to suppress printing notification events, such\nas thread and inferior context switches, on the CLI.  This is used\ninternally when executing commands.  Make the flag available to the\nuser via a new command.  This is expected to be useful in scripts.\n\nFor instance, suppose that when Inferior 1 gets to a certain state,\nyou want to add and set up a new inferior using the commands below,\nbut you also want to have a reduced/clean output.\n\n  define do-setup\n    printf \"Setting up Inferior 2...\\n\"\n    add-inferior -exec a.out\n    inferior 2\n    break file.c:3\n    run\n    inferior 1\n    printf \"Done\\n\"\n  end\n\nCurrently, GDB prints\n\n  (gdb) do-setup\n  Setting up Inferior 2...\n  [New inferior 2]\n  Added inferior 2 on connection 1 (native)\n  [Switching to inferior 2 [\u003cnull\u003e] (/tmp/a.out)]\n  Breakpoint 2 at 0x1155: file file.c, line 3.\n\n  Thread 2.1 \"a.out\" hit Breakpoint 2, main () at file.c:3\n  3         return 0;\n  [Switching to inferior 1 [process 7670] (/tmp/test)]\n  [Switching to thread 1.1 (process 7670)]\n  #0  main () at test.c:2\n  2         int a \u003d 1;\n  Done\n\nGDB\u0027s Python API make it possible to capture and return GDB\u0027s output,\nbut this does not work for all the streams.  In particular, CLI\nnotification events are not captured:\n\n  (gdb) python gdb.execute(\"do-setup\", False, True)\n  [Switching to inferior 2 [\u003cnull\u003e] (/tmp/a.out)]\n\n  Thread 2.1 \"a.out\" hit Breakpoint 2, main () at file.c:3\n  3         return 0;\n  [Switching to inferior 1 [process 8263] (/tmp/test)]\n  [Switching to thread 1.1 (process 8263)]\n  #0  main () at test.c:2\n  2         int a \u003d 1;\n\nYou can use the new \"set suppress-cli-notifications\" command to\nsuppress the output:\n\n  (gdb) set suppress-cli-notifications on\n  (gdb) do-setup\n  Setting up Inferior 2...\n  [New inferior 2]\n  Added inferior 2 on connection 1 (native)\n  Breakpoint 2 at 0x1155: file file.c, line 3.\n  Done\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8da68c88defc3ca3384f0bb4db5c3892f6becc6e",
      "old_mode": 33188,
      "old_path": "gdb/NEWS",
      "new_id": "c739930bfc7a665275e0f54d00a28706a0728279",
      "new_mode": 33188,
      "new_path": "gdb/NEWS"
    },
    {
      "type": "modify",
      "old_id": "15156792c504ab4ef081f41082c8a578465f584f",
      "old_mode": 33188,
      "old_path": "gdb/cli/cli-cmds.c",
      "new_id": "31d398cb13bd6d966ce3a46712c5b1f0bb0449de",
      "new_mode": 33188,
      "new_path": "gdb/cli/cli-cmds.c"
    },
    {
      "type": "modify",
      "old_id": "2073d9290996db28c14b4d59dc523355794ea8d6",
      "old_mode": 33188,
      "old_path": "gdb/doc/gdb.texinfo",
      "new_id": "8e7fb2d9020bfb4da8402577aec1f03b67686422",
      "new_mode": 33188,
      "new_path": "gdb/doc/gdb.texinfo"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "243dbc9c70aebbcb21c8bdfb675e5f8ca0f95ea8",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/cli-suppress-notification.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1e4cc9869e4909501615629692ced717fb4e9fca",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/cli-suppress-notification.exp"
    }
  ]
}
