From patchwork Tue Jun 5 15:46:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 27632 Received: (qmail 58565 invoked by alias); 5 Jun 2018 15:46:19 -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 57837 invoked by uid 89); 5 Jun 2018 15:46:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=XML, libthread_db, sk:libthre X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 15:46:16 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93BD168819; Tue, 5 Jun 2018 15:46:14 +0000 (UTC) Received: from blade.nx (unknown [10.36.118.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E9F250334; Tue, 5 Jun 2018 15:46:14 +0000 (UTC) Received: by blade.nx (Postfix, from userid 1000) id B7351816CD7C; Tue, 5 Jun 2018 16:46:13 +0100 (BST) Date: Tue, 5 Jun 2018 16:46:13 +0100 From: Gary Benson To: Eli Zaretskii Cc: gdb-patches@sourceware.org, simon.marchi@ericsson.com, palves@redhat.com Subject: Re: [PATCH v2] linux: Add maintenance commands to test libthread_db Message-ID: <20180605154612.GA30767@blade.nx> References: <1511361761-1333-1-git-send-email-gbenson@redhat.com> <1527096776-29187-1-git-send-email-gbenson@redhat.com> <837enuclmj.fsf@gnu.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <837enuclmj.fsf@gnu.org> X-IsSubscribed: yes Eli Zaretskii wrote: > > From: Gary Benson > > > > The test itself is a basic integrity check exercising all libthread_db > > functions used by GDB on GNU/Linux systems. By extension this also > > exercises the proc_service functions provided by GDB that libthread_db > > uses. This is useful for NPTL developers and libthread_db developers. > > It could also prove useful investigating bugs reported against GDB > > where the thread debugging library or GDB's proc_service layer is > > suspect. > > I think some of this text should be in the manual, otherwise the > description of the command is not very useful. How about this, as the full diff of the manual? I added the text to the first section, and updated the second to point at the first and also to document what happens when automated tests fail. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 28f083f..faca132 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -35533,6 +35533,14 @@ modify XML target descriptions. Check that the target descriptions dynamically created by @value{GDBN} equal the descriptions created from XML files found in @var{dir}. +@kindex maint check libthread-db +@item maint check libthread-db +Run integrity checks on the current inferior's thread debugging +library. This exercises all libthread_db functionality used by GDB on +GNU/Linux systems, and by extension also exercises the proc_service +functions provided by GDB that libthread_db uses. Note that parts of +the test may be skipped on some platforms when debugging core files. + @kindex maint print dummy-frames @item maint print dummy-frames Prints the contents of @value{GDBN}'s internal dummy-frame stack. @@ -35840,6 +35848,17 @@ number of blocks in the blockvector @end enumerate @end table +@kindex maint set check-libthread-db +@kindex maint show check-libthread-db +@item maint set check-libthread-db [on|off] +@itemx maint show check-libthread-db +Control whether @value{GDBN} should run integrity checks on inferior +specific thread debugging libraries as they are loaded. The default +is not to perform such checks. If any check fails @value{GDBN} will +unload the library and continue searching for a suitable candidate as +described in @ref{set libthread-db-search-path}. For more information +about the tests, see @ref{maint check libthread-db}. + @kindex maint space @cindex memory used by commands @item maint space @var{value}