From patchwork Wed Jul 25 22:47:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 28617 Received: (qmail 934 invoked by alias); 25 Jul 2018 22:47:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 541 invoked by uid 89); 25 Jul 2018 22:47:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.2 spammy=@end X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jul 2018 22:47:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1532558845; h=From:Sender:Reply-To:Subject:Date:Message-Id:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3m24M5EBmU2Ee/aKM3/qF8mjDVZfPyFbohbejzSPkPk=; b=OmPl/y1+oPhtLsFeWRGgBLSLKFcEnVPm7IdmHo0bCtfKoH9yIBgM28TlAtlsRbzB 27wI5Jo1+5CZiFn1rDeH1nWBckKJeK5JTAW0gaJ/GU0gZ0Io/WmOMuOAgwA2wxi7 J0izO7qrvYxUER8+dY7hpzk47Q5IbuNxFwvCm3Slb+o=; Received: from ESESBMB503.ericsson.se (Unknown_Domain [153.88.183.116]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id DA.6A.27833.DFDF85B5; Thu, 26 Jul 2018 00:47:25 +0200 (CEST) Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 26 Jul 2018 00:47:24 +0200 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Thu, 26 Jul 2018 00:47:24 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GMZsKbPeHy8ns7ou77Rivjm23n7HwqV6TO7bnMSrDUA=; b=mDuf1Osxew0Ke3GnfPlasGDJvBAdGggMUQ61RSE0pFf2K1pc6B5spP5Bi8FPQnxqI8bdIGrxDYnkK5v3VE1dco8gPFBqVwrBD+aWvkhJxKtl7A4HIMFuKk4KtOdYNHkbNEb6Vch9g+FvC19Rt+8j3Q21QnwCNgRTgPmsqFcX/Ow= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxacz23q12.ericsson.se (129.192.64.65) by DM6PR15MB2396.namprd15.prod.outlook.com (2603:10b6:5:8d::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Wed, 25 Jul 2018 22:47:22 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH v2 4/4] Add doc and news for DWARF index cache Date: Wed, 25 Jul 2018 18:47:04 -0400 Message-Id: <1532558824-829-5-git-send-email-simon.marchi@ericsson.com> In-Reply-To: <1532558824-829-1-git-send-email-simon.marchi@ericsson.com> References: <1532558824-829-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes This patch adds doc and news for the feature introduced by the previous patch. gdb/ChangeLog: * NEWS: Mention the index cache. gdb/doc/ChangeLog: * gdb.texinfo (Index Files Speed Up GDB): Add section about symbol index cache. --- gdb/NEWS | 3 +++ gdb/doc/gdb.texinfo | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/gdb/NEWS b/gdb/NEWS index 76b963e..9c8c912 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -7,6 +7,9 @@ can be passed using the '[ADDRESS]:PORT' notation, or the regular 'ADDRESS:PORT' method. +* DWARF index cache: GDB can now automatically save indices DWARF symbols on + disk to speed up further loading of the same binaries. + * New commands frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index b36a39b..9533c72 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20095,6 +20095,42 @@ There are currently some limitation on indices. They only work when for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada. +@subsection Automatic symbol index cache + +It is possible for GDB to automatically save a copy of this index in a cache +on disk and retrieve it from there when loading the same binary in the future. +This feature can be turned on with @command{set index-cache on}. The following +commands can be used to tweak the behavior of the index cache. + +@table @code + +@item set index-cache on +@itemx set index-cache off + +Enable or disable the use of the symbol index cache. + +@item set index-cache directory @var{directory} +@itemx show index-cache directory +Set/show the directory where index files will be saved. By default, the value +@code{$XDG_CACHE_HOME/gdb} is used if the @code{XDG_CACHE_HOME} environment +variable is defined. The value @code{$HOME/.cache/gdb} is used otherwise. + +There is no limit on the disk space used by index cache. It is perfectly safe +to delete the content of that directory to free up disk space. + +@item set index-cache format @var{format} +@itemx show index-cache format +Set/show the format in which index files are saved. @var{format} can be either +@code{gdb} (the default) or @code{dwarf-5}. Note that @value{GDBN} is currently +only able to read back files in the @code{gdb} format from the cache, so +@code{dwarf-5} is not very useful. + +@item show index-cache stats +Print the number of cache hits and misses for the index cache since the launch +of @value{GDBN}. + +@end table + @node Symbol Errors @section Errors Reading Symbol Files