From owner-freebsd-net@FreeBSD.ORG Mon Feb 11 07:50:53 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CA375283 for ; Mon, 11 Feb 2013 07:50:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 91A11B31 for ; Mon, 11 Feb 2013 07:50:53 +0000 (UTC) Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1U4oDX-000GUQ-CO; Mon, 11 Feb 2013 11:54:23 +0400 Message-ID: <5118A26C.2050300@FreeBSD.org> Date: Mon, 11 Feb 2013 11:49:00 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: h bagade Subject: Re: debug em driver code after applying patch References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 07:50:53 -0000 On 05.02.2013 18:44, h bagade wrote: > Hi all, > > I applied patch on em driver code and I want to check how it is working on > different situations. I need to put some output in different parts of the > code to trace what's going on in different situations. > I've tried to write to files or executing commands(like echo) using system > function, but in these two methods, by adding headers some conflicting > issues happen which I don't know how to resolve! > > I've tried to use it's macros like INIT_DEBUGOUT to print some messages but > it only works on startup, not when the system is running! > > I don't know how to print out messages to debug the code?! Is there anybody > to help me handle it? I really need help. You can use printf or log for some rarely-called cases (see printf(9)). for others you can take a look on ktr(9) API and ktrdump(8). > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >