From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11651 invoked by alias); 1 Nov 2008 20:14:49 -0000 Received: (qmail 11590 invoked by uid 22791); 1 Nov 2008 20:14:48 -0000 X-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_62,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from qb-out-1314.google.com (HELO qb-out-1314.google.com) (72.14.204.174) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 01 Nov 2008 20:14:18 +0000 Received: by qb-out-1314.google.com with SMTP id f15so783020qba.22 for ; Sat, 01 Nov 2008 13:14:15 -0700 (PDT) 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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=20TUW7lN+bXf2VNVfaW7Pf+pSLULKw5L1KKPB1okxaQ=; b=BPFGm7TNsSVDEcrPjUUVhRjb1o1vJshwgfUNAgfRULpMgc6KWoDXw0jlfUiBOay/Bu TF1tiaujExlI/FPETtjmI+C3GEoPwmKKHaAeFgaWvShb5mfdKbTcb0cmhx6r8vPzM38V o2x6tgm/EtdWzz7McmbtabypXA7BSeVXAT7RA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=mcJE81Heqv/EPHPuFnzaWfLFxdQVzRXkGt/dPkSQbujobaCiToYqNOhXkiuYxR1Fop UrwFN8YFP4vtHC1s2aLJ8w4ZdajuYYZGbj8izj6g8AqbsyH8rfksOGEIfZR8gW+rHeif +qE1++oMwtB17FPn6QMtxg5uOB29u/vu+HKfU= Received: by 10.103.243.9 with SMTP id v9mr6272694mur.59.1225570455027; Sat, 01 Nov 2008 13:14:15 -0700 (PDT) Received: by 10.103.117.12 with HTTP; Sat, 1 Nov 2008 13:14:14 -0700 (PDT) Message-ID: <29445d0d0811011314q72d353a1n3943736e8efb9fdc@mail.gmail.com> Date: Sat, 01 Nov 2008 20:14:00 -0000 From: "Dongtao Liu" To: "Frank Ch. Eigler" Subject: Re: Does anyone have idea of how to trace the funtion "gethostbyname"? Cc: "Breno Leitao" , systemtap@sources.redhat.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <29445d0d0810291844y54d811fbqd2771a38615a3e79@mail.gmail.com> <490B1746.5020900@linux.vnet.ibm.com> X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00250.txt.bz2 Is it "/lib/libc-2.7.so" in my system? probe process("/lib/libc-2.7.so").function("gethostbyname").call { log(user_string($name)) } Then how long will SystemTap support to trace this function? Thans a lot! This is the information about libc in my system. dliu@dliu-desktop:/lib$ ls -all libc.so.6 lrwxrwxrwx 1 root root 11 2008-10-23 22:02 libc.so.6 -> libc-2.7.so dliu@dliu-desktop:/lib$ ls -all libc-2.7.so -rwxr-xr-x 1 root root 1274092 2008-09-12 10:32 libc-2.7.so dliu@dliu-desktop:/lib$ ls -all libc*.so* -rwxr-xr-x 1 root root 1274092 2008-09-12 10:32 libc-2.7.so lrwxrwxrwx 1 root root 11 2008-10-23 22:02 libcap.so -> libcap.so.1 lrwxrwxrwx 1 root root 14 2008-10-23 17:30 libcap.so.1 -> libcap.so.1.10 -rw-r--r-- 1 root root 10316 2007-07-31 15:20 libcap.so.1.10 lrwxrwxrwx 1 root root 17 2008-10-23 17:30 libcfont.so.0 -> libcfont.so.0.0.0 -rw-r--r-- 1 root root 11512 2008-02-06 17:49 libcfont.so.0.0.0 -rw-r--r-- 1 root root 181724 2008-09-12 10:32 libcidn-2.7.so lrwxrwxrwx 1 root root 14 2008-10-23 22:02 libcidn.so.1 -> libcidn-2.7.so lrwxrwxrwx 1 root root 17 2008-10-23 17:30 libcom_err.so.2 -> libcom_err.so.2.1 -rw-r--r-- 1 root root 7444 2008-03-27 13:25 libcom_err.so.2.1 lrwxrwxrwx 1 root root 19 2008-10-23 17:30 libconsole.so.0 -> libconsole.so.0.0.0 -rw-r--r-- 1 root root 73312 2008-02-06 17:49 libconsole.so.0.0.0 -rw-r--r-- 1 root root 38300 2008-09-12 10:32 libcrypt-2.7.so lrwxrwxrwx 1 root root 15 2008-10-23 22:02 libcrypt.so.1 -> libcrypt-2.7.so lrwxrwxrwx 1 root root 11 2008-10-23 22:02 libc.so.6 -> libc-2.7.so lrwxrwxrwx 1 root root 19 2008-10-23 17:30 libctutils.so.0 -> libctutils.so.0.0.0 -rw-r--r-- 1 root root 17424 2008-02-06 17:49 libctutils.so.0.0.0 2008/10/31 Frank Ch. Eigler : > Breno Leitao writes: > >>> Could anyone tell me how to trace the function of gethostbyname using >>> SystemTap? >> Since this is not a kernel function, you might want to probe userspace >> functions. > > This should work, before long: > > probe process("/libMMM/libc-NNN.so").function("gethostbyname").call { log(user_string($name)) } > > In some testing on RHEL5 however, our prologue-searching heuristics > can't outwit gcc's poor debuginfo quality, so that parameter is hidden > at the moment. There's a systemtap PR about improving the heuristics. > > - FChE >