From: "Dongtao Liu" <l.dongtao@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: "Breno Leitao" <leitao@linux.vnet.ibm.com>, systemtap@sources.redhat.com
Subject: Re: Does anyone have idea of how to trace the funtion "gethostbyname"?
Date: Sat, 01 Nov 2008 20:14:00 -0000 [thread overview]
Message-ID: <29445d0d0811011314q72d353a1n3943736e8efb9fdc@mail.gmail.com> (raw)
In-Reply-To: <y0mtzasrbsw.fsf@ton.toronto.redhat.com>
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 <fche@redhat.com>:
> Breno Leitao <leitao@linux.vnet.ibm.com> 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
>
next prev parent reply other threads:[~2008-11-01 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 1:44 Dongtao Liu
2008-10-31 14:34 ` Breno Leitao
2008-10-31 16:04 ` Frank Ch. Eigler
2008-11-01 20:14 ` Dongtao Liu [this message]
2008-11-01 20:14 ` Dongtao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29445d0d0811011314q72d353a1n3943736e8efb9fdc@mail.gmail.com \
--to=l.dongtao@gmail.com \
--cc=fche@redhat.com \
--cc=leitao@linux.vnet.ibm.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).