Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!agate!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: NeXT questions Message-ID: <1442@toaster.SFSU.EDU> Date: 30 Mar 91 03:48:10 GMT References: <208@gouche.UUCP> <1991Mar20.125440.17013@thunder.mcrcim.mcgill.edu> Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Organization: San Francisco State University Lines: 35 In article <1991Mar20.125440.17013@thunder.mcrcim.mcgill.edu> mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes: >They have *no adb*. I don't know *what* possessed them to do away with >it, but they did.... It would require *effort* to port. So would sdb or dbx. There's no ptrace() call--the functionality is available through a much more complex (though admittedly more flexible) set of mechanisms. >They've even done away with the loader-defined symbols _etext, _edata, >and _end that UNIX has had since the dark ages. In the dark ages, UNIX had extremely primitive memory management; there were two segments: text and data. Each was described by (starting address,length)--nothing more. On some machines they possibly lived in completely separate address spaces (e.g. PDP-11 with I&D space, Intel 80286 with Code and Data segments). The data segment was "open-ended"--it stopped at a point called the "break" which could be manipulated through the brk() and sbrk() calls. NeXT Mach uses a large linear address space in which text and data can be virtually discontinuous. Except in the most trivial cases, one can't identify a *single* value for those symbols-- each segment can have a different *meaningful* value--or perhaps more than one. In some respects, Mach is a lot more like VAX/VMS than UNIX. The vast majority of programs simply don't care. Asking "what should I plug in in place of _edata" is asking the wrong question. Rather, ask _why_ the code wants that information, because there's probably a much better (if Mach- specific) coding that captures the _intent_. -=EPS=-