This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using kernel global variables


David Wilder wrote:
It is my understanding if we want to access a kernel global variable in a tap script we must be in a context that is using the variable.

I believe the variable must be within the *scope* of the probed function. The function doesn't necessarily have to use the variable for it to be within scope. A global defined in the same file as the function is automatically within scope.


I don't think exported symbols are within a function's scope from SystemTap's perspective, though the function can see them. Perhaps the dwarf info doesn't allow for that.

Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]