From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30213 invoked by alias); 17 Jul 2012 21:24:31 -0000 Received: (qmail 30203 invoked by uid 22791); 17 Jul 2012 21:24:30 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BJ,TW_JC,TW_YM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qa0-f73.google.com (HELO mail-qa0-f73.google.com) (209.85.216.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Jul 2012 21:23:53 +0000 Received: by qafk22 with SMTP id k22so98020qaf.0 for ; Tue, 17 Jul 2012 14:23:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:message-id:to:subject:from:x-gm-message-state; bh=oMR6pG94affGMP8X/oR5/bSwHdjBhsXI+i1mZiIpH5o=; b=fUG9DgSJnRwxZe4Ii5hvBR/C8IGmu18IWQWjldIcpe6cXtxUPfOpt65SeJi2q1uGVc 5HLmRxC6Q/vRoFHniwmu/2dRVeLw2yufjKuCt0UctYCRSdRGpqt/X93SdMZG+ywP/9bu dGmOnIoU93/txJ5NOdOxkwEsVpuU6qVJ25rLGPZPiVnREZsr2i7wRA/2A3LOffjOz6pY XXL471brABLanSL9et5WI06ALliggxVzaYodRmKLhgoFMT8+ikj6BP9syOwzDNRQJLZl V/t7/L27hTbwHagi1bfTJw+g2NO/8OTX3ZJw0eb6/pH/WkzZmMZRUZ2AxTks6BsCL+Y9 qKLg== Received: by 10.236.115.130 with SMTP id e2mr95888yhh.25.1342560232971; Tue, 17 Jul 2012 14:23:52 -0700 (PDT) Received: by 10.236.115.130 with SMTP id e2mr95883yhh.25.1342560232922; Tue, 17 Jul 2012 14:23:52 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id q2si5918yhi.5.2012.07.17.14.23.52 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 17 Jul 2012 14:23:52 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.18.110.129]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 8CC0E1E0043 for ; Tue, 17 Jul 2012 14:23:52 -0700 (PDT) Date: Tue, 17 Jul 2012 21:24:00 -0000 Message-Id: To: gdb-patches@sourceware.org Subject: [RFA, doc RFA] New option set use-deprecated-index-sections From: dje@google.com X-Gm-Message-State: ALoCoQnrAGo7hLTMLeRnxfjpnXwTEJiGr/JqCGqfF8Qlo3TH5CBIYGQiNtROU1StqfV3u4NmZ/HWEAWi4Dy6BSJ49oqdjvRM9GVcjT5o0X/ShWtCmpvq2IpD9/b9+xzkeLl3mPdcmBWPxodQbCUBRNcQPNPf5Ki24tD08tm9J1WkA2ppaci7bMn5hoI5hHYPixdmk0+sfKdNO2T5pfEQfnuinmD4+DN4vw== X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00241.txt.bz2 Hi. I have a need to be able to control the use of deprecated index sections with an option, instead of the command line. I was going to wait to apply this until after 7.5, but with the new "-iex" option I realize that the new "--use-deprecated-index-sections" option could be considered redundant. So I'm thinking about deleting that as well, in favor of having just this. What do y'all think? 2012-07-17 Doug Evans * NEWS: Document new options "set/show use-deprecated-index-sections". * dwarf2read.c (_initialize_dwarf2_read): New options "set/show use-deprecated-index-sections". doc/ * gdb.texinfo (Index Files): Document how to control the use of deprecated index sections. Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533 diff -u -p -r1.533 NEWS --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 +++ NEWS 17 Jul 2012 21:17:47 -0000 @@ -137,6 +137,10 @@ * New commands + ** "set use-deprecated-index-sections on|off" + "show use-deprecated-index-sections on|off" + Controls the use of deprecated .gdb_index sections. + ** "catch load" and "catch unload" can be used to stop when a shared library is loaded or unloaded, respectively. Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.687 diff -u -p -r1.687 dwarf2read.c --- dwarf2read.c 16 Jul 2012 03:22:40 -0000 1.687 +++ dwarf2read.c 17 Jul 2012 21:13:14 -0000 @@ -19387,6 +19387,17 @@ the demangler."), NULL, show_check_physname, &setdebuglist, &showdebuglist); + add_setshow_boolean_cmd ("use-deprecated-index-sections", + no_class, &use_deprecated_index_sections, _("\ +Set whether to use deprecated gdb_index sections."), _("\ +Show whether to use deprecated gdb_index sections."), _("\ +When enabled .gdb_index sections that have been deprecated are used anyway.\n\ +Normally they are ignored either because of a missing feature or\n\ +performance issue."), + NULL, + NULL, + &setlist, &showlist); + c = add_cmd ("gdb-index", class_files, save_gdb_index_command, _("\ Save a gdb-index file.\n\ Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.990 diff -u -p -r1.990 gdb.texinfo --- doc/gdb.texinfo 5 Jul 2012 01:08:24 -0000 1.990 +++ doc/gdb.texinfo 17 Jul 2012 21:13:15 -0000 @@ -16753,6 +16753,26 @@ $ objcopy --add-section .gdb_index=symfi --set-section-flags .gdb_index=readonly symfile symfile @end smallexample +@value{GDBN} will normally ignore older versions of @file{.gdb_index} +sections that have been deprecated. Usually they are deprecated because +they are missing a new feature or have performance issues. + +There are two ways to control the use deprecated index sections: + +@table @code + +@item -use-deprecated-index-sections +Pass this command line option when starting @value{GDBN}. + +@item set use-deprecated-index-sections +@kindex set use-deprecated-index-sections +Set this option to control the treatment of deprecated index sections. +When @code{on}, index sections are used even if they are deprecated. +When @code{off}, only current versions of index sections are used. +The default is @code{off}. + +@end table + 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.