Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2002 17:23:30 -0400 (EDT)
From:      Andy <andy@wantpackets.com>
To:        freebsd-ppc@freebsd.org
Subject:   debug output
Message-ID:  <1027113810.3d38835229cdb@www.wantpackets.com>

next in thread | raw e-mail | index | archive | help
Hello Peter G,

I put a breakpoint in panic, and was able to get a useful 
debug output..

init died (signal 6, exit 0)

Breakpoint 1, panic (fmt=0x262610 "Going nowhere without my init!") at
machine/cpufunc.h:154
154             __asm ("mfsprg %0, 0" : "=r"(ret));
(gdb) where
#0  panic (fmt=0x262610 "Going nowhere without my init!") at machine/cpufunc.h:154
#1  0x00171fc4 in exit1 (td=0xe00d4000, rv=-482334504) at
../../../kern/kern_exit.c:182
#2  0x001710e8 in execve (td=0xe00d4000, uap=0xe3402d50) at
../../../kern/kern_exec.c:539
#3  0x00165010 in start_init (dummy=0x262610) at ../../../kern/init_main.c:627
#4  0x00174ae0 in fork_exit (callout=0x164bd4 <start_init>, arg=0x0,
frame=0xe3402ddc)
    at ../../../kern/kern_fork.c:861
#5  0x0025309c in fork_trampoline () at ../../../powerpc/powerpc/swtch.s:153
#6  0x7c0802a6 in ?? ()

Now, let me peek in line 539 and the relevent info on 193 or so, and show you:
(file kern_exec.c)

under "exec_fail:" there is
        if (imgp->vmspace_destroyed) {
                /* sorry, no more process anymore. exit gracefully */
                exit1(td, W_EXITCODE(0, SIGABRT));
                /* NOT REACHED */
                error = 0;
        }

"exec_fail:" is jumped to by the statement in 193 or so which says:

        imgp->stringbase = (char *)kmem_alloc_wait(exec_map, ARG_MAX + PAGE_SIZE);
        if (imgp->stringbase == NULL) {
                error = ENOMEM;
                mtx_lock(&Giant);
                goto exec_fail;
        }

Just for your entertainment, you should know I am using gcc 3.1 for this
stuff.  Any ideas?

thanks,
andrew





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ppc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1027113810.3d38835229cdb>