aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-config.py
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-03-17 10:25:09 +0800
committerTiezhu Yang <yangtiezhu@loongson.cn>2022-03-23 11:56:42 +0800
commit5b5442fbf0fab8bd3cb4d19e564b13501f547dac (patch)
tree2c4679ad6f08ddfe04af47d9d6781ae42c4de579 /gdb/python/python-config.py
parenta7e6a19e87f3d719ea23c65b580a6d9bca4ccab3 (diff)
downloadbinutils-5b5442fbf0fab8bd3cb4d19e564b13501f547dac.zip
binutils-5b5442fbf0fab8bd3cb4d19e564b13501f547dac.tar.gz
binutils-5b5442fbf0fab8bd3cb4d19e564b13501f547dac.tar.bz2
gdb: testsuite: use gdb_attach to fix attach-pie-noexec.exp
If /proc/sys/kernel/yama/ptrace_scope is 1, when execute the following command without superuser: make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" we can see the following messages in gdb/testsuite/gdb.log: (gdb) attach 6500 Attaching to process 6500 ptrace: Operation not permitted. (gdb) PASS: gdb.base/attach-pie-noexec.exp: attach It is obviously wrong, the expected result should be UNSUPPORTED in such a case. With this patch, we can see "Operation not permitted" in the log info, and then we can do the following processes to test: (1) set ptrace_scope as 0 $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope $ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" (2) use sudo $ sudo make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdb/python/python-config.py')
0 files changed, 0 insertions, 0 deletions