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: How can I access ULONG_MAX constant without using -g option?


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)


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