Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3620028imu; Tue, 18 Dec 2018 01:09:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/XVv+z1l6x7Chah64jlKUFYPRNsQcmM2qZ+2pZv2h1VOF6FBHtuAJh6kA76hK1CDWtGY4kF X-Received: by 2002:a17:902:4324:: with SMTP id i33mr15310253pld.227.1545124142561; Tue, 18 Dec 2018 01:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545124142; cv=none; d=google.com; s=arc-20160816; b=SnlU7254Xr6Bejzn7glp9hjAsdIJOv/QtdWWlBIEEgnJLQeAycbDQ7dsamZaXafrzO gzMzjcqBNw+nNuy7hqFDLZAxs9RAkfCuFhJ19zykQ9ypYnFqmgvAk+gTb6YQMSb+SsqJ F9arNpMpf/Xp4WQx/io+9RqsYNpF4PYfibcOl6I1mWUdmUfUI6FwdW38Wr9O7LaPUX5e qGjV0IUR+RsKsDuvRTgDOieVXS/kM9TWnOlWfyZ4/23JxQl/QY/dR2BZeA9v3BwIOnKC pWoH3nZdrkKK/gSw0P8mYxU0dmDrmA83QrY1CqXHYORXpSrtp5eFgMZJ46cwwHvhRZJp IKEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=pJchzieKvEw2q1jiD8rRlxKTlS2uWfldtdARgrlnAhI=; b=ivGEYrGk3LAmDUwAw92wkLTvegVT8YlG8UZ32TVxWwLKJAF/jhio+PetXvGx0XAhc2 o5r3zfEF4oW+Og5vmN0MDpqH8ZwGNWYax5NdGADTc6eSiKIk39sjWqeRZq7i8eadWtzH 2Lh7UUwYtxXsODMl2BsEGnI/m9KLa4J+dGR3cP8+Di1+gHwqIY65pfG5fTQVrdqXzCU0 emLZIXyDG0NW2kNTQssYllVDZt5u940KdEA9xE1dND+tm0aObGMnFwYe1h9Z3YdwyTqP f9tF9UuXtbrhZnTRN4UvoS22RBsGPR5ENljjD7U8WsG6OCXPTV/xNXTiShmTZwzjqVBu ZPVQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14si12327287plq.145.2018.12.18.01.08.47; Tue, 18 Dec 2018 01:09:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbeLRJHk (ORCPT + 99 others); Tue, 18 Dec 2018 04:07:40 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:40216 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbeLRJHk (ORCPT ); Tue, 18 Dec 2018 04:07:40 -0500 Received: by mail-qt1-f196.google.com with SMTP id k12so17326178qtf.7 for ; Tue, 18 Dec 2018 01:07:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pJchzieKvEw2q1jiD8rRlxKTlS2uWfldtdARgrlnAhI=; b=Um6SR2Y3og2A9fBCtxXjjvai7NJo2oDk2q+P8FQ+eTGd+NJnz3OjhihwuTFTVyWdIU TIMl+k9pcniCvHBmA4n1bIDGnosRW4BDKnDqD6QBs3YuQrRI1b1q5t+SN+vGeyeKPN+z onh0hWkHcyqkNh6gIejI91DgwHBf+SMneHr+wb8SJIYSahq90iawCCoGxeM/Ws6gwDNC /rL7P0QDuQDrjfubwUvYBN1seIuR2huq0BXdVPmBiKnLMQ7nHcH7wL2RxBsxHovgsLAU Sz+pbO7mHmr8OWT6JSusrvLuFFbfcUiNIIcL9zG8uH6nwR4EMowLJbvgrr4dV30EdWhr l6Sg== X-Gm-Message-State: AA+aEWZPZQLNOFJD14LBi9UcY1ms6qMlaW2oiriMGuGF9djm9Y8TLLDq i4Qm5wePvujMMBFfYrYWYeIzUQ2/hTa1DnjW3xI= X-Received: by 2002:a05:6214:1087:: with SMTP id o7mr16475667qvr.115.1545124058264; Tue, 18 Dec 2018 01:07:38 -0800 (PST) MIME-Version: 1.0 References: <20181213122910.24193-1-anders.roxell@linaro.org> <20181213122910.24193-2-anders.roxell@linaro.org> <20181213124042.GG10669@sirena.org.uk> In-Reply-To: From: Arnd Bergmann Date: Tue, 18 Dec 2018 10:07:21 +0100 Message-ID: Subject: Re: [RFC PATCH 1/3] config: provide a fragment to enable gdb for qemu To: Anders Roxell Cc: Mark Brown , Linux Kernel Mailing List , Catalin Marinas , Will Deacon , Ingo Molnar , Steven Rostedt , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 9:45 AM Anders Roxell wrote: > > On Thu, 13 Dec 2018 at 13:40, Mark Brown wrote: > > > > On Thu, Dec 13, 2018 at 01:29:08PM +0100, Anders Roxell wrote: > > > 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. > > > > > @@ -0,0 +1,7 @@ > > > +# Enable debug info for gdb > > > +# CONFIG_COMPILE_TEST is not set > > > +CONFIG_DEBUG_INFO=y > > > +CONFIG_GDB_SCRIPTS=y > > > > Is this specifically for qemu or is this just good for debugging with > > GDB in general (eg, via JTAG)? > > I haven't tried, and I don't have a JTAG so I could test it =/ The DEBUG_INFO=y and (as a dependency for that) CONFIG_COMPILE_TEST are definitely needed for all GDB operation. I would assume that the scripts also work with any other gdb environment, but haven't tried either. For CONFIG_RANDOMIZE_BASE, I'm not actually sure if that helps or not. I think I originally suggested to Anders to turn that off when he was analyzing a bug, but I don't know if it helped or if it works just as well without that. Arnd