[dtrace-discuss] Accessing variables in shared libraries
Nicolas Williams
Nicolas.Williams at sun.com
Mon Jul 2 13:03:09 PDT 2007
On Mon, Jul 02, 2007 at 12:40:58PM -0700, Seth Goldberg wrote:
> dtrace: failed to compile script ./tt.d: line 6: floating-point constants are not permitted
IIRC DTrace doesn't support floating point types.
> dtrace: failed to compile script ./tt.d: line 6: failed to resolve set_lock_count: Unknown variable name
>
> What am I doing wrong? Can libraries (with dots) not be used as
> scope-resolution entities?
DTrace has no knowledge of variables and types in user-land. Instead
you have to use copyin() and friends and casts. The result isn't very
pretty, but it works. I think one could add a function or operator that
interprets simple expressions in the context of the user-land process to
which the given pid provider probe refers; the expression would have to
be compiled in user-land when the provider is opened and translated into
a corresponding set of D expressions that copyin stuff as needed and
which get shoved into the actul probe body. But that sounds like a
non-trivial project.
Nico
--
More information about the dtrace-discuss
mailing list