• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisióne0139aa5f27ebef0bd92a182beca659e169560ef (tree)
Tiempo2016-07-06 15:31:20
AutorMarkus Metzger <markus.t.metzger@inte...>
CommiterMarkus Metzger

Log Message

btrace: check if we're replaying when setting the replay position to the end

When setting the replay position to the end there is nothing to do if we are
not replaying. Check that and return immediately.

This avoids printing the current location if we're already at the end.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

gdb/
* record-btrace.c (record_btrace_set_replay): Check if replaying.

testsuite/
* gdb.btrace/record_goto.exp: Test "record goto end" twice.

Change-Id: I4878892408bab293261bbea40d6af28440ff3ec5

Cambiar Resumen

Diferencia incremental

--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2704,7 +2704,12 @@ record_btrace_set_replay (struct thread_info *tp,
27042704 btinfo = &tp->btrace;
27052705
27062706 if (it == NULL || it->function == NULL)
2707- record_btrace_stop_replaying (tp);
2707+ {
2708+ if (!btrace_is_replaying (tp))
2709+ return;
2710+
2711+ record_btrace_stop_replaying (tp);
2712+ }
27082713 else
27092714 {
27102715 if (btinfo->replay == NULL)
--- a/gdb/testsuite/gdb.btrace/record_goto.exp
+++ b/gdb/testsuite/gdb.btrace/record_goto.exp
@@ -160,6 +160,9 @@ gdb_test "record instruction-history -" [multi_line \
160160 # check that we can go to the end of the trace
161161 gdb_test "record goto end" ".*main \\(\\) at record_goto.c:50.*"
162162
163+# check that we don't repeat the current location if we go to the end again
164+gdb_test_no_output "record goto end" "goto end again"
165+
163166 # check that we're filling up the context correctly
164167 gdb_test "record function-call-history /ci" [multi_line \
165168 "14\t fun2\tinst 35,36" \