From owner-freebsd-questions@FreeBSD.ORG Mon Jul 21 06:24:48 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44583F8B for ; Mon, 21 Jul 2014 06:24:48 +0000 (UTC) Received: from mail-vc0-x231.google.com (mail-vc0-x231.google.com [IPv6:2607:f8b0:400c:c03::231]) (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 05AEA2A22 for ; Mon, 21 Jul 2014 06:24:47 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id hy4so11429432vcb.36 for ; Sun, 20 Jul 2014 23:24:46 -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=oCuLUALGxvBsBuSpBQHf2jQ93En9uh4tCHa3eN/s4oM=; b=oUx1LjxPomYug5VuO7PXJGoFwj+tVg69JcjWBuy5h6v8LJll3XoOX6lb+4ubEqxu16 DwQBkMT7Heap1euixTSL3VP/ZmOY8p29ffbr7C5Y+c2MbLOMYW/rHkxvvyosrmM24Zik 2VmfbvELVuHxL/zGU0111r+D8rExuZsK2ci19+yAHhbsfEsDdE21FeIUJA6YUlqst0fy E3u3MIedB6ej57gCkfVOi7hEJUCgC2Lcy3QBttfvHog28i9o0GEp9Eutw8C15DDu6hPP 2M2Eygt9L1oOc3gXkvtl9d+8QEuzEHrOX6xBc1XD+4m+jTwr5Ap0Vm0kUt+D/o4l2REt eOCA== MIME-Version: 1.0 X-Received: by 10.52.135.133 with SMTP id ps5mr22469095vdb.33.1405923886748; Sun, 20 Jul 2014 23:24:46 -0700 (PDT) Received: by 10.220.20.74 with HTTP; Sun, 20 Jul 2014 23:24:46 -0700 (PDT) Date: Sun, 20 Jul 2014 23:24:46 -0700 Message-ID: Subject: Remote kernel debugging question From: Nidal Khalil To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 06:24:48 -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. Thanks Nidal