From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id A9D3EC67C for ; Fri, 24 Jun 2016 12:05:28 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id 187so8351002wmz.1 for ; Fri, 24 Jun 2016 03:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mq51MPjSQGmnpa1+zv2ao3eAD9FQNX624h3YCsvgug0=; b=g4gICJ7nUqk8C9MNu+fxpnki/XVJ6FzVi1xzXgtyy2d31ytVnMpjIdKomtzHje1C3U HAL07yDL4mXOjr0bfdgyvf18xmGmjQ5SbXrfuG73QD/10EXmMRw/j9cZdLcec26dfWH8 NuVSZiaWWUvzHJFnB2MtA1r5vyZZJsS7QRffhGGZjz8n0qdXC6prp7y99TWxuP4pGpMy T13jMy5NEa1nsn89f48Wh9JUkI1thtwAARqyo6Cb+xmNYp15hq45BgS0Nu3+INYU6778 OeMunnmkabItUecRZueqRD8ammT7AeT5a0kRyIbiAk/S/yV1ICSj5ZsLal8LfpHnoGMq 5qmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Mq51MPjSQGmnpa1+zv2ao3eAD9FQNX624h3YCsvgug0=; b=WwVWaQA5wZowNYkgAfwbCSwpByaDf11z+/IlYCG3JjBf7W/f+ZGKF6AqiYotoua66i bBUc4KFw3kC6mJRzrgH6tdm8R4x+BkaCqJMvPaqOTmfN/03TZMBdFB9i3Dol/+tIkcs9 Oh42YlUqLWmIUzFgoxjrRZSv87GsZ0b3cTThpKXH0K7Hm3gfXfG7/U2QfQ8Cr1HGR1mW 9VxSgX+lU+RUk2gO9jWu1TihXZpN/UehG1dT1SYT6RwZXJEgRl9Qvq0psW/B3Z0CJWze qHIbKPdb9SDg7yaZBlshUYQBYeRZGt0xqSGFQD2+coxtJpi1X/Wxa1rvbI/VScEym7fS pqsw== X-Gm-Message-State: ALyK8tKNH6Wqj78k9BGL3DC1bZrJj5TeaH+hwWJKaro0zk6ESYYQ1QaxBYwM9B2HeZMzBe1A X-Received: by 10.28.189.215 with SMTP id n206mr12800547wmf.76.1466762728469; Fri, 24 Jun 2016 03:05:28 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id r6sm2361231wme.14.2016.06.24.03.05.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 03:05:27 -0700 (PDT) From: Thomas Monjalon To: Catalin Vasile Cc: dev@dpdk.org, "Dumitrescu, Cristian" Date: Fri, 24 Jun 2016 12:05:26 +0200 Message-ID: <1678929.kjLRgJKAHP@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D8912647A0C78F@IRSMSX108.ger.corp.intel.com> References: <3EB4FA525960D640B5BDFFD6A3D8912647A0C78F@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] backtracing from within the code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 10:05:29 -0000 2016-06-24 09:25, Dumitrescu, Cristian: > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Catalin Vasile > > I'm trying to add a feature to DPDK and I'm having a hard time printing a > > backtrace. > > I tried using this[1] functions for printing, but it does not print more than one > > function. Maybe it lacks the symbols it needs. [...] > It eventually calls rte_dump_stack() in file lib/lirte_eal/linuxapp/eal/eal_debug.c, which calls backtrace(), which is probably what you are looking for. Example: 5: [build/app/testpmd(_start+0x29) [0x416f69]] 4: [/usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7eff3b757610]] 3: [build/app/testpmd(main+0x2ff) [0x416b3f]] 2: [build/app/testpmd(init_port_config+0x88) [0x419a78]] 1: [build/lib/librte_eal.so.2.1(rte_dump_stack+0x18) [0x7eff3c126488]] Please tell us if you have some cases where rte_dump_stack() does not work. I do not remember what are the constraints to have it working. Your binary is not stripped?