Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-05 Thread Michael Schuster, Oracle
On 04.05.10 21:13, Yossi Lev wrote: No, this-entry-pc is not a user-space pointer --- it is not a pointer at all, it is an unsigned integer that I would like to convert to a string. Here is what I'm trying to do: - I have a structure of type ReadAcqEntry at userspace with various numeric

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-05 Thread Yossi Lev
Hi Michael I just found a function that (sort of) does what I need: it is called lltostr and it takes a long long integer, and returns a string that represents it. (Unfortunately I didn't find an option to do the translation in hexadecimal, but I can live with that...) As for your question,

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-05 Thread Michael Schuster
On 05.05.10 18:11, Yossi Lev wrote: Hi Michael I just found a function that (sort of) does what I need: it is called lltostr and it takes a long long integer, and returns a string that represents it. (Unfortunately I didn't find an option to do the translation in hexadecimal, but I can live

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-05 Thread Nicolas Williams
On Wed, May 05, 2010 at 09:11:27AM -0700, Yossi Lev wrote: I just found a function that (sort of) does what I need: it is called lltostr and it takes a long long integer, and returns a string that represents it. (Unfortunately I didn't find an option to do the translation in hexadecimal, but

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-05 Thread Yossi Lev
Thanks, I know that I can provide multiple keys, but the number of keys for an aggregation must be constant, and I didn't want to pad with zeros all missing keys as in the common case my sequence has 2 or 3 keys (and not the maximum number of 8). These are minor issues that have to do with how

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-05 Thread Michael Schuster
On 05.05.10 18:40, Yossi Lev wrote: Thanks, I know that I can provide multiple keys, but the number of keys for an aggregation must be constant, and I didn't want to pad with zeros all missing keys as in the common case my sequence has 2 or 3 keys (and not the maximum number of 8). These are

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-04 Thread Chad Mynhier
On Tue, May 4, 2010 at 11:23 AM, Yossi Lev yosef@sun.com wrote: Hi I'm running a simple DTrace script that has the following clause: pid$target::ReportTx:entry /arg1 != 0 this-numEntries != 0/ {  printf(NumEntries: %lld\n, (long long)this-numEntries);  this-entry =

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-04 Thread Yossi Lev
Thanks Chad, but I don't think that this is the problem. The this-rAcqArr points to the beginning of an array in the traced process. I initialize it in a previous clause that has exactly the same probe: pid$target::ReportTx:entry /arg1 != 0 / { this-dataP = (ProfData*)copyin(arg2,

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-04 Thread Yossi Lev
I have some more information, that suggests that something is just wrong with the way I'm using stringof. I tried replacing stringof(this-pcInt) with stringof(5) and still got the error. So, I tried the following one-liner from the shell: dtrace -n 'BEGIN{printf(%s\n,stringof(0x5));}' dtrace:

Re: [dtrace-discuss] Invalid address error when using stringof to convert a pointer to a string

2010-05-04 Thread Chad Mynhier
On Tue, May 4, 2010 at 12:58 PM, Yossi Lev yosef@sun.com wrote: Moreover, I know that the value that I'm getting is valid, because I had the following printf statement: pid$target::ReportTx:entry /arg1 != 0 this-numEntries != 0/ {  printf(NumEntries: %lld\n, (long