aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/ptracepreload.c
blob: c6e5fbb290f76299d75e3cedd72a581f25c07503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#define _POSIX_SOURCE

#include <stdio.h>
#include <unistd.h>
#include <sys/prctl.h>
#include <sys/types.h>

int ptracepreload_init(void) __attribute__((constructor,visibility("hidden")));

int ptracepreload_init(void)
{
    prctl(0x59616d61, getppid(), 0, 0, 0);
    puts("eeks\n");
    return 0;
}