From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fh/9BhJzGmDARAAAWB0awg (envelope-from ) for ; Wed, 03 Feb 2021 04:55:30 -0500 Received: by simark.ca (Postfix, from userid 112) id 0F7D91EF80; Wed, 3 Feb 2021 04:55:30 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8F0931E945 for ; Wed, 3 Feb 2021 04:55:29 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EBF643894C30; Wed, 3 Feb 2021 09:55:28 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 8A2F4389247B for ; Wed, 3 Feb 2021 09:55:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A2F4389247B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A7F33ABD5; Wed, 3 Feb 2021 09:55:25 +0000 (UTC) Subject: Re: [PATCH][gdb] Fix internal-error in process_event_stop_test To: Hafiz Abid Qadeer , Tom Tromey References: <20210105132923.GA15843@delia> <87y2h4v77m.fsf@tromey.com> From: Tom de Vries Message-ID: Date: Wed, 3 Feb 2021 10:55:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2/2/21 7:25 PM, Hafiz Abid Qadeer wrote: > On 08/01/2021 05:23, Tom de Vries wrote: >> On 1/7/21 9:10 PM, Tom Tromey wrote: >>>>>>>> "Tom" == Tom de Vries writes: >>> Tom> Fix this by only trying to install the master exception breakpoint in >>> Tom> libgcc.debug using the _Unwind_DebugHook method, if the install using probes >>> Tom> in libgcc failed. >>> >>> This seems like a reasonable idea. >>> >>> Tom> Any comments? >>> >>> I suspect this would be a bit shorter if the loop only examined >>> "primary" objfiles (ones that don't have a backlink) and then delegated >>> to a helper function that did the search. What do you think? >> I've made the loop now over "primary" objfiles. Also, I've split up the >> helper function into one using probes, and the other using the hook, >> which hopefully helps to make the code a bit clearer. >> >> I'll put this through testing and commit, unless there are further comments. > > Hi Tom, > I observed that nextoverthrow.exp is now failing for many targets > including arm-none-eabi after this change. > >> + /* Iterate over separate debug objects and try an _Unwind_DebugHook >> + kind breakpoint. */ >> + for (objfile *sepdebug = obj->separate_debug_objfile; >> + sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile) >> + if (create_exception_master_breakpoint_hook (sepdebug)) >> + break; > > This bit seems to be problematic as it is stopping exception breakpoint > to be installed when separate_debug_objfile is null. Hi Abid, thanks for the report and the analysis. I've filed this here ( https://sourceware.org/bugzilla/show_bug.cgi?id=27330 ). I've posted (in the PR) a tentative patch, that causes no regression in my test setup. Can you verify that it fixes the problems you're seeing? Thanks, - Tom