Aliasing text and data segments of a process

Michael J. Young mjy at sdti.UUCP
Thu Jan 28 04:08:38 AEST 1988


In article <11476 at brl-adm.ARPA> rbj at icst-cmr.arpa (Root Boy Jim) writes:
>(1) Text and Data glommed together with only limits protection.
> ...
>Each format has its own advantages and drawbacks. If you want to set
>breakpoints in code, you must use the first type.

Actually, setting breakpoints is no problem even with the other three types.
That's what the ptrace(2) system call is for.  I suppose you could even
use ptrace() to "poke" an entire function into the text space.  The problem
arises when you want to change the size of the text region; ptrace() doesn't
let you do that.
-- 
Mike Young - Software Development Technologies, Inc., Sudbury MA 01776
UUCP     : {decvax,harvard,linus,mit-eddie}!necntc!necis!mrst!sdti!mjy
Internet : mjy%sdti.uucp at harvard.harvard.edu      Tel: +1 617 443 5779



More information about the Comp.unix.wizards mailing list