From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 19:23:01 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35F2F709 for ; Mon, 21 Jul 2014 19:23:01 +0000 (UTC) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [IPv6:2607:f8b0:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC4C72A27 for ; Mon, 21 Jul 2014 19:23:00 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id hu12so13074348vcb.0 for ; Mon, 21 Jul 2014 12:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=MtP6u/ZdLeD8M2lazNyuuSXvzsxUsUmV0eYLt4a6RKs=; b=eoQoEqnslVNz5w47gLxKGFGwvhCWfCAUNjBSndlrb+1ZGfCKotmVidZwDNQbdwoKzs EyWg3nogJvekkjdromQfj2C0RYpyrQeClYK3iyQbmShoIicd2BxEwSGF25+7J44ucghS 3EBw3NV1fN1JtylDl1pA2BWkOsuPdQIaKh8Sz+UrSTbBz/CFEFaZMFI9dtYn6SCPYMyo HOzVtH6KYwdhgvBILet+xEK+X2zAhSjr3dw+MSBEXaBrWoqKGM+OyTZO6gXwBVdyTpL3 cl6Y49tJBqA8OfFSDJ2b6/aET0w9oygecDsE5kW7GHHp7aWPrrG2bl8GRSnVbRB6CoCk kbrQ== MIME-Version: 1.0 X-Received: by 10.52.7.163 with SMTP id k3mr17457612vda.58.1405970579057; Mon, 21 Jul 2014 12:22:59 -0700 (PDT) Received: by 10.220.20.74 with HTTP; Mon, 21 Jul 2014 12:22:59 -0700 (PDT) Date: Mon, 21 Jul 2014 12:22:59 -0700 Message-ID: Subject: Remote kernel debugging question From: Nidal Khalil To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 19:23:01 -0000 Hello All, I am somewhat new to BSD kernel but I am trying to debug a kernel module using remote debugging. I am using 9.2 RELEASE. I setup and compiled the kernel with the following: makeoptions DEBUG=-g options KDB options KDB_TRACE options DDB_CTF options DDB options GDB options ALT_BREAK_TO_DEBUGGER I setup the uart for serial1 flags to 0x90 and I can read and write to the serial from either machine Both machines have the same kernel booted. I can enter ddb but I can not launch gdb The remote GDB backend could not be selected. sysctl -a | grep debug.kdb debug.kdb.available: ddb Is that correct or it should be: debug.kdb.available: ddb gdb How do I enable gdb backend. I appreciate the help. Nidal