From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 7 12:38:35 2008 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 186E61065685 for ; Mon, 7 Jul 2008 12:38:35 +0000 (UTC) (envelope-from riaank@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by mx1.freebsd.org (Postfix) with ESMTP id DBBC88FC2D for ; Mon, 7 Jul 2008 12:38:34 +0000 (UTC) (envelope-from riaank@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2752236rvf.43 for ; Mon, 07 Jul 2008 05:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=0GqWHSTZmp2KFoUJUMNddD4VS+X1MkLRcFanUvcBIjo=; b=HNRu5gcxYUKcVMADIGddzP/Dm5yxr1mbueWBa75zPb+WB6J4IfKPt4nNnc+Te80XWF pGcLd+Z3Pj9aEPi78VxaR0zqI0/w7wrFh+N5Vl3eXG11k6NTOlqvarT+Z1POPqQgnJ3q QoyzfOcZ1AWIhjrdge2SvnGCyQ0FKCL/kVCvE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=ektx/NGhVqgJUfDg2EJnTcvhTrl7+z3f2fW4DZg70Lm3QQSN4XMh2foij0x5nc2v7k Ksse5Hl4UF3z+OjKvjlU2mBKFn5Xsn0iVDEj8gKl3yMHKhWvEidbhYgMu8nN+YaKAeI1 /tAyEJJVySQCnMQn3JcKcYCF7ikv3A1LJ74+0= Received: by 10.141.29.18 with SMTP id g18mr2194074rvj.298.1215432804040; Mon, 07 Jul 2008 05:13:24 -0700 (PDT) Received: by 10.141.175.11 with HTTP; Mon, 7 Jul 2008 05:13:23 -0700 (PDT) Message-ID: <85c4b1850807070513i3c6d8f63x4e89ebe559be0330@mail.gmail.com> Date: Mon, 7 Jul 2008 14:13:23 +0200 From: "Riaan Kruger" To: karimulla@krify.com In-Reply-To: <20080703044723.BD564B69@resin11.mta.everyone.net> MIME-Version: 1.0 References: <20080703044723.BD564B69@resin11.mta.everyone.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: kgdb error: Ignoring packet error, continuing.... 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, 07 Jul 2008 12:38:35 -0000 On Thu, Jul 3, 2008 at 1:47 PM, karim sk wrote: > > Hi, > > I am trying to setup kgdb on serial console in freebsd. I have done > the following steps. > > 1. Compile the kernel with the following options > options DDB > options KDB > makeoptions DEBUG-g > > 2.Installed the kernel on the target machine. > 3. Transferred the kernel.debug to host machine. > 4. Modified the file /boot/device.hints in the target machine to have > sio flags as > hint.sio.0.at="isa" > hint.sio.0.port="0X3F8" > hint.sio.0.flags="0x80" > hint.sio.0.irq="4" > 5. Reboot the target machine. At the loader prompt type the following > set comconsole_speed=9600 > boot -d > Then the target machine stops at ddb> prompt. > 6.In the host machine type the following at kgdb prompt > kgdb> set remotebaud 9600 > kgdb> file kernel.debug > kgdb> target remote /dev/cuad0 > > This is not able to establish the connection. > It is giving following errors. > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Couldn't establish connection to remote target. > Malformed response to offset query, timeout. > > Can any body tell why packet error is coming when kgdb is trying to > establish the connection. > > Thanks in advance. > > Karim I am not sure if it will help but according to on http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf the target : "You choose a serial port by setting bit 0x80 of the device flags in /boot/loader.conf : hint.sio.0.flags="0x90" In this example, bit 0x10 is also set to tell the kernel gdb stub to access remote debugging via this port." Hope it helps Riaan PS. Sorry previous reply was only to Karin and not to the list as well.