Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mgm.mit.edu!wolfgang From: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Newsgroups: comp.unix.wizards Subject: Re: Aliasing text and data segments of a process Message-ID: <2624@bloom-beacon.MIT.EDU> Date: 29 Jan 88 00:04:01 GMT References: <11476@brl-adm.ARPA> <207@sdti.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Organization: Freelance Software Consultant, Cambridge, Ma. Lines: 15 In article <207@sdti.UUCP> mjy@sdti.UUCP (0000-Michael J. Young) writes: >Actually, setting breakpoints is no problem even with the other three types. >That's what the ptrace(2) system call is for. If you have a shared-text type of executable, you can't guarentee ptrace-ability. If someone else is executing the same text, the system is forced to deny you write-permission with the error 'text busy'. (Otherwise the other process would also get hit with the breakpoints.) The other process can still be corrupted however, if it is started *after* you insert the breakpoints. Now it gets amusing, since you can't *remove* the breakpoints once the other process is started. -- Wolfgang Rupprecht ARPA: wolfgang@mgm.mit.edu (IP 18.82.0.114) Freelance Consultant UUCP: mit-eddie!mgm.mit.edu!wolfgang Boston, Ma. VOICE: Hey_Wolfgang!_(617)_267-4365