# Regression test for PR 48250

from __future__ import print_function

from bracket import make_sh_test_op

def op():
    return make_sh_test_op('gdb_pie',
r'''
set -x

cat <<\EOF >test.c
#include <stdio.h>
int main(int argc, char **argv) { printf ("hello\n"); return 0; }
EOF

cc -fpie -pie -g test.c -o test

cat <<EOF >test.gdb
break main
run
EOF

gdb --batch -x test.gdb ./test >gdb.out 2>&1

cat gdb.out

! grep "annot access memory" gdb.out
''')
