forked from Imagelibrary/binutils-gdb
In a record session, when we move backward, GDB switches from normal execution to simulation. Moving forward again, the emulation continues until the end of the reverse history. When the end is reached, the execution stops, and a warning message is shown. This message has been modified to indicate that the forward emulation has reached the end, but the execution can continue as normal, and the recording will also continue. Before this patch, the warning message shown in that case was the same as in the reverse case. This meant that when the end of history was reached in either backward or forward emulation, the same message was displayed: "No more reverse-execution history." This message has changed for these two cases. Backward emulation: "Reached end of recorded history; stopping. Backward execution from here not possible." Forward emulation: "Reached end of recorded history; stopping. Following forward execution will be added to history." The reason for this change is that the initial message was deceiving, for the forward case, making the user believe that forward debugging could not continue. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31224 Reviewed-By: Markus T. Metzger <markus.t.metzger@intel.com> (btrace) Approved-By: Guinevere Larsen <blarsen@redhat.com>
63 lines
1.8 KiB
Plaintext
63 lines
1.8 KiB
Plaintext
# Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
require supports_reverse
|
|
|
|
standard_testfile ".S" "${gdb_test_file_name}-nodebug.S"
|
|
set executable ${testfile}
|
|
|
|
if [info exists COMPILE] {
|
|
# make check RUNTESTFLAGS="gdb.reverse/singlejmp-reverse.exp COMPILE=1"
|
|
if { [build_executable_from_specs ${testfile}.exp $executable {} \
|
|
${testfile}.c {debug optimize=-O2} \
|
|
${testfile}-nodebug.c {optimize=-O2} \
|
|
] == -1 } {
|
|
return -1
|
|
}
|
|
} else {
|
|
require is_x86_64_m64_target
|
|
if { [build_executable ${testfile}.exp ${testfile} \
|
|
[list ${srcfile} ${srcfile2}] {}] == -1 } {
|
|
return -1
|
|
}
|
|
}
|
|
|
|
clean_restart $executable
|
|
|
|
if ![runto_main] {
|
|
return -1
|
|
}
|
|
|
|
if [supports_process_record] {
|
|
gdb_test_no_output "record"
|
|
}
|
|
|
|
gdb_test "next" {v = 1;} "next to v = 1"
|
|
gdb_test "next" {f \(\);} "next to f"
|
|
gdb_test "next" {nodebug \(\);} "next to nodebug"
|
|
gdb_test "next" {v = 3;} "next to v = 3"
|
|
|
|
# FAIL was:
|
|
# Reached end of recorded history; stopping.
|
|
# Backward execution from here not possible.
|
|
# {
|
|
gdb_test "reverse-step" {nodebug \(\);}
|
|
|
|
# FAIL was:
|
|
# Reached end of recorded history; stopping.
|
|
# Backward execution from here not possible.
|
|
# {
|
|
gdb_test "reverse-next" {f \(\);}
|