1 /* Copyright 2009-2024 Free Software Foundation, Inc.
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 This file is part of the gdb testsuite.
17 It tests displaced stepping over various insns that require special
26 /***********************************************/
39 /***********************************************/
41 /* Absolute jump with leading prefixes.
42 These don't occur in normal code, but gdb should still DTRT. */
45 .global test_prefixed_abs_jump
46 test_prefixed_abs_jump:
48 jmp *test_prefixed_abs_jump_addr
50 test_prefixed_abs_jump_addr:
51 .4byte test_prefixed_abs_jump_target
53 test_prefixed_abs_jump_target:
55 .global test_prefixed_abs_jump_end
56 test_prefixed_abs_jump_end:
59 /***********************************************/
63 mov $0x14,%eax /* getpid */
68 .global test_syscall_end
72 /***********************************************/
74 /* Test syscall again, this time with a prefix.
75 These don't occur in normal code, but gdb should still DTRT. */
77 mov $0x14,%eax /* getpid */
78 .global test_prefixed_syscall
79 test_prefixed_syscall:
83 .global test_prefixed_syscall_end
84 test_prefixed_syscall_end:
87 /***********************************************/
89 /* Test stepping over int3.
90 The prefixes are pointless, but it's possible, so we exercise it. */
103 /***********************************************/
111 /***********************************************/
113 /* subroutine to help test call/ret */
117 .global test_call_end
124 .section .note.GNU-stack,"",@progbits