Fw: your mail
Mark Johnston
markj at freebsd.org
Sun Nov 17 03:48:03 UTC 2013
On Tue, Nov 12, 2013 at 08:42:39PM +0800, Prashanth Kumar wrote:
> Hi Mark
>
> ---------------------------------------
> /* scan.c */
>
> #include <stdio.h>
>
> int main()
> {
> int str[10];
>
> if (scanf("%s", str) > 0)
> printf("name %s\n", str);
>
> return 0;
> }
> -----------------------------
> > "dtrace -n 'pid$target:::entry' -c scanf"
>
> if you run the above dtrace command on the program , dtrace will not exit and hung in input.
I can't reproduce that problem. If I use 'pid$target:::entry', dtrace(1)
matches ~3000 probes and usually exits immediately with
"processing aborted: No error".
If I instead use 'pid$target:ld-elf.so.*::entry', I get:
markj at charmander: ~/src/dtrace/tls $ sudo dtrace -n 'pid$target:ld-elf.so.*::entry' -c ./test
dtrace: description 'pid$target:ld-elf.so.*::entry' matched 21 probes
CPU ID FUNCTION:NAME
2 39804 __tls_get_addr:entry
mark
name: mark
dtrace: pid 75490 has exited
2 39804 __tls_get_addr:entry
2 39804 __tls_get_addr:entry
2 39804 __tls_get_addr:entry
2 39804 __tls_get_addr:entry
2 39804 __tls_get_addr:entry
2 39804 __tls_get_addr:entry
2 39786 _rtld_addr_phdr:entry
What version of FreeBSD are you using? Are you i386 or amd64? (I'm on
amd64.)
-Mark
More information about the freebsd-dtrace
mailing list