From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6858A00C3; Mon, 8 Jun 2020 02:31:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC99E1BEE3; Mon, 8 Jun 2020 02:31:12 +0200 (CEST) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 483AA1BED2 for ; Mon, 8 Jun 2020 02:31:11 +0200 (CEST) Received: by mail-lf1-f67.google.com with SMTP id 202so9149088lfe.5 for ; Sun, 07 Jun 2020 17:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LafqiHYF4VGstG88X3PtHVHhWjR4sM35RE4nLj7NDOs=; b=Y6LPLcUKBU/CUCXau3NhN2Y4O3/N+cTUduQgJ1N0WoprDLHZENHTyYweojXPKZ7mzO VW3uxUOhxJZPbClOfZoo/PUkwIZOh+nd+z2DVuwsBSWLcx/VMTF5Uvl9MUoieTgpf81W Kgesq77Rx8LRu8DzIOnPTL00eD5dkgNLMxTV+gipjDN27tOki2QqMuI7msV6g5f0Y1n1 4PxCyn4jhicTfGttE/K6jW5Hcclhv/Mk06ZpZFiddcEaLY8tAxm/dns0DynArSofrPMn sHIEwibFtUF6glIFBGywMNswfEXVKD2wCgAhuBgnqKJBFBkm5A2g7cYYG4O1kFOHTgGz mrLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LafqiHYF4VGstG88X3PtHVHhWjR4sM35RE4nLj7NDOs=; b=cvhuN6SMQOEJLv2fn+WeOizicd6gvToY+v37bXasBnQgOkwsHyeybQNR4qFsLwSgVc LevidCVKu+QswftgIcQVhL7G1tif3vdIc5eV+uHYNNi7FIxO6wtLiCMnNbCxLbA7WNDC l6b15AaM1Tey7r/pyr0CO2tVobqZM/cek2FHjaoQCYUHn/Apqrt0KWzzMMYVjXvkkyMV lZ5eZg/X9X3T8RyI8UmWsxRCu33nLR6ZMMfVzxSQKdjDfgTSuZrX/S8JciEcDMMqGdxo Z4hh19BHgEaYe+5A6j+MH0ewbDUcGo82WqKsAt7xmGlvgrRdar5zb8Gp4VWCr/teG1KB /ueg== X-Gm-Message-State: AOAM533MMK6rUOC8nRBxvfCjj9jWtqxREIPuTuB/RjeYp1EUZn8HYxsF 2nBpAYahExKU6U1w5HbNLXQ= X-Google-Smtp-Source: ABdhPJxP6PUH+wm+q5QITX+KZn3PXSEytTPW6v7UxwtyA4V414+txTu94kIad5yGmMIy+kqC5oXI/g== X-Received: by 2002:a19:5056:: with SMTP id z22mr11071579lfj.195.1591576270755; Sun, 07 Jun 2020 17:31:10 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id 22sm3397901lju.5.2020.06.07.17.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 17:31:10 -0700 (PDT) Date: Mon, 8 Jun 2020 03:31:08 +0300 From: Dmitry Kozlyuk To: talshn@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, pallavi.kadam@intel.com, david.marchand@redhat.com, ranjit.menon@intel.com, navasile@linux.microsoft.com, harini.ramakrishnan@microsoft.com, ocardona@microsoft.com, bruce.richardson@intel.com Message-ID: <20200608033108.3f99ebd7@sovereign> In-Reply-To: <20200607093529.15456-3-talshn@mellanox.com> References: <20200607093529.15456-1-talshn@mellanox.com> <20200607093529.15456-3-talshn@mellanox.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] eal/windows: support debug calls X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, 7 Jun 2020 12:35:29 +0300 talshn@mellanox.com wrote: > From: Tal Shnaiderman > > Support the debug functions in eal_common_debug.c for Windows. > > Implementation of rte_dump_stack to get a backtrace similarly to Unix > and of rte_eal_cleanup in eal.c. > > Signed-off-by: Tal Shnaiderman > --- > config/meson.build | 1 + > lib/librte_eal/common/meson.build | 1 + > lib/librte_eal/windows/eal.c | 7 ++++ > lib/librte_eal/windows/eal_debug.c | 77 +++++++++++++++++++++++++++++++++----- > 4 files changed, 77 insertions(+), 9 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index 43ab113106..51a953c7d3 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -268,6 +268,7 @@ if is_windows > if cc.get_id() == 'gcc' > add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c') > endif > + add_project_link_arguments('-lDbgHelp', language: 'c') When cross-compiling with MinGW-w64 from Linux, the library is "dbghelp" (lowercase), and filesystem is case-sensitive, so this doesn't work. Suggest using lowercase everywhere. [snip] > /* Launch threads, called at application init(). */ > int > rte_eal_init(int argc, char **argv) > diff --git a/lib/librte_eal/windows/eal_debug.c b/lib/librte_eal/windows/eal_debug.c > index 669be6ff97..fda217bee4 100644 > --- a/lib/librte_eal/windows/eal_debug.c > +++ b/lib/librte_eal/windows/eal_debug.c > @@ -5,16 +5,75 @@ > #include > #include > #include > +#include > > - /* call abort(), it will generate a coredump if enabled */ > -void > -__rte_panic(const char *funcname, const char *format, ...) > +#include Same problem with filename, same solution. > + > +#define BACKTRACE_SIZE 256 > + > +/* dump the stack of the calling core */ > +void rte_dump_stack(void) Result type should be on its own line. Please re-check the series for this particular violation, there are a few more instances. [rest snipped] -- Dmitry Kozlyuk