From patchwork Mon Jul 30 19:45:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 28688 Received: (qmail 99210 invoked by alias); 30 Jul 2018 19:45:59 -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 99194 invoked by uid 89); 30 Jul 2018 19:45:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=Speed, H*RU:Unknown_Domain, Hx-spam-relays-external:Unknown_Domain, tweak X-HELO: sessmg23.ericsson.net Received: from sessmg23.ericsson.net (HELO sessmg23.ericsson.net) (193.180.251.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Jul 2018 19:45:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1532979954; 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=h8qHVbcQhDqJVSeGIEKav8ELsR9yhTVqr7s8CJVmJMM=; b=Jivcrnrctv6C7cD47arsuRcfnq86lReojdXmoBd9sEdXRPDQdhN9GZXr4cJdGVr9 EAXR3iMR5e+DiX6hMQW+gLucmKPD6iWHgBLbcg9fTyYVaJbMEULlEnNO6BeFABAa oB6X1JytrE/J9bHkgazY0NNsb4Sns3oYVLIpr+/5tdY=; Received: from ESESSMB502.ericsson.se (Unknown_Domain [153.88.183.120]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id CC.BD.22015.2FA6F5B5; Mon, 30 Jul 2018 21:45:54 +0200 (CEST) Received: from ESESSMB501.ericsson.se (153.88.183.162) by ESESSMB502.ericsson.se (153.88.183.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 30 Jul 2018 21:45:53 +0200 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB501.ericsson.se (153.88.183.162) 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; Mon, 30 Jul 2018 21:45:53 +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=2xHvffdqryfOl+PxIsV9ezWryq5K2AVGfStoFMk29xo=; b=bmNGKfsne3SYEcbrmRtWqbelBbR3Fvu0Rv+sUPWfkB0GtS6rn43V66hlgCvBrKpI7FsP5QpXGMrcHn8zFwS+lYO2DCdhjxdMVrAMWDL5I0ohimaJ8mCQTk2QurObuN2H+W3zyFr/TkKlo6Jmo3ib1cNvk1s0hGPFrO64DpqjtOI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxacz23q12.ca.am.ericsson.se (192.75.88.130) by BN7PR15MB2385.namprd15.prod.outlook.com (2603:10b6:406:8c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Mon, 30 Jul 2018 19:45:51 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH v3 5/5] Add doc and news for DWARF index cache Date: Mon, 30 Jul 2018 15:45:34 -0400 Message-Id: <1532979934-25275-6-git-send-email-simon.marchi@ericsson.com> In-Reply-To: <1532979934-25275-1-git-send-email-simon.marchi@ericsson.com> References: <1532979934-25275-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 New in v3: - Address Eli's comments. 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 | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/gdb/NEWS b/gdb/NEWS index 669ed2d..7f94665 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 of 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 71aef22..b931834 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20095,6 +20095,34 @@ 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 @value{GDBN} 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 @kbd{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 index +is cached in the @file{gdb} subdirectory of the directory pointed to by the +@env{XDG_CACHE_HOME} environment variable, if it is defined, else in the +@file{.cache/gdb} subdirectory of your home directory. + +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 show index-cache stats +Print the number of cache hits and misses since the launch of @value{GDBN}. + +@end table + @node Symbol Errors @section Errors Reading Symbol Files