From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=james.feist@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47zvxG6h8tzDqsp for ; Sat, 18 Jan 2020 08:54:57 +1100 (AEDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 13:54:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,331,1574150400"; d="scan'208";a="274511734" Received: from skyhawk.jf.intel.com (HELO [10.54.51.81]) ([10.54.51.81]) by FMSMGA003.fm.intel.com with ESMTP; 17 Jan 2020 13:54:47 -0800 Subject: Re: OpenBMC Source-Level Debugging To: John Chung , openbmc@lists.ozlabs.org References: From: James Feist Message-ID: <0f56ce8a-a440-dbe8-b9ce-157c6f6185ee@linux.intel.com> Date: Fri, 17 Jan 2020 13:54:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jan 2020 21:54:59 -0000 On 1/14/20 5:02 AM, John Chung wrote: > Hi All, > > I am doing a personal study on OpenBMC recently. And I am wondering that > how to do source-level debugging via gdb, especially in vscode (Not sure > it is possible or not). This is how I get gdb running, there may be (probably are) better ways: 1. Add IMAGE_INSTALL_append += "gdb" to the end of your local.conf to get gdb in the image. 2. devtool modify 'package' to modify package 3. scp build/workspace/sources//oe-workdir/packages-split/-dbg/usr/bin/.debug/ onto image to get symbols. 4. gdb pacakge 5. symbol-file Not sure about vscode usage. -James > > If anyone has any experience or documentation, please kindly let me know. > > Very appreciated for the help. > > Thanks, > John > >