From owner-freebsd-current Wed Dec 11 13:34:48 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id NAA11093 for current-outgoing; Wed, 11 Dec 1996 13:34:48 -0800 (PST) Received: from Kitten.mcs.com (Kitten.mcs.com [192.160.127.90]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id NAA11088 for ; Wed, 11 Dec 1996 13:34:42 -0800 (PST) Received: from Mailbox.mcs.com (Mailbox.mcs.com [192.160.127.87]) by Kitten.mcs.com (8.8.2/8.8.2) with ESMTP id PAA13487 for ; Wed, 11 Dec 1996 15:34:36 -0600 (CST) Received: from Mercury.mcs.net (jonas@Mercury.mcs.com [192.160.127.80]) by Mailbox.mcs.com (8.8.2/8.8.2) with ESMTP id PAA12682; Wed, 11 Dec 1996 15:34:12 -0600 (CST) Received: (from jonas@localhost) by Mercury.mcs.net (8.8.2/8.8.2) id PAA04909; Wed, 11 Dec 1996 15:34:07 -0600 (CST) From: Lars Jonas Olsson Message-Id: <199612112134.PAA04909@Mercury.mcs.net> Subject: remote gdb To: current@freebsd.org Date: Wed, 11 Dec 1996 15:34:07 -0600 (CST) Cc: jonas@mcs.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I'm debugging dga related (mprotect) related panics in cuyrrent. I'm doing it with remote gdb like: Have options DDB in config file SMARTDEBUG config -g SMARTDEBUG make the kernel cp kernel kernel.debug strip -d kernel install kernel on machine that panics. install kernel.debug on remote machine Boot machine to be debugged with -g start gdb on other machine in directory with kernel.debug in it. amcell1# gdb kernel.debug GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.13 (i386-unknown-freebsd), Copyright 1994 Free Software Foundation, Inc... (gdb) target remote /dev/cuaa1 Remote debugging using /dev/cuaa1 pmap_protect (pmap=0xf2357864, sva=135467008, eva=139661312, prot=1) at ../../i386/i386/pmap.c:1874 ../../i386/i386/pmap.c:1874: No such file or directory. (gdb) dir /amcell2/new/src/sys/compile/SMARTDEBUG Source directories searched: /amcell2/new/src/sys/compile/SMARTDEBUG:$cdir:$cwd (gdb) bt #0 pmap_protect (pmap=0xf2357864, sva=135467008, eva=139661312, prot=1) at ../../i386/i386/pmap.c:1874 #1 0xf01a396e in vm_map_protect (map=0xf2357800, start=135467008, end=139661312, new_prot=1 '\001', set_max=0) at ../../vm/vm_map.c:1201 #2 0xf01a566e in mprotect (p=0xf234a200, uap=0xefbfff94, retval=0xefbfff84) at ../../vm/vm_mmap.c:484 #3 0xf01bc72b in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 24576, tf_esi = 0, tf_ebp = -272640728, tf_isp = -272629788, tf_ebx = 0, tf_edx = -272641536, tf_ecx = -272641536, tf_eax = 74, tf_trapno = 12, tf_err = 7, tf_eip = 135115361, tf_cs = 31, tf_eflags = 642, tf_esp = -272640756, tf_ss = 39}) at ../../i386/i386/trap.c:891 #4 0xf01b4155 in Xsyscall () #5 0x1e7a in ?? () #6 0x1095 in ?? () (gdb) list 1869 if (pbits & PG_RW) { 1870 if (pbits & PG_M) { 1871 vm_offset_t sva = i386_ptob(sindex); 1872 if (pmap_track_modified(sva)) { 1873 vm_page_t m = PHYS_TO_VM_PAGE(pbits); 1874 m->dirty = VM_PAGE_BITS_ALL; 1875 } 1876 } 1877 ptbase[sindex] = pbits & ~(PG_M|PG_RW); 1878 anychanged = 1; Now how do I shutdown the system nicely? (as nicely as possible?) Jonas