)]}'
{
  "commit": "31d025c07d3536fb50f226db74c836595a9e361a",
  "tree": "11b8d4e6581066f43aa5e63fe76165a000a0e436",
  "parents": [
    "8c62f01902b29b582eca5f28757b0018a7fb4179"
  ],
  "author": {
    "name": "Markus Metzger",
    "email": "markus.t.metzger@intel.com",
    "time": "Fri Jun 10 11:24:21 2016 +0200"
  },
  "committer": {
    "name": "Markus Metzger",
    "email": "markus.t.metzger@intel.com",
    "time": "Wed Jul 06 08:31:22 2016 +0200"
  },
  "message": "btrace: record stop moves to the end of the trace\n\nWith the btrace record target the \"record stop\" command implicitly moves all\ntraced threads to the end of their respective history.  Unlike record full,\nrecord btrace does not trace data and is therefore not able to resume debugging\nat the current replay position.\n\nWe forgot to actually change the replay position before disabling tracing.  This\nresulted in STOP_PC remaining at its old position if the current thread had been\nreplaying, which, in turn, resulted in GDB commands such as list or backtrace\nusing the wrong context.\n\nFix it by moving the selected thread to the end of its recorded history.\nTogether with the preceding patches, this will result in a front-end\nnotification for the selected thread if it had been replaying.  Stop replaying\nother threads silently, i.e. without a front-end notification.\n\nIf the selected thread isn\u0027t replaying, notify front-ends without printing the\n(unchanged) frame.  This results in a *stopped MI notification without any\nthread information.\n\nIn non-stop mode, move all replaying threads to the end of their respective\nhistories.  This will result in a front-end notification and in the updated\nlocation to be printed for each replaying thread.  We prefix the output with\nthe thread number like this:\n\n    (gdb) record stop\n    Thread 1 (Thread 0x7ffff7fcc740 (LWP 66711)) stopped replaying.\n    test (arg\u003d0x0) at gdb.btrace/multi-thread-step.c:34\n    34        global \u003d 42; /* bp.2 */\n    Thread 2 (Thread 0x7ffff74fb700 (LWP 66716)) stopped replaying.\n    test (arg\u003d0x0) at gdb.btrace/multi-thread-step.c:34\n    34        global \u003d 42; /* bp.2 */\n    Process record is stopped and all execution logs are deleted.\n\nThanks to Marc Khouzam \u003cmarc.khouzam@ericsson.com\u003e for reporting this.\n\nSigned-off-by: Markus Metzger  \u003cmarkus.t.metzger@intel.com\u003e\n\ngdb/\n\t* record-btrace.c (record_btrace_set_replay)\n\t(record_btrace_stop_replaying): New declaration.\n\t(record_btrace_stop_recording): Call record_btrace_set_replay,\n\trecord_btrace_stop_replaying, and observer_notify_normal_stop.\n\ntestsuite/\n\t* gdb.btrace/non-stop.exp: Test \"record stop\".\n\t* gdb.btrace/non-stop.c (test): Add statement to break at.\n\t* gdb.btrace/stop.exp: New.\n\nChange-Id: I10565a8e4f8bc3c63f79c3ef6595e9f84e3d8100\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1998e43fcd05c2465e5478fa07875892a43fd4d9",
      "old_mode": 33188,
      "old_path": "gdb/record-btrace.c",
      "new_id": "7da78bc508cd737dd8a7d35f4687956b037e0229",
      "new_mode": 33188,
      "new_path": "gdb/record-btrace.c"
    },
    {
      "type": "modify",
      "old_id": "c5870df39d3b2a2b28eec15fd8e17f03e37e280d",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.btrace/non-stop.c",
      "new_id": "b4a7191952a81bcb6970e215fed3ddc5a80225e0",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.btrace/non-stop.c"
    },
    {
      "type": "modify",
      "old_id": "0d5cbe2d5a3260f284390531b998d9c8b1bf3c57",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.btrace/non-stop.exp",
      "new_id": "8dad07c10ed4dd513c4cb2fa5b017a0252ff40b8",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.btrace/non-stop.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "074bab8a9c2fa32b81f373f7a1589dea91a2afbc",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.btrace/stop.exp"
    }
  ]
}
