)]}'
{
  "commit": "faec7017f0302e33a3d2be107e83a3ef21a4813e",
  "tree": "8a29b3cba097e206dce5d0d7fc8d4a8eeca9da1d",
  "parents": [
    "772f4c2e98100e2bc3277bb7a214b8751c1cf968"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Jun 06 19:27:46 2022 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Jun 06 19:27:46 2022 +0200"
  },
  "message": "[gdb] Fix maint selftest -v print_one_insn\n\nWhen running the print_one_insn selftests with -v, I get:\n...\n$ gdb -q -batch -ex \"maint selftest -v print_one_insn\"\nRunning selftest print_one_insn::A6.\n.shor   0x783eRunning selftest print_one_insn::A7.\ntrap_s  0x1Running selftest print_one_insn::ARC600.\n.shor   0x783eRunning selftest print_one_insn::ARC601.\nRunning selftest print_one_insn::ARC700.\ntrap_s  0x1Running selftest print_one_insn::ARCv2.\ntrap_s  0x1Running selftest print_one_insn::EM.\ntrap_s  0x1Running selftest print_one_insn::HS.\ntrap_s  0x1Running selftest print_one_insn::Loongarch32.\n...\n\nThe insn is written to gdb_stdout, and there is code in the selftest to add a\nnewline after the insn, which writes to stream().\n\nThe stream() ui_file points into a string buffer, which the disassembler uses\nbefore writing to gdb_stdout, so writing into it after the disassembler has\nfinished has no effect.\n\nFix this by using gdb_stdlog and debug_printf (which is what the unit test\ninfrastructure itself uses) instead, such that we have:\n...\nRunning selftest print_one_insn::A6.\n.shor   0x783e\nRunning selftest print_one_insn::A7.\ntrap_s  0x1\nRunning selftest print_one_insn::ARC600.\n.shor   0x783e\nRunning selftest print_one_insn::ARC601.\nRunning selftest print_one_insn::ARC700.\ntrap_s  0x1\nRunning selftest print_one_insn::ARCv2.\ntrap_s  0x1\nRunning selftest print_one_insn::Loongarch32.\n...\n\nNote: I\u0027ve also removed the printing of arch_name, which would give\nus otherwise the redundant:\n...\nRunning selftest print_one_insn::A6.\narc .shor       0x783e\nRunning selftest print_one_insn::A7.\narc trap_s      0x1\n...\n\nTested on x86_64-linux.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b3c5d997720427972c5a252b338d0910b9938a87",
      "old_mode": 33188,
      "old_path": "gdb/disasm-selftests.c",
      "new_id": "266745d01c7840d1d1447a8d79f24b80ba9405a7",
      "new_mode": 33188,
      "new_path": "gdb/disasm-selftests.c"
    }
  ]
}
