From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 3 06:59:35 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F9A016A41A for ; Mon, 3 Sep 2007 06:59:35 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp5.yandex.ru (smtp5.yandex.ru [87.250.248.71]) by mx1.freebsd.org (Postfix) with ESMTP id 482CD13C46B for ; Mon, 3 Sep 2007 06:59:31 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from ns.kirov.so-cdu.ru ([77.72.136.145]:16124 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S1053645AbXICG64 (ORCPT + 1 other); Mon, 3 Sep 2007 10:58:56 +0400 X-Comment: RFC 2476 MSA function at smtp5.yandex.ru logged sender identity as: bu7cher Message-ID: <46DBB0AE.90106@yandex.ru> Date: Mon, 03 Sep 2007 10:58:54 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: grog@freebsd.org Subject: Remote GDB howto X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2007 06:59:35 -0000 Hi, I want to debug my kernel with modules through serial console. I have two machines with 7.0-CURRENT. What i do: hint.sio.0.flags="0x90" On the target system load all needed KLD. Make .asf output with patched asf(8). Why it don't create output for KERNFILE? Copy *.symbols files and .asf file from target machine. On second machine run: # du -l /dev/cuad0 ~^D # kgdb (kgdb) target remote /dev/cuad0 (kgdb) add-symbol-file /path/to/local/copy/of/file (kgdb) (kgdb) cont On target machine run into panic. Now on the second machine kgdb take a trap, but i only have the following: Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread 0] 0x00000000 in ?? () (kgdb) bt #0 0x00000000 in ?? () What i've missed? -- WBR, Andrey V. Elsukov