What is '_KERNEL' in the source ?

2006-02-06 Thread Tanmay
Hello, In various kernel source files,i came across '#ifdef _KERNEL'. What is '_KERNEL' used for ? In some files _KERNEL is #defined to nothing ?? Can anybody please explain this ? TIA. Regards, Tanmay ___ freebsd-hackers

Accessing address space of a process through kld!!

2006-02-27 Thread Tanmay
Hello, How do I access the address space ie text,data and stack of a (user level)process whose pid I know from my kld. for eg: Suppose 'vi' is running and I want to access its address space through my kld, then how do I do it? TIA, Tanmay _

Re: Accessing address space of a process through kld!!

2006-03-03 Thread Tanmay
>vm_maxsaddr and p->p_vmspace->vm_ssize respectively.But i could not infer anything useful.Can you shed some light on this ? At what address does the stack segment start ? where can we get this address from for a running process ? TIA. Regards, Tanmay