From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 9 18:05:49 2013 Return-Path: Delivered-To: freebsd-hackers@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 ESMTP id 7577D3DF; Sat, 9 Nov 2013 18:05:49 +0000 (UTC) (envelope-from boris.astardzhiev@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2BF02B65; Sat, 9 Nov 2013 18:05:48 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id ez12so694045wid.15 for ; Sat, 09 Nov 2013 10:05:47 -0800 (PST) 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=UOPEzkGn/gnvREHCEMg2Bhf1bMcgQ5iIXnURSTeWfi8=; b=IeUTY9LGmavPx2vPDNGSqtzx0ksFVv0s6+kNFeY/AMPgr90KNI81OZsHgHG6iEsB5i Obcc16REATbEqNFdMGhi4uvNK7SeHSsc+4Y1M5ySWT1UjHTxqBDdKCoFr4iAtk3wRZ1o 7uYOmUim3HScgVN9j9Hr6ufBUZSJL4kG5L1HIp0Qu/zT8pj2qGDmJ4zdQNKVWyhBq7XC JJBoz7bFFaWHTKS393bF80eH3yWtZXO7FanNi0vHyUwLwaa8mpoAjigM/woXIzxius9Z wAwnmLuhOrHnaYfmo6qg3RV9JMLg72a0P2ffg+Ua8QBvs6xumsikQsY8eWj0pOFrFsrX 9i3A== MIME-Version: 1.0 X-Received: by 10.180.108.131 with SMTP id hk3mr6655827wib.10.1384020347277; Sat, 09 Nov 2013 10:05:47 -0800 (PST) Received: by 10.216.66.131 with HTTP; Sat, 9 Nov 2013 10:05:47 -0800 (PST) Date: Sat, 9 Nov 2013 20:05:47 +0200 Message-ID: Subject: ARM kgdb remote debugging over USB serial From: Boris Astardzhiev To: freebsd-arm@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 18:05:49 -0000 Hi, I have a question regarding the FreeBSD kernel debugging facilities. Has anyone succeeded in using kgdb with a target ARM machine over a USB serial. I've managed to build kgdb-arm http://bsdimp.blogspot.com/2007/10/cross-debugger.html (This tutorial also applies to building kgdb-arm in binutils) So on the arm machine I enter kdb: db> gdb db> s .. On the debugging machine I easily get into kgdb: kgdb-arm ${KERNEL_PATH}/kernel.debug kgdb> set remotebaud 115200 kgdb> target remote /dev/cuaU0 (the USB interface) So far so good but.. It seems to connect to the ARM device but it stops on an address kgdb has no reference about. I thought I was missing some symbols and.. kgdb> set solib-search-path ${KERNEL_PATH} This seems to load lots of symbols but still I can't backtrace or do anything. Attempting to do a 'bt' it tells me I got a SIGTRAP. I don't seem to understand. Any ideas or materials? Greetings, Boris