From owner-freebsd-hackers@freebsd.org Sat Aug 12 20:33:25 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A18B4DC81D1 for ; Sat, 12 Aug 2017 20:33:25 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25701705A3 for ; Sat, 12 Aug 2017 20:33:25 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: by mail-lf0-x22e.google.com with SMTP id m86so27344113lfi.4 for ; Sat, 12 Aug 2017 13:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:in-reply-to:references:subject:to:mime-version :content-transfer-encoding:from:date:message-id:user-agent; bh=tLXr13QkGOP+hdS65Zd6TMWiE261FQDaHOJWzEj7FNc=; b=txn8LGP4cAwRBOgfxAeSnk4zWKhc6LQkmfP8odzJBAwO4xkmNvVDFeswB8S1pLXCrZ xtDn9CYvYiNQWxaPFYNvG9EBhfzIP2pKrOGyCpKGaK+gqbuftdlZq0o8loDgMHic9z48 gVbA9GkJNTv0DHia8fr3gfuQLm2uUt6ZH439oo3nRMdv3PICSvLZQ4DhIlAhm4iepqH5 1WOo30uWDT/qhw6PE4L/UmW0q/gATu883ElV14id7zd6koiWMU4qDMwap+J0YpOew8cR Ssqhbr//W8M7ywlBldLzZIMqxzIlx9y/RpfrKntFVCB2/1iOdPIH3uK3o8k4soFEoVNU wmBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:in-reply-to:references:subject:to :mime-version:content-transfer-encoding:from:date:message-id :user-agent; bh=tLXr13QkGOP+hdS65Zd6TMWiE261FQDaHOJWzEj7FNc=; b=NA8JYIn/sxX6WoXLANjlrzgYlxdkbIsJb2b6aHulHINOS23clWoG+/ZmLf2KaSLR4f IewSbHtqq7AFwd7TU0TNBMntSUtiRzNss0FNuyFTprQjUFeTjTo+MbBGOiLVQ/P8IlEU 0GJjNvqK6d3eX0slpJeUPSuvtGa7M/40V0KnWgKUxLrGB98wqi5juA7728EIQ1B+xDSI MDQ7h3mtWbvnoo97uI825lOhP6cvyjDNxgxbRV3cgUNauyE/Gwnrh5UDZlJ230iLiLI1 kGK50vUDfxY9tji75wZAF/hdHPo9Ej0Oaq4gCNbYpWTHuvGzN5OtJxVkSAOcHsLTCRlV IRdw== X-Gm-Message-State: AHYfb5jtzfsSDsvE7/Hph18eZPzu0XOdVEmDjauL5hUL7sSXDxjs3ye7 OODNCMaGbyMcOQ== X-Received: by 10.46.21.71 with SMTP id 7mr6589672ljv.74.1502570002871; Sat, 12 Aug 2017 13:33:22 -0700 (PDT) Received: from thinkpad-x220 (46-133-240-73.dialup.umc.net.ua. [46.133.240.73]) by smtp.gmail.com with ESMTPSA id c89sm730762lfb.78.2017.08.12.13.33.19 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 12 Aug 2017 13:33:22 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Cc: freebsd-hackers@freebsd.org In-Reply-To: References: Subject: Re: Monitor kernel variable with ddb(4) To: "Farhan Khan" MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Date: Sat, 12 Aug 2017 22:56:51 +0300 Message-ID: User-Agent: Opera Mail/12.15 (FreeBSD) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2017 20:33:25 -0000 Sat, 12 Aug 2017 22:42:21 +0300 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Farhan Khan : > Hi all, > > I am trying to figure out where a net80211's vap flags are modified. I= = > see > that memory is originally allocated here: > http://src.illumos.org/source/xref/freebsd-head/sys/net/if.c#445. = > However, > I cannot figure out where the ifp->if_flags and if->if_drv_flags are e= ver > modified in the kernel. > > Someone suggested using ddb(4), so I entered the live debugger using = > sysctl > debug.kdb.enter=3D1 > > I then set a breakpoint at if_alloc. > > However, I cannot seem to figure out the next steps to monitor where t= he > ifp->if_flags or if->if_drv_flags are updated. > > Full explanation - My kernel module is immediately unloading, but I am= = > not > certain why. I traced it back in the ieee80211 code to those flags, bu= t = > not > sure where they are updated. > > Any ideas? Thank you! Hi, You can use 'show all vaps/a' command to show all currently existing vap= s (see ieee80211_ddb(9) for other commands).