Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp782764imu; Thu, 13 Dec 2018 04:30:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/VZkNxPz/MQwoN5X3a1QvxIDuz5A0QjKwsdEY623XcZhn07xrQM5pLo3suqbKYJwEDKADEI X-Received: by 2002:a63:2a4a:: with SMTP id q71mr21578533pgq.374.1544704255339; Thu, 13 Dec 2018 04:30:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544704255; cv=none; d=google.com; s=arc-20160816; b=HUmL4qZlxKYe5QA6U5LCqhqcn8SDWBdyfzZ93VGuci03/UdrSiYdQRGhFQoCymKtiy WRU5YcoEIQU0q0gWlcADBagKcaL1MuiwnMStjzfX56wyXtqNczj+Mcx/t0nwz1pp8tSs m+WbDQvSe/yfxQDC16jEUTh1SFnTgMU0J8lBPkXw0HPQcNUASD3kmhfrJZQOoHOxyejc wDSpe7QJENAS8poEA3QE9CfF3cnaXUixdruYQD4yYfZ1J1+O4uz7+cygRydUwIpf5W7H nuAFlrqC/Rua2GLCv9k+3MhsCgZZ5CnSuH2kN28Nt6taDkT/I9LnIk7eXefLkBYkpctt cMhw== 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 i9si1480215plb.35.2018.12.13.04.30.40; Thu, 13 Dec 2018 04:30:55 -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 S1728992AbeLMM3s (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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 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 -- 2.19.2