From owner-freebsd-questions@FreeBSD.ORG Sat Feb 18 00:54:27 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A83E16A420 for ; Sat, 18 Feb 2006 00:54:27 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C39743D45 for ; Sat, 18 Feb 2006 00:54:26 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: by wproxy.gmail.com with SMTP id i27so527522wra for ; Fri, 17 Feb 2006 16:54:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rZ/xpKKGXOQO5b1+fHDQBmFn+vf0aD0BlBxsgnz6xEWPxwijol0vCDX+aYTu9LOw4kqnOWzVER9OsTKutLFv7n6N0HGCI6gEI6BYodzzALaOTbg1884Lxd7FD7uIkUr4U3mEm08F/o5GoYs3x+bQa9dSrEN+ucRop7DpYjS3j84= Received: by 10.54.66.14 with SMTP id o14mr1783363wra; Fri, 17 Feb 2006 16:54:26 -0800 (PST) Received: by 10.54.101.5 with HTTP; Fri, 17 Feb 2006 16:54:26 -0800 (PST) Message-ID: Date: Sat, 18 Feb 2006 06:24:26 +0530 From: "Pranav Peshwe" To: "divyesh shah" In-Reply-To: <20060217224153.15856.qmail@web31010.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060217224153.15856.qmail@web31010.mail.mud.yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: debugging kernel code.. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 00:54:27 -0000 On 2/18/06, divyesh shah 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