This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Too larger number in badkprobe test on 32 bits machine.
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: wenji dot huang at oracle dot com
- Cc: systemTAP <systemtap at sources dot redhat dot com>
- Date: Tue, 06 Jan 2009 11:03:37 -0500
- Subject: Re: Too larger number in badkprobe test on 32 bits machine.
- References: <49631A6E.20305@oracle.com>
Wenji Huang <wenji.huang@oracle.com> writes:
> [...]
> kernel.statement(-1).absolute {} probe timer.s(1) { exit() }'
> [...]
> /tmp/staplt6ZIz/stap_84012a21d1a75884e8298817a3e8ad51_390.c:235:
> warning: integer constant is too large for 'unsigned long' type
> /tmp/staplt6ZIz/stap_84012a21d1a75884e8298817a3e8ad51_390.c:235:
> warning: large integer implicitly truncated to unsigned type
> make[1]: ***
> [...]
> Seems "-1" is interpreted as 64-bit number and not appropriate for 32
> bits machine. Change to other number or update translate.cxx to
> perform explicitly truncation ?
Yeah, translate.cxx could do it - the trick is finding a series of
casts that quietly truncates the value. (Changing the test case to
some other number like 0 would only paper over the problem.)
- FChE