Dear Frank & Dear all:

Thank you.

I'm familiar with this pdf :-)
But I'm not familiar with mdb :-(. And I'm lack of time to study it now.

I'm reading the opensolaris source code now, more precisly, studying the
detail implementation of DTrace (dtrace cmd, libdtrace, kernel modules).
Since I'm not familiar the implemention of solaris' kernel, it is a big
challenge for me to string all the related procedures together.
Currently, I want to know how a trap handler is installed and what the
detail control flow is during handling the breakpoint.
In a word, I am eager to
1, know, How is a trap handler installed/registered?
2, find out, The detail control flow (or say function flow) in the kernel
(from triggering "int $3" to return back to the next instruction after "int
$3")
3, know, Solaris' features when a running process is interrupted/trapped.
e.g. interrputed process is pinned on its CPU.

TIA. It seems I'm naive... very...


Kind Regards,
TJ


2007/12/12, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> On Tue, 11 Dec 2007, �սÝ TaoJie wrote:
>
> > Dear all:
> >
> > In DTrace, when a fbt probe is activated, its related point
> (instruction)
> > would be replaced with "int $3"(opcode: cc).
> >
> > I refer to "Intel Architecuture Manual" and "Solaris Internals (2nd)",
> and
> > find out that "int $3" is used for breakpoint.
> > Then, when "int $3" is executed, what would happen? I mean, how does the
> > kernel handle it?
>
> Try:
>
>        idt0::array | ::gate_desc
>
> from within "mdb -k" and follow up the flow of code from there, starting
> at entry number three.
>
> >
> > And... any recommended related articles?
>
> There's that one:
>
>
> http://www.opensolaris.org/os/project/czosug/events_archive/czosug2_dtrace_x86.pdf
>
> Check that as a starting point, gives you some ideas how to look into
> this.
> Caveat: That's two years old. The implementation details (how the trap
> dispatches into dtrace) might've changed a bit. The strategy for "how to
> dtrace dtrace" has not.
>
> > In the source code, what are the related functions and what are the
> > related source files?
>
> See above.
>
> FrankH.
>
> >
> > TIA!
> >
> >
> > Kind Regards,
> > TJ
> >
>
>
> ------------------------------------------------------------------------------
> No good can come from selling your freedom, not for all the gold in the
> world,
> for the value of this heavenly gift far exceeds that of any fortune on
> earth.
>
> ------------------------------------------------------------------------------
>
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to