The subject pretty much covers it: Using Linux Eclipse, can I programatically tell I am executing in the debugger (gdb)?
The subject pretty much covers it: Using Linux Eclipse, can I programatically tell I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll probably have to resort to obscure hacking.
For example, you could examine the “TracerPid” in your /proc/<pid>/status file to determine if you are being ptraced.
If you actually want to know whether you’re ptraced by a gdb, you could try looking at the exe link of that process (but that’s not reliable).