From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22066 invoked by alias); 11 Jul 2011 18:43:00 -0000 Received: (qmail 22058 invoked by uid 22791); 11 Jul 2011 18:43:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jul 2011 18:42:46 +0000 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p6BIgTDJ015360 for ; Mon, 11 Jul 2011 11:42:35 -0700 Received: from yih10 (yih10.prod.google.com [10.243.66.202]) by kpbe14.cbf.corp.google.com with ESMTP id p6BIfamY020471 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 11 Jul 2011 11:42:28 -0700 Received: by yih10 with SMTP id 10so3067328yih.1 for ; Mon, 11 Jul 2011 11:42:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.76.10 with SMTP id y10mr950854ana.24.1310409743184; Mon, 11 Jul 2011 11:42:23 -0700 (PDT) Received: by 10.101.1.6 with HTTP; Mon, 11 Jul 2011 11:42:23 -0700 (PDT) In-Reply-To: References: <20110612121158.GA10611@host1.jankratochvil.net> Date: Mon, 11 Jul 2011 18:53:00 -0000 Message-ID: Subject: Re: [PATCH] Make interrupting tab-completion safe. From: Sterling Augustine To: Jan Kratochvil Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true 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: 2011-07/txt/msg00279.txt.bz2 On Mon, Jun 13, 2011 at 10:44 AM, Sterling Augustine wrote: > On Sun, Jun 12, 2011 at 5:11 AM, Jan Kratochvil > wrote: > The race is between the conversion from psymtab to full symtab and you > hitting ctrl-c. Some of this time is also spent handling filename > completion, which doesn't have the problem. You need to be sure to > interrupt c_type_print_args, when called from dwarf2read.c:5049. > >> It would be good to have a testcase for regressions anyway. > > Is there an existing test-case I can model this one on? (One that > sends an asynchronous sigint to gdb is probably enough.) I can't seem > to find any, but my deja-gnu foo is weak. (Ping on this patch) Writing a generic reproducible test-case for this is pretty hard. Calling QUIT from dwarf2read.c:5049 is necessary, but not sufficient. Counting QUITs is not a good solution, because recompiling the target program can change the counts. If I modify the source such that dwarf2read.c:5049 is the only place that calls QUIT, reproducing it is easy, but that clearly isn't a good way of writing a test case. My understanding is that dwarf reading is not expected to be interruptable, so I would expect something like this to be acceptable without a new test. Is there some other approach--short of rewriting all the *type_print* stuff--that would be acceptable? I'd love to close out this problem. Sterling