This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How can I access ULONG_MAX constant without using -g option?
- From: David Smith <dsmith at redhat dot com>
- To: Tetsuo Handa <penguin-kernel at I-love dot SAKURA dot ne dot jp>, fche at redhat dot com
- Cc: systemtap at sourceware dot org
- Date: Fri, 09 May 2014 09:39:08 -0500
- Subject: Re: How can I access ULONG_MAX constant without using -g option?
- Authentication-results: sourceware.org; auth=none
- References: <201405061502 dot JDC34371 dot FFVOSFQtOOHMJL at I-love dot SAKURA dot ne dot jp> <y0moazaisop dot fsf at fche dot csb> <201405072313 dot JHA93652 dot VOOFJtLFOQSHMF at I-love dot SAKURA dot ne dot jp> <536BB618 dot 7020203 at redhat dot com>
On 05/08/2014 11:51 AM, David Smith wrote:
> On 05/07/2014 09:13 AM, Tetsuo Handa wrote:
>> I think that returning 32-bits address on 32-bits kernel like
>>
>> current=f5c7b550
>> parent=c1581000
>> init=f7081aa0
>>
>> is the expected result which can be done by making changes shown below.
>>
>> --- task.stp
>> +++ task.stp
>> @@ -29,7 +29,7 @@
>> * more task-specific data.
>> */
>> function task_current:long () %{ /* pure */
>> - STAP_RETVALUE = (long)current;
>> + STAP_RETVALUE = (unsigned long)current;
>> %}
>>
>> /**
>> @@ -110,7 +110,7 @@ function pid2task:long (pid:long) %{ /*
>> #endif /* 2.6.24 */
>> #endif /* 2.6.31 */
>> rcu_read_unlock();
>> - STAP_RETVALUE = (long)t;
>> + STAP_RETVALUE = (unsigned long)t;
>> %}
>>
>> /**
I've checked the above patch in. Thanks!
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)