as Thomas Graichen recently wrote in private mail:

> * the gdb-4.13 of current (compiled and used under 2.0R) can not attach to my
> own processes (it works only then i'm root - else i get open failed - for my
> own processes)

how embarassing ! This turns out to be a bug in infptrace.c. Below
is a patch. Could some kind soul apply it ?

Submitted by:	"Gary J." <garyj@rks32.pcs.dec.com>
This commit is contained in:
Nate Williams 1995-04-10 00:01:01 +00:00
parent 9d9cea2bce
commit b6b718f326
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7725

View file

@ -175,7 +175,7 @@ attach (pid)
int fd;
sprintf(procfile, "/proc/%d/ctl", pid);
fd = open(procfile, O_RDWR, 0);
fd = open(procfile, O_WRONLY, 0);
if (fd < 0) {
perror_with_name ("open");
@ -217,7 +217,7 @@ detach (signal)
int fd;
sprintf(procfile, "/proc/%d/ctl", inferior_pid);
fd = open(procfile, O_RDWR, 0);
fd = open(procfile, O_WRONLY, 0);
if (fd < 0) {
perror_with_name ("open");