Re: Kernel trace question (kernel doesn't compile _without_ -O)

2000-04-05 Thread Peter Jeremy

On Wed, Mar 29, 2000 at 04:44:08AM +1000, David Gilbert wrote:
>Also... I have noticed that several modules don't want to compile in
>the kernel without -O, including kern_synch.c (undefined reference to
>__cursig) and atomic.c (inconsistent operand constraints in an `asm').

I am aware of problems with atomic.c, but haven't had the time to
fix it properly.  My original problem was trying to make the code
work in both 3.x and 4.x since gcc 2.7.x and egcs/gcc 2.9.x have
imcompatible constraint requirements.

I suspect the current approach (inline functions) may not be optimal,
but haven't spent enough time experimenting to be certain.

Peter


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Kernel trace question (kernel doesn't compile _without_ -O)

2000-03-28 Thread David Gilbert

I'm puzzled over the following kernel trace.  'm' in frame 6 is
clearly not null... but in frame 5, it is.  I have compiled the
ng_l2tp module without -O... just in case that was the problem, but
line 391 (the for loop) explicitly tests m for NULLness anyways.

Also... I have noticed that several modules don't want to compile in
the kernel without -O, including kern_synch.c (undefined reference to
__cursig) and atomic.c (inconsistent operand constraints in an `asm').

(kgdb) bt
#0  boot (howto=256) at ../../kern/kern_shutdown.c:304
#1  0xc0155ed5 in panic (fmt=0xc026010f "page fault")
at ../../kern/kern_shutdown.c:554
#2  0xc022557a in trap_fatal (frame=0xc0269d58, eva=16)
at ../../i386/i386/trap.c:924
#3  0xc022522d in trap_pfault (frame=0xc0269d58, usermode=0, eva=16)
at ../../i386/i386/trap.c:817
#4  0xc0224db3 in trap (frame={tf_fs = -1071251440, tf_es = 9502736, 
  tf_ds = 16, tf_edi = 96, tf_esi = 1, tf_ebp = -1071211080, 
  tf_isp = -1071211132, tf_ebx = 0, tf_edx = 0, tf_ecx = 0, tf_eax = 0, 
  tf_trapno = 12, tf_err = 0, tf_eip = -1072237390, tf_cs = 8, 
  tf_eflags = 66054, tf_esp = -1038559808, tf_ss = -1072044908})
at ../../i386/i386/trap.c:423
#5  0xc016f4b2 in m_dup (m=0x0, how=1) at ../../kern/uipc_mbuf.c:763
#6  0xc019e4f3 in ngl2tp_ctrlq_timeout (arg=0xc218d5c0)
at ../../netgraph/ng_l2tp.c:393
#7  0xc015b245 in softclock () at ../../kern/kern_timeout.c:131
(kgdb) frame 6
#6  0xc019e4f3 in ngl2tp_ctrlq_timeout (arg=0xc218d5c0)
at ../../netgraph/ng_l2tp.c:393
393 n = m_dup(m, M_NOWAIT);
(kgdb) l
388 int i, error = 0;
389 u_char *d;
390 
391 for(m=p->ctrlq, i=0; m && i < p->Swin; m = m->m_nextpkt, i++)
392 {
393 n = m_dup(m, M_NOWAIT);
394 if(n)
395 {
396 d = mtod(n, u_char *);
397 *((u_int16_t *)(d+10)) = htons(p->Nr); /* update window recd */
(kgdb) p m
$1 = (struct mbuf *) 0xc0752280

-- 

|David Gilbert, Velocet Communications.   | Two things can only be |
|Mail:   [EMAIL PROTECTED] |  equal if and only if they |
|http://www.velocet.net/~dgilbert |   are precisely opposite.  |
=GLO


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message