forked from qt-creator/qt-creator
debugger: proactively attempt to work around ubuntu's "kernel hardening" attempts
This commit is contained in:
12
src/plugins/debugger/ptracepreload.c
Normal file
12
src/plugins/debugger/ptracepreload.c
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int _init(void)
|
||||
{
|
||||
prctl(0x59616d61, getppid(), 0, 0, 0);
|
||||
puts("eeks\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
13
src/plugins/debugger/ptracepreload.pro
Normal file
13
src/plugins/debugger/ptracepreload.pro
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
include(../../qtcreatorlibrary.pri)
|
||||
|
||||
TEMPLATE = lib
|
||||
TARGET = ptracepreload
|
||||
CONFIG += shared
|
||||
CONFIG -= qt
|
||||
DESTDIR = $$IDE_LIBRARY_PATH
|
||||
|
||||
QMAKE_LFLAGS *= -nostdlib -ldl -lc
|
||||
|
||||
SOURCES = ptracepreload.c
|
||||
|
||||
@@ -40,6 +40,10 @@ SUBDIRS = plugin_coreplugin \
|
||||
plugin_macros \
|
||||
debugger/dumper.pro
|
||||
|
||||
linux-* {
|
||||
SUBDIRS += debugger/ptracepreload.pro
|
||||
}
|
||||
|
||||
include(../../qtcreator.pri)
|
||||
|
||||
contains(QT_CONFIG, declarative) {
|
||||
|
||||
Reference in New Issue
Block a user