Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1msSBC-0007nk-AN for mharc-grub-devel@gnu.org; Wed, 01 Dec 2021 11:09:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msSBA-0007iU-EG for grub-devel@gnu.org; Wed, 01 Dec 2021 11:09:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:50460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msSB7-00010Z-SQ for grub-devel@gnu.org; Wed, 01 Dec 2021 11:09:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638374992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CPlHEdFn7NYPTeaX/ADXAinD0c6JuX3J4hibi6DV9AA=; b=Ey8V8E9aCJvSMORatXzPUUApFVSZtq8Ivs8R9OCSEDomJ3p4luxpQQ/fB/oLRppH/Yrfe8 K6fam9XSZFxudAcAL8f8lFMff0UFAW8YBhStGG2P08ENxoPfpAwUMOCnk5OcJQ37+E3Slh xtGijDV5tShrhPQfbBT7oJ1F51NQrq4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-132-p5MbMQbKPxWHuuvzAWkhsQ-1; Wed, 01 Dec 2021 11:08:43 -0500 X-MC-Unique: p5MbMQbKPxWHuuvzAWkhsQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85CA6190B2A1; Wed, 1 Dec 2021 16:08:42 +0000 (UTC) Received: from redhat.com (ovpn-112-44.phx2.redhat.com [10.3.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18B245D6BA; Wed, 1 Dec 2021 16:08:41 +0000 (UTC) Date: Wed, 1 Dec 2021 11:08:39 -0500 From: Peter Jones To: Daniel Kiper Cc: Robbie Harwood , grub-devel@gnu.org Subject: Re: [PATCH v2 2/2] Make a "gdb" dprintf that tells us load addresses Message-ID: <20211201160839.zbpx2yfijiy5snin@redhat.com> References: <20211103182207.118313-1-rharwood@redhat.com> <20211103182207.118313-3-rharwood@redhat.com> <20211125171902.r7ihwloarofnw2yz@tomti.i.net-space.pl> <20211130160820.zlzcqwhkpbpnvabj@tomti.i.net-space.pl> MIME-Version: 1.0 In-Reply-To: <20211130160820.zlzcqwhkpbpnvabj@tomti.i.net-space.pl> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=170.10.129.124; envelope-from=pjones@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.716, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 16:09:56 -0000 On Tue, Nov 30, 2021 at 05:08:20PM +0100, Daniel Kiper wrote: > On Mon, Nov 29, 2021 at 06:11:36PM -0500, Robbie Harwood wrote: > > Daniel Kiper writes: > > > > > On Wed, Nov 03, 2021 at 02:22:07PM -0400, Robbie Harwood wrote: > > >> From: Peter Jones > > >> > > >> Add a grub_dprintf() call during platform init and during module loading > > >> that tells us the virtual addresses of the .text and .data sections of > > >> grub-core/kernel.exec and any modules it loads. > > >> > > >> Specifically, it displays them in the gdb "add-symbol-file" syntax, with > > >> the presumption that there's a variable $grubdir that reflects the path > > >> to any such binaries. > > > > > > Could you tell us why this thing has to be displayed as a part of debug > > > messages? Could you create a separate command which would do the same? > > > > I don't follow what you're suggesting. It's debug output and gdb is a > > debugger. What would you have it do instead? > > I cannot see any reason of displaying this kind of stuff as a part of > debug messages. I think we should have a separate command, e.g. > give_me_these_load_addresses ;-), in the GRUB which will produce list > of commands needed to be executed in the gdb. I'm not seeing how that will fulfill the goals. Typically when I need gdb in grub, it's well before /commands/ actually work at all. I definitely *do* see your point about silencing this when SB is enabled; that's useful feedback. -- Peter