Tiller Beauchamp
2008-Feb-04 22:29 UTC
[dtrace-discuss] Trouble tracing programs with spaces in the name under Leopard
I have had trouble tracing applications in Leopard that have spaces in the name. $ sudo dtrace -n ''pid$target:a.out::entry'' -c ''./Address\ Book'' dtrace: invalid probe specifier pid$target:a.out::entry: probe description pid2502:Address Book::entry does not match any probes $ I have tried renaming binaries, using Address* instead of a.out, but have not had any luck. Has anyone found a workaround for this? Thanks, .tiller
Steve Peters
2008-Feb-04 22:49 UTC
[dtrace-discuss] Trouble tracing programs with spaces in the name under Leopard
On Feb 4, 2008, at 2:29 PM, Tiller Beauchamp wrote:> I have had trouble tracing applications in Leopard that have spaces > in the > name.Actually you''ve escaped the spaces properly, but there''s no module named a.out in the Leopard runtime. Try one of these instead: % sudo dtrace -l -n ''pid$target:::entry'' -c ''/Applications/Address\ Book.app/Contents/MacOS/Address\ Book'' ;-} SCP> > > $ sudo dtrace -n ''pid$target:a.out::entry'' -c ''./Address\ Book'' > dtrace: invalid probe specifier pid$target:a.out::entry: probe > description > pid2502:Address Book::entry does not match any probes > $ > > I have tried renaming binaries, using Address* instead of a.out, but > have > not had any luck. Has anyone found a workaround for this? > > Thanks, > > .tiller > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.orgSteve Peters scp at mac.com
James McIlree
2008-Feb-04 22:56 UTC
[dtrace-discuss] Trouble tracing programs with spaces in the name under Leopard
On Feb 4, 2008, at 2:29 PM, Tiller Beauchamp wrote:> I have had trouble tracing applications in Leopard that have spaces > in the > name. > > $ sudo dtrace -n ''pid$target:a.out::entry'' -c ''./Address\ Book'' > dtrace: invalid probe specifier pid$target:a.out::entry: probe > description > pid2502:Address Book::entry does not match any probes > $ > > I have tried renaming binaries, using Address* instead of a.out, but > have > not had any luck. Has anyone found a workaround for this? > > Thanks, > > .tillerTiller, There are problems with trying to use module names with spaces in the middle: <rdar://problem/5344820> Space in module name in -n fails You can use the ''?'' single char wildcard as a workaround: pid$target:Address?Book::entry However, in this case, none of these will help. The problem you are hitting is that there are no functions in Address Book (the executable) that can be instrumented: ghopper:/Applications/Address Book.app/Contents/MacOS# nm -s __TEXT __text ./Address\ Book ghopper:/Applications/Address Book.app/Contents/MacOS# You probably want to observe the functions in the AddressBook framework, which fortunately doesn''t have a space in the name :-). James M