Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 1999 23:48:50 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        current@FreeBSD.ORG
Subject:   kvm question
Message-ID:  <199901230748.XAA14754@bubba.whistle.com>

next in thread | raw e-mail | index | archive | help
I ran into an interesting problem in the process of modifying
"netstat" to understand the PF_NETGRAPH protocol family. "netstat"
uses kvm_read(), etc. to read kernel symbols. However, this doesn't
work when the symbols you're looking for are in an KLD module (eg,
ng_socket.ko) -- the symbol will not be found.

So I added some code/hackery to look for any loaded modules and if
on named "ng_socket.ko" was found, try finding the symbol in there.

My question is, should kvm_read() and friends be "enhanced" with
this ability to find a symbol by searching through the loaded
KLD modules? Seems a bit hackish, but then again so is the whole
kvm() idea.

I'd be willing to add this code if so.. it's not much.

Unrelated question: SYSINIT() doesn't work from KLD modules.
Is this problem being addressed?

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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