On Fri, Dec 18, 2009 at 1:12 PM, Chad Mynhier <[email protected]> wrote:
> This was just an observation that ustackdepth showed up as 2 on entry
> to main(). What I really should have done would be to set the base as
> a thread-local variable in the pid$target::main:entry probe.
>
> And this would only work for a single-threaded process. For a
> multi-threaded process, you'd want to set it for each thread based on
> the initial function for that thread.
>
> Chad
>
I see. I created a simple hello world typ as follows (simplified)
int main(argc, argv)
{
int i;
for (i = 0; i < argc; i++)
{
printit(argc(i);
printf(" ");
}
printf("\n");
}
void print(char *args)
{
int i;
for (i=0; i<strlen(args); i++)
{
printone(args[i]);
}
}
void printone(char arg)
{
printf("%c", arg)
}
The nest script uses the form
pid$target:hello:::entry
This is because in the real tests, I would not be able to use
pid$target:::entry because it would be trying to do too much.
As a result, the entries that I get (putting a printf into the probe)
from "./hello This is a test" gives me
_start:entry probemod = hello, probefunc =_start, ustackdepth = 1
printit:entry probemod = hello, probefunc = printit, ustackdepth = 3
printone:entry probemod = hello, probefunc = printone, ustackdepth = 4
As you can see, the printit function winds up with a skipped
ustackdepth (the value 2). I tried to test it without the hello in the
probe definition and it did show me the full set of libraries.
However, it still gave me the same problem. I may have to use a
"mydepth" variable rather than ustackdepth.
Have you run into anything like this?
--
Sabba - סבא הלל - Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, "Join me ashore"
[email protected] | The fish are the Jews, Torah is our water
http://photos1.blogger.com/blogger/7637/544/640/SabbaHillel.jpg
_______________________________________________
dtrace-discuss mailing list
[email protected]