diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5c5576ed1e..48588a391b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-03-12 Simon Marchi + + * gdb.arch/amd64-disp-step-avx.S: Add nops after _start. + * gdb.arch/amd64-disp-step-avx.exp: Enable "set debug displaced + on" while stepping over the test instruction, match printed + message. + 2020-03-12 Tom de Vries * gdb.base/info-types.exp: Use exp_continue during matching of output diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.S b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.S index 76747360b9..c72f6a5ca8 100644 --- a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.S +++ b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.S @@ -22,7 +22,12 @@ .global _start,main _start: + # The area at _start is used as the displaced stepping buffer. Put + # more than enough nop instructions so that the instructions under test + # below don't conflict with it. + .rept 200 nop + .endr main: nop diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp index 23282f6678..ab83fe6770 100644 --- a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp +++ b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp @@ -92,10 +92,16 @@ proc disp_step_func { func } { set value "0xdeadbeefd3adb33f" set_regs $value + # Turn "debug displaced" on to make sure a displaced step is actually + # executed, not an inline step. + gdb_test_no_output "set debug displaced on" + gdb_test "continue" \ - "Continuing.*Breakpoint.*, ${test_end_label} ().*" \ + "Continuing.*displaced: displaced pc to.*Breakpoint.*, ${test_end_label} ().*" \ "continue to ${test_end_label}" + gdb_test_no_output "set debug displaced off" + verify_regs $value }