From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26517 invoked by alias); 12 Feb 2014 11:55:55 -0000 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 Received: (qmail 26498 invoked by uid 89); 12 Feb 2014 11:55:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Feb 2014 11:55:53 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1CBtqm6014848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Feb 2014 06:55:52 -0500 Received: from blade.nx (ovpn-116-103.ams2.redhat.com [10.36.116.103]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s1CBtosp013290 for ; Wed, 12 Feb 2014 06:55:51 -0500 Received: by blade.nx (Postfix, from userid 1000) id BF3B12643A1; Wed, 12 Feb 2014 11:55:48 +0000 (GMT) Date: Wed, 12 Feb 2014 11:55:00 -0000 From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH 0/2] Limit tab-completion result when list is large Message-ID: <20140212115548.GA2866@blade.nx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00398.txt.bz2 Hi all, When debugging large programs, pressing the Tab key at the wrong time causes GDB to lock up while it builds a completion list. As an example, with LibreOffice: $ gdb /usr/lib64/libreoffice/program/soffice.bin (gdb) start (gdb) p On my (pretty fast!) machine the user is left hanging for over a minute while GDB builds a list of the 217667 things the user could print. This is PR cli/11920. PR cli/15548 proposes to abort building the completion list if it grows too large, the theory being that nobody is going to scroll through thousands of screens of completions to find the one they want. These two patches implement this. The default limit is 1000 completions, which the user can override with a new set/show var. Tested on RHEL6.5 x86_64, no regressions. Thanks, Gary -- http://gbenson.net/