Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2006 06:24:26 +0530
From:      "Pranav Peshwe" <pranavpeshwe@gmail.com>
To:        "divyesh shah" <divs_83@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: debugging kernel code..
Message-ID:  <cdfd7d6d0602171654r627d8fa8w2d3adcf2fd6b1177@mail.gmail.com>
In-Reply-To: <20060217224153.15856.qmail@web31010.mail.mud.yahoo.com>
References:  <20060217224153.15856.qmail@web31010.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/18/06, divyesh shah <divs_83@yahoo.com> wrote:
> I have added a system call and a somple program which
> uses that call. However, I need to debug my system
> call code. gdb doesn't help as it doesnt allow me to
> step into kernel level code from my user test program.
> Is there any way I can write debug information(say
> like printf statements)? I have seen some kernel code
> using printf's but I wonder where would they be
> printed out. Is there some kind of kernel log file??
>
Hello,
          You can use printfs in your module.You will be able to see
whatever you have printfed on the console,also it is logged in the
ASCII text file - /var/log/messages. You can use uprintf if you do not
want to log the messages in the file but want to see them on
console.You can configure DDB and remote GDB (using a serial line) for
debugging kernel code/modules.

HTH.

Regards,
Pranav

---------------------------------------------------------------------------
"There is no such thing as a foe. There is no such thing in existence as
a friend.
It is force of circumstances that creates friends and foes."
=09=09=09- The Mahabharata



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