On 10/18/06, Fu Zhi-jun <Zhijun.Fu at sun.com> wrote: > Hi, folks, > I have a question about the internals of dcmd "whatis". > The dcmds "whatis" gives the type information of an address. > I am curious how this dcmd get that information. Does Solaris kernel > memory system > maintain that information for each allocation? > >From the code which implements "whatis", it walks thread-stack, page, > kmem_cache ... in turn, and try to locate the address within each part. > So it seems solaris doesn't > maintain type information for dynamic allocated objects. Is it correct?
Some time ago a decision was taken to include DWARF-style debugging information in each binary delivered in ON (and NWS and ...). The current implementation is known as CTF or "Compact Type Format". This is where mdb gets its data type information from. James C. McPherson -- Solaris kernel software engineer, system admin and troubleshooter http://www.jmcp.homeunix.com/blog Find me on LinkedIn @ http://www.linkedin.com/in/jamescmcpherson