From patchwork Thu Dec 13 12:29:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 153640 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp741616ljp; Thu, 13 Dec 2018 04:29:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/W5hcmfSExohPCRoYySGmoxLA+9oPehQIrY8Us6zKLTe2aG7yWnz76XkoriITK3DX//F9Aj X-Received: by 2002:a63:6bc1:: with SMTP id g184mr22180478pgc.25.1544704190835; Thu, 13 Dec 2018 04:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544704190; cv=none; d=google.com; s=arc-20160816; b=0bIzShZfKK/GqFfZ/8/oVIQy9TWdc6eD9Br2w4Zy8kKc/e4puJnCavhUL4XCFE/cGD 2zVI0LzwzHD4Iiqm+7r7hOItWe9r5Hqs6kQvbmaI7DP0TlqTiAHDHwLmgnXViHYQYxrY TFReND8oZbGyNKoQaJKgJUpL9y4VmAAYgdRAKlNCd06dBErZeXhn28xeGz3wzOLkwqlz 9w3gWyoosbrvsw3BIkC6OB/hU/lTXbzYw0MbFAsGaGbw2dXiT/VvUNlyySWhelHAji0y OCM8bAduaM5r5vTJKmthY5UGqMJXEPWCo72p8ugYQRFolqswsAGJK38xzNGx02NT/R48 KzZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ArxlYqjZXbaDBdScGzXO++eUTVCwBAIV+Cl7LJu9VDE=; b=W/R/hArde9Xkpc3PlEF8k5OCe4jAG/jIjDreUMULrJlZKXk6uI470xpg13ZE2GEF9Q fWFE1F2eyLM32Bu9KNIXoMJpgHT0cyUawttAxA2mh5xYySj2n8pAOQBNo8tYHIBcbLUE 94SDlxnN1mUXDZot3qB9kRfMb9DUXhGT4S+JbwYrbpGgEb/EQDceSZikJ9oQdUNifJZ7 7HtuSj3DWHoZPgKmf7Iz7l36ZZ46+WQ4YHNvkMCvPiIFLU20nqKkJzhOY9tNxWo7PO+P X9NDCqjB3CjP6Nin98pOTI5u9WJgUmVM0c4h/z7Mz/dwXTfOsN6V4dIyj9A1hE3RJ2VJ t03A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MKfot2pG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s123si1438107pgs.93.2018.12.13.04.29.50; Thu, 13 Dec 2018 04:29:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MKfot2pG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729003AbeLMM3s (ORCPT + 31 others); Thu, 13 Dec 2018 07:29:48 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:43492 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728517AbeLMM3q (ORCPT ); Thu, 13 Dec 2018 07:29:46 -0500 Received: by mail-lf1-f68.google.com with SMTP id u18so1403075lff.10 for ; Thu, 13 Dec 2018 04:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ArxlYqjZXbaDBdScGzXO++eUTVCwBAIV+Cl7LJu9VDE=; b=MKfot2pGlN410QrVXJpGEsr+x9HX6otGF9AtSbejCHDdfXbg/voDC5xROuIjoK12kY ZkseMUUyXN/4a3Mfql0lXn8Fi19URuzGS2VAM5CE5WuftFvmtwV5we5k2XFP3xQRO5OB EfoPRwjLW6PVTviNMC9JQAJ5U6W1rpMD7ztEw= 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:mime-version:content-transfer-encoding; bh=ArxlYqjZXbaDBdScGzXO++eUTVCwBAIV+Cl7LJu9VDE=; b=iNe2I+YWwjJ1aFFgxCeJHCwPxqYooHnr6kcQ1iMkwP8sHOSpsS2Ob5DKlBDShJJsz/ /MZjiRc6rwlEwg24tUOCUu+l5mL/30ZWr/frAJdQQvpcNnSIOcN9XWIxHkhBEO/X5lP+ xsX1WTZgjcf/RwzlRsk4KCe+7BJXuAll0NIdoKpvDFkGmE2+nlidoZHSKgjrSV8XOGvv XsSrhavjOaLlS0CSFmqnPhpg4znJ/PnZcE2G0gq2I9UcZiN9uY1x7WbSCwm1NKZmKGk6 Et1raeGMwcDWTZcysu3VUmmAQYlt4OBFWzMbpyp9FQuAT9Jh20RLgHnbHwIvps4G3UkS iFCg== X-Gm-Message-State: AA+aEWZNM0aUlteMauWl6pnCE+qn5Ld+Gw58Tqf55egrEGfYMDFC9HTn nehSu2PtwHvAqVSGCdopsRYXoBCl7CpBaA== X-Received: by 2002:a19:f204:: with SMTP id q4mr14990233lfh.133.1544704184327; Thu, 13 Dec 2018 04:29:44 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id q20sm325551lfj.20.2018.12.13.04.29.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 04:29:43 -0800 (PST) From: Anders Roxell To: linux-kernel@vger.kernel.org Cc: catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de, mingo@redhat.com, rostedt@goodmis.org, akpm@linux-foundation.org, broonie@kernel.org, Anders Roxell Subject: [RFC PATCH 1/3] config: provide a fragment to enable gdb for qemu Date: Thu, 13 Dec 2018 13:29:08 +0100 Message-Id: <20181213122910.24193-2-anders.roxell@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181213122910.24193-1-anders.roxell@linaro.org> References: <20181213122910.24193-1-anders.roxell@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding a fragment to make it easier to know what options is needed to build a kernel to get the that you can debug in qemu. First you need to start qemu with flags '-s -S' and then connect with gdb like below: $ gdb \ ./obj-dir/vmlinux -iex 'add-auto-load-safe-path \ ./obj-dir' -ex 'target remote localhost:1234' Signed-off-by: Anders Roxell --- kernel/configs/qemu-gdb.config | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 kernel/configs/qemu-gdb.config -- 2.19.2 diff --git a/kernel/configs/qemu-gdb.config b/kernel/configs/qemu-gdb.config new file mode 100644 index 000000000000..30465905ff93 --- /dev/null +++ b/kernel/configs/qemu-gdb.config @@ -0,0 +1,7 @@ +# Enable debug info for gdb +# CONFIG_COMPILE_TEST is not set +CONFIG_DEBUG_INFO=y +CONFIG_GDB_SCRIPTS=y + +# Easier to debug +# CONFIG_RANDOMIZE_BASE is not set