)]}'
{
  "commit": "45aec4e5ed84b69bcdedaed1024edf62bf96f138",
  "tree": "e5f4fe1f0fb7e5bac7b0e1b584a66077b43663d1",
  "parents": [
    "23bb7876f0d69a6f7c0356d7e557774b829a93dc"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Jan 03 23:59:30 2022 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Jan 03 23:59:30 2022 +0100"
  },
  "message": "[gdb/cli] Improve show logging output\n\nBefore commit 3b6acaee895 \"Update more calls to add_prefix_cmd\" we had the\nfollowing output for \"show logging\":\n...\n$ gdb -q -batch -ex \"set trace-commands on\" \\\n    -ex \"set logging off\" \\\n    -ex \"show logging\" \\\n    -ex \"set logging on\" \\\n    -ex \"show logging\"\n+set logging off\n+show logging\nFuture logs will be written to gdb.txt.\nLogs will be appended to the log file.\nOutput will be logged and displayed.\nDebug output will be logged and displayed.\n+set logging on\n+show logging\nCurrently logging to \"gdb.txt\".\nLogs will be appended to the log file.\nOutput will be logged and displayed.\nDebug output will be logged and displayed.\n...\n\nAfter that commit we have instead:\n...\n+set logging off\n+show logging\ndebugredirect:  The logging output mode is off.\nfile:  The current logfile is \"gdb.txt\".\noverwrite:  Whether logging overwrites or appends to the log file is off.\nredirect:  The logging output mode is off.\n+set logging on\n+show logging\ndebugredirect:  The logging output mode is off.\nfile:  The current logfile is \"gdb.txt\".\noverwrite:  Whether logging overwrites or appends to the log file is off.\nredirect:  The logging output mode is off.\n...\nwhich gives less clear output for some subcommands.\n\nOTOH, it\u0027s explicit about whether boolean values are on or off.\n\nThe new text seems to have been chosen to match the set/show help texts:\n...\n(gdb) help show logging\nShow logging options.\n\nList of show logging subcommands:\n\nshow logging debugredirect -- Show the logging debug output mode.\nshow logging file -- Show the current logfile.\nshow logging overwrite -- \\\n  Show whether logging overwrites or appends to the log file.\nshow logging redirect -- Show the logging output mode.\n...\n\nMake the show logging messages more clear, while still keep the boolean\nvalues explicit, such that we have:\n...\n$ ./gdb.sh -q -batch -ex \"show logging\"\nlogging debugredirect:  off: \\\n  Debug output will go to both the screen and the log file.\nlogging enabled:  off: Logging is disabled.\nlogging file:  The current logfile is \"gdb.txt\".\nlogging overwrite:  off: Logging appends to the log file.\nlogging redirect:  off: Output will go to both the screen and the log file.\n...\n\nTested on x86_64-linux.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d659a0dc2efda878901d60c0fb21f871e8b93352",
      "old_mode": 33188,
      "old_path": "gdb/cli/cli-logging.c",
      "new_id": "193a87331db3244c209172fb663e0cbd0360bda8",
      "new_mode": 33188,
      "new_path": "gdb/cli/cli-logging.c"
    }
  ]
}
