From: nccc on
Hi all

I have some trouble with the very internals of Solaris on UltraSPARC
III. The problem is that I need access to the proc_t struct of the
process whose thread is executing on a processor. Can proc_t for the
running thread/process or a pointer to it be found somewhere in the
process address space?

Thanks,
nccc
From: Casper H.S. Dik on
nccc <strikosn(a)gmail.com> writes:

>I have some trouble with the very internals of Solaris on UltraSPARC
>III. The problem is that I need access to the proc_t struct of the
>process whose thread is executing on a processor. Can proc_t for the
>running thread/process or a pointer to it be found somewhere in the
>process address space?

No, proc_t's only exist inside the kernel. What do you need from
the proc_t?

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
From: nccc on
On Oct 31, 5:45 pm, Casper H.S. Dik <Casper....(a)Sun.COM> wrote:
> nccc <strik...(a)gmail.com> writes:
> >I have some trouble with the very internals of Solaris on UltraSPARC
> >III. The problem is that I need access to the proc_t struct of the
> >process whose thread is executing on a processor. Can proc_t for the
> >running thread/process or a pointer to it be found somewhere in the
> >process address space?
>
> No, proc_t's only exist inside the kernel.  What do you need from
> the proc_t?
>
> Casper
> --
> Expressed in this posting are my opinions.  They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.

I need the pid and the path to the executable file on the disk. Please
note that I cannot execute code on the machine, because it is running
under a simulator (simics). I have to retrieve this information by
merely looking into the process address space.
From: nccc on
Anyway, if there is no way to find this information in the process
address space, where exactly can I find it in the kernel memory? Is
there a fixed position for the proc_t of the active process or for a
pointer to it?

Thanks
From: Casper H.S. Dik on
nccc <strikosn(a)gmail.com> writes:

>I need the pid and the path to the executable file on the disk. Please
>note that I cannot execute code on the machine, because it is running
>under a simulator (simics). I have to retrieve this information by
>merely looking into the process address space.

It is possible only from kernel address space. Is the simulator
stopped when you look at the kernel?

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.