Easy c debugging question
Matthew Dillon
dillon at apollo.backplane.com
Tue Mar 29 16:11:25 PST 2005
:On Tue, Mar 29, 2005 at 05:32:23PM +0300, Dennis Melentyev wrote:
:> walt wrote:
:> >printf("user=%16d\n", k->cp_user);
:>
:> The hint:
:>
:> Just use -Wformat or even -Wall, -pedantic and -Werror in gcc command
:> line and _*READ*_ the warnings.
:[...]
:>
:> So, you're trying to spoil the stack putting there 64bit values but
:> extracting the 32bit ones...
:
:Right. You should include inttypes.h and use e.g. PRId64 to format it.
:
:Joerg
Umm. Try the initialized pointer being passed to
kinfo_get_sched_cputime().
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Users
mailing list