Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 426308 - Remote Attach fails silently when insufficient permission
Summary: Remote Attach fails silently when insufficient permission
Status: CLOSED DUPLICATE of bug 487128
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 18:01 EST by Marc-André Laperle CLA
Modified: 2016-02-03 13:23 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2014-01-21 18:01:30 EST
Using CDT 8.3.0.201401211330
Ubuntu 13.10 64 bit host, 14.04 64 bit target
gdb 7.6.1-ubuntu
gdbserver 7.6.50.20131218-cvs-ubuntu

To be able to attach to a non-child process in Ubuntu (recent versions??) you have to change a configuration file. When attaching locally, the message indicating this is

"Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf"

With the default configuration files unmodified, apply these steps:

1. Create a C/C++ Attach Debug configuration. Use gdbserver as the debugger
2. Start gdbserver on the remote target
3. Select a process to debug. It silently fails.

In the gdb traces, we can see

567,922 21-target-attach --thread-group i1 2738
567,926 21^error,msg="Attaching to process 2738 failed"

This could be displayed in a dialog box, similar to when a local launch fails.
Comment 1 Marc-André Laperle CLA 2016-02-03 13:23:51 EST

*** This bug has been marked as a duplicate of bug 487128 ***