Changeset 942305 in git


Ignore:
Timestamp:
Nov 19, 2020, 2:51:56 PM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
Children:
2e7c6b095bd02b92f7355c8c0aa193435fd1af8e
Parents:
93071995c509c3daf345991ea24275045205d604
Message:
doc: automaticallay call gdb with debug version
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    r930719 r942305  
    376376    return;
    377377  }
     378  /* REMARK FOR NEWER LINUX SYSTEMS:
     379Attaching to a process on Linux with GDB as a normal user may fail with "ptrace:Operation not permitted". By default Linux does not allow attaching to a process which wasn't launched by the debugger (see the Yama security documentation for more details). (https://www.kernel.org/doc/Documentation/security/Yama.txt)
     380
     381There are ways to workaround this:
     382
     383    Run the following command as super user: echo 0| sudo tee /proc/sys/kernel/yama/ptrace_scope
     384
     385    This will set the ptrace level to 0, after this just with user permissions you can attach to processes which are not launched by the debugger.
     386
     387    On distributions without Yama (such as Raspbian) you can use libcap2-bin to assign ptrace permissions to specific executables: sudo setcap cap_sys_ptrace=eip /usr/bin/gdb
     388*/
    378389  int pid;
    379390  char buf[16];
Note: See TracChangeset for help on using the changeset viewer.