This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
deferencing variable with embedded C code
- From: "Jun Koi" <junkoi2004 at gmail dot com>
- To: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Tue, 9 Sep 2008 12:25:53 +0900
- Subject: deferencing variable with embedded C code
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=AmBY8tHzYtpSVb0QPANE2/LWUOGZc8ipjcK1S3Dx3aM=; b=gos8US+do9oZ3Y4SsB+oGbN7mQpeLTVk6EwZdKGzVQu0f6Kedr0WQVmYsWWAuEjhX7 +7e1k82UEV1ci9DbfWDtk0F8BG/viFGchFzgm6qdtcQWv+eqWZUFAVdDBrGBxndVM8Py F2ktNlJ0G+YD3cL3Z+O6EmG4Cxnkm8/Fj/0C8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=tku7AlpCEopmEiHQDZwla+Jl2aB6n2qlAkptaM61qr0HZrZKqzebZ9WW1icacc3c8+ dneHg0Qe4t031LF+hciptwsAur1yfPcGmSklAwWtxn5TMfD+LFseRRX2/Jsvj9gFQAL8 tesebGyoN5lNiNMUNPaH2j6rAq9i4oHCmbjwg=
Hi,
I am still not an experience Systemtap user, so sorry for the naive question.
I am looking at the documentation on embedded C code, and see that to
dereference a field of structure (like skb->dev->name), we need to do
something like below:
struct net_device *dev;
char *name;
dev = kread(&(skb->dev));
name = kread(&(dev->name));
Why is that? Because embedded C is running in kernel context, and
compiled with kernel code, it has access to all kernel structure, but
why it cannot deference structure itself?
It seems that do do the above, we need Dwarf information supplied to
Systemtap, correct?
Many thanks,
Jun