Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2015 13:54:50 +0430
From:      HeTak <hetakcoder@gmail.com>
To:        Kristof Provost <kp@freebsd.org>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Kernel Debug Howto
Message-ID:  <CAGyHxXUgEKC8eZKBgQMObt55ZGbBC2F2T5AV-P0w80yZmc=Fhw@mail.gmail.com>
In-Reply-To: <514DDE7F-CF61-461D-A9FF-232DC938BDF5@FreeBSD.org>
References:  <CAGyHxXWFwU%2Ba-S62DJA==UagFFvFxwpiw0Zmht6O-ppS-ddx%2Bg@mail.gmail.com> <514DDE7F-CF61-461D-A9FF-232DC938BDF5@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 25, 2015 at 1:41 PM, Kristof Provost <kp@freebsd.org> wrote:

>
> > On 25 Jul 2015, at 10:54, HeTak <hetakcoder@gmail.com> wrote:
> > I have recently started some developments on FreeBSD net section.
> Great!
>
=E2=80=8BThank you Kristof, b
oth for your fast answering and your welcome.=E2=80=8B :)

>
> > But I am kinda new to this field. My base interest is to first
> understand the
> > implementation structure via tracing the code and so.
> >
> > I have three major questions:
> > 1-  how to debug changes made to FreeBSD kernel?
> > (You know, till some levels, I can even use uprintf or so, but, for
> example
> > inside radix.c (where I wanna understand how a route is checked to be
> > unique and then inserted to the tree) I can't do such checks..)
> dtrace can be quite useful to understand flows. You can grab stack traces
> (i.e. figure out where things are called from), get function arguments, =
=E2=80=A6


> > 2- are there standards there for freebsd kernel developments of which I
> can
> > follow so my job gets a bit simplified?
> > (Any development guides or so?I prospect it to be some differences
> between
> > system developments and normal coding, but I don't have an idea on how =
to
> > get that).
> There=E2=80=99s style(9) for coding style.
> I=E2=80=99d also recommend "The Design and Implementation of the FreeBSD =
Operating
> System=E2=80=9D
> (the second edition).
>
> > 3- what is the fastest way to apply changes to FreeBSD kernel?
> > (For now, I just follow the normal build & install kernel & reboot.)
> I pretty much do that. Depending on what you=E2=80=99re working on it mig=
ht be
> easier to run it in a VM.
> My work lately has been on the network code, so a VM is very convenient.
> It=E2=80=99s not so useful if you=E2=80=99re working on drivers, of cours=
e.
>
=E2=80=8B
=E2=80=8BGreat to hear of such a tool as Dtrace and also the book. and actu=
ally I'm
using a VM as well. =E2=80=8B

=E2=80=8BI'll check these and hope to be successful through my way.

>
> Regards,
> Kristof


=E2=80=8BCheerio,
HeTak=E2=80=8B



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGyHxXUgEKC8eZKBgQMObt55ZGbBC2F2T5AV-P0w80yZmc=Fhw>