]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.S
Fix PR breakpoints/16889: gdb segfaults when printing ASM SDT arguments
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / amd64-stap-optional-prefix.S
1 /* Copyright (C) 2014 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18 #include <sys/sdt.h>
19
20 .file "amd64-stap-optional-prefix.S"
21 .text
22 .globl main
23 main:
24 mov %rsp,%rbp
25 pushq $42
26 STAP_PROBE1(probe, foo, (%rsp))
27 STAP_PROBE1(probe, bar, -8(%rbp))
28 STAP_PROBE1(probe, foo_prefix, 8@(%rsp))
29 STAP_PROBE1(probe, bar_prefix, 8@-8(%rbp))
30 mov %rbp,%rsp
31 xor %rax,%rax
32 ret