🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #73112

gdb over forks in sysV

#73112
From: Nathan Banks
Date: Fri, 01 Nov 1991 20:40
35 lines
2223 bytes
I hope this is not the wrong group for this question.

I enjoy using gdb attach on berkeley derived systems. attach is
feasible on these systems as the ptrace sys call supports the attach
concept (e.g. "adopting" a process and becoming its parent, at least that is
the way I understand it). On sysV (yuck) there is no ptrace support for
attach. Well, ok so that means that it is impossible 
to attach to an already running process that is the child of say process
zero and start debugging it on sysV - I can accept that. What if a sysV program
I am currently debugging with gdb is about to fork()? Why can I not tell
gdb to stop following the current thread and start following the grandchild 
thread? Does ptrace only work on children and not (great)grand-children?

If so, who has the largest soapbox I can stand on and where should I take
said soapbox (POSIX, USG, OSF, /usr/group, GOD, etc.) to preach to the
masses of the importance of attach in ptrace. 

BTW, I looked at a sysVr4 man page on ptrace and saw no support for
attach. I have only looked at one vendors implementation of sysVr4.

With the greatest appreciation for the use of your soapbox, I am,
Sincerely,
-- 
 /| |\  Nathan Banks
/ | | \ IEX Corporation                 Voice: 214.612.2600   
\ | | / 1400 Preston Road, Suite 350    Fax: 214.964.2666     
 \| |/  Plano, Texas 75093              Email: uunet!iex!banks
	Disclaimer: No one would believe me anyway.

--
 /| |\  Nathan Banks
/ | | \ IEX Corporation                 Voice: 214.612.2600   
\ | | / 1400 Preston Road, Suite 350    Fax: 214.964.2666     
 \| |/  Plano, Texas 75093              Email: uunet!iex!banks
Technical Details
Message-ID: <1991Nov1.204014.29362@iex.uucp>
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!cs.utexas.edu!uunet!convex!iex!banks

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1025b4,76f943b90221030a,start
X-Google-Attributes: gid1025b4,public
X-Google-ArrivalTime: 1991-11-01 14:49:41 PST
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!cs.utexas.edu!uunet!convex!iex!banks
From: banks@neptune.iex.com (Nathan Banks)
Newsgroups: gnu.misc.discuss
Subject: gdb over forks in sysV
Keywords: exec fork gdb attach ptrace
Message-ID: <1991Nov1.204014.29362@iex.uucp>
Date: 1 Nov 91 20:40:14 GMT
Sender: news@iex.uucp (USENET news)
Organization: iex
Lines: 35