[SOLVED] kgdb strange behaviour on current

From: Victor Snezhko <snezhko_at_indorsoft.ru>
Date: Fri, 04 Nov 2005 01:18:54 +0600
Victor Snezhko <snezhko_at_indorsoft.ru> writes:

> (kgdb) list
> 215			curticks = softticks;
> 216			bucket = &callwheel[curticks & callwheelmask];
> 217			c = TAILQ_FIRST(bucket);
> 218			while (c) {
> 219				depth++;
> 220				if (c->c_time != curticks) {
> 221					c = TAILQ_NEXT(c, c_links.tqe);
> 222					++steps;
> 223					if (steps >= MAX_SOFTCLOCK_STEPS) {
> 224						nextsoftcheck = c;
> (kgdb) print c
> $1 = (struct callout *) 0xdeadc0de
> (kgdb) print bucket->tqh_first
> $2 = (struct callout *) 0xc18eb520
> (kgdb) print *(bucket->tqh_first)
> $3 = {c_links = {sle = {sle_next = 0xdeadc0de}, tqe = {tqe_next = 0xdeadc0de, 
>       tqe_prev = 0xdeadc0de}}, c_time = -559038242, c_arg = 0xdeadc0de, 
>   c_func = 0xdeadc0de, c_mtx = 0xdeadc0de, c_flags = -559038242}
> (kgdb) print bucket
> $4 = (struct callout_tailq *) 0xc66021e8
> (kgdb) quit
>
> /home/vvs # grep "#define.*[^S]TAILQ_FIRST" /usr/src/sys/sys/queue.h
> #define	TAILQ_FIRST(head)	((head)->tqh_first)
>
> bucket->tqh_first seems to be a valid pointer, but points to
> garbage. But c should be the same pointer, and debugger shows a
> distinct value for it!  

kgdb works fine, I misunderstood the moment of time when
crash occured.

-- 
WBR, Victor V. Snezhko
EMail: snezhko_at_indorsoft.ru
Received on Thu Nov 03 2005 - 18:19:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:47 UTC