Hi Mark,

 It was tested on FreeBSD 9.2 and FreeBSD 10 Beta - i386.I did not 
test it on AMD 64.

Regards
Prashanth
--------------------------------------------
On Sun, 17/11/13, Mark Johnston <[email protected]> wrote:

 Subject: Re: Fw: your mail
 To: "Prashanth Kumar" <[email protected]>
 Cc: "[email protected]" <[email protected]>
 Date: Sunday, 17 November, 2013, 10:18 AM
 
 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@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
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
To unsubscribe, send any mail to "[email protected]"

Reply via email to