From patchwork Fri Sep 7 06:40:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rashmica Gupta X-Patchwork-Id: 967228 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4267Bz0C3Xz9sBJ for ; Fri, 7 Sep 2018 16:41:47 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TMawXJa1"; dkim-atps=neutral Received: from lists.ozlabs.org (unknown [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4267By4sTwzF3SN for ; Fri, 7 Sep 2018 16:41:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TMawXJa1"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=209.85.215.177; helo=mail-pg1-f177.google.com; envelope-from=rashmica.g@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TMawXJa1"; dkim-atps=neutral Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4267BZ4T4XzF3Sd for ; Fri, 7 Sep 2018 16:41:26 +1000 (AEST) Received: by mail-pg1-f177.google.com with SMTP id y4-v6so6480248pgp.9 for ; Thu, 06 Sep 2018 23:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fLVyrnHmT+aMSiaQW3tz9YJzMmb52+lJ9sYZ9Lauysc=; b=TMawXJa1P+REnOF6Cntu139+P6MW4VAMsWl/FX62ut4i7yJwF4BRI+R3N97CcLtSmt 5tI9uhGbAuoV0Qdx+hyvcXsIIrZr5Jthm5BXTUdXDTtbDpBTJGCb8RIOFm+yoT77WX9a 9qI1sKwbrHlcnmzsfttjO7YkSWLf9WH50EZCXNR0bsvUFSXH1MPq9gpGjpDrcpapTS6w RHk8dLZL25E/60WOMANJormEExxlGgfQfQ/ORrUe39xfiD4LT/A5JCM9afmXJJqyJ0VJ pyEdmf3T87Q5ciMKOpC0zc27gWKr3vF/qsc04lVxzN78F01ND9PXdwQ+DGL/DsDEkDF+ QlZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fLVyrnHmT+aMSiaQW3tz9YJzMmb52+lJ9sYZ9Lauysc=; b=dUJOBAZ/YNqPayser/nJ9FzSNPExHu8Omt01UB8RAXpQv6hqnXO5JeOQ5RGMi27yUh CVJFO4cAYuyBU2s+lAUK9NMwC+AMbLRvx2NUS5qshcrbG9rP7z+GpHTvIwgviiJAnNdt u4+isUMJAGMJwF96e5kl6Hlg7EAEslAgULErmNx5+smoEGGER8IVITjrElslpN/q6qco Mn4ARhBry9cGx+ejYZBfZ1LnKKHBI/BysNcaZkdLMXqc7WQKOvxsvtbEbALuYkf45ls2 8PPN6ePjYMl+yJqo0LMn5G+LbZDCarryON6f9oyXsJ7pCGQmWNBBn3RTPgw3ChvgclyV vgpg== X-Gm-Message-State: APzg51ChIq0j54HaaEcVcuJg9KX24CJ1bvDYFKPzgvktuV5mB6OoTVQx qGiVjN5pf6ECTOKWe3UzP/aooPEkOu4= X-Google-Smtp-Source: ANB0Vda3iFEPYVn/Ar0TM3bP3K7eFDNgFE/NXWmh1dNSi573kt1uctbBgyTuBXzJhxXfFevu2umJMQ== X-Received: by 2002:a62:c98e:: with SMTP id l14-v6mr6886357pfk.10.1536302484751; Thu, 06 Sep 2018 23:41:24 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id y69-v6sm14958108pfd.36.2018.09.06.23.41.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Sep 2018 23:41:24 -0700 (PDT) From: Rashmica Gupta To: pdbg@lists.ozlabs.org Date: Fri, 7 Sep 2018 16:40:14 +1000 Message-Id: <20180907064015.1058-16-rashmica.g@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180907064015.1058-1-rashmica.g@gmail.com> References: <20180907064015.1058-1-rashmica.g@gmail.com> Subject: [Pdbg] [PATCH v2 15/16] pdbg/gdbserver: Make gdbserver optional X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: npiggin@gmail.com MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Rashmica Gupta --- Makefile.am | 21 +++++++++++---------- configure.ac | 6 ++++++ src/pdbgproxy.c | 3 ++- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index a476b87..581419c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,14 +84,17 @@ pdbg_SOURCES = \ src/parsers.c \ src/optcmd.c \ src/options_@ARCH@.c \ - src/htm.h \ - src/main.h \ - src/optcmd.h \ - src/options.h \ - src/parsers.h \ - src/progress.h \ - src/pdbgproxy.c \ - src/gdb_parser.c + src/pdbgproxy.c + +pdbg_CFLAGS = -I$(top_srcdir)/libpdbg -Wall -Werror -DGIT_SHA1=\"${GIT_SHA1}\" \ + $(ARCH_FLAGS) + +if GDBSERVER +pdbg_SOURCES += \ + $(extra_sources) +else +pdbg_CFLAGS += -DDISABLE_GDBSERVER +endif src/main.c: $(DT_headers) @@ -99,8 +102,6 @@ pdbg_LDADD = $(DT_objects) libpdbg.la libfdt.la libccan.a \ -L.libs -lrt pdbg_LDFLAGS = -Wl,--whole-archive,-lpdbg,--no-whole-archive -pdbg_CFLAGS = -I$(top_srcdir)/libpdbg -Wall -Werror -DGIT_SHA1=\"${GIT_SHA1}\" \ - $(ARCH_FLAGS) lib_LTLIBRARIES = libpdbg.la libfdt.la diff --git a/configure.ac b/configure.ac index 7cfd2ea..24440ac 100644 --- a/configure.ac +++ b/configure.ac @@ -36,4 +36,10 @@ AC_SUBST([ARCH]) AM_CONDITIONAL([TARGET_ARM], [test x"$ARCH" = "xarm"]) AM_CONDITIONAL([TARGET_PPC], [test x"$ARCH" = "xppc"]) +AC_ARG_ENABLE(gdbserver, +AC_HELP_STRING([--disable-gdbserver], [disables building the gdbserver]), +want_gdbserver=false, +want_gdbserver=true) +AM_CONDITIONAL([GDBSERVER], [test x$want_gdbserver = xtrue]) + AC_OUTPUT diff --git a/src/pdbgproxy.c b/src/pdbgproxy.c index 6689e14..8e91770 100644 --- a/src/pdbgproxy.c +++ b/src/pdbgproxy.c @@ -36,6 +36,7 @@ #define TRAP "S05" #define ERROR(e) "E"STR(e) +#ifndef DISABLE_GDBSERVER static struct pdbg_target *thread_target = NULL; static struct timeval timeout; static int poll_interval = 100; @@ -514,7 +515,7 @@ int gdbserver_start(struct pdbg_target *target, uint16_t port) return 1; } - +#endif static int gdbserver(uint16_t port) {