From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28140 invoked by alias); 31 Oct 2013 14:46:27 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 28120 invoked by uid 89); 31 Oct 2013 14:46:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 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; Thu, 31 Oct 2013 14:46:24 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9VEkJHB027766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 31 Oct 2013 10:46:20 -0400 Received: from psique (ovpn-113-168.phx2.redhat.com [10.3.113.168]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9VEkD24009411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 31 Oct 2013 10:46:17 -0400 From: Sergio Durigan Junior To: Edjunior Barbosa Machado Cc: Tiago =?utf-8?Q?St=C3=BCrmer?= Daitx , GDB Development Subject: Re: Get longjmp target check in breakpoint.c - is it necessary? References: <1383186973.5925.103.camel@localhost.localdomain> <52725AB4.5080002@linux.vnet.ibm.com> X-URL: http://www.redhat.com Date: Thu, 31 Oct 2013 14:46:00 -0000 In-Reply-To: <52725AB4.5080002@linux.vnet.ibm.com> (Edjunior Barbosa Machado's message of "Thu, 31 Oct 2013 11:27:16 -0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00193.txt.bz2 On Thursday, October 31 2013, Edjunior Barbosa Machado wrote: > Hi Tiago, Hey :-) > On 10/31/2013 12:36 AM, Tiago St=C3=BCrmer Daitx wrote: >> We have in gdb/breakpoint.c the following condition checking: >>=20 >> 3222 if (!gdbarch_get_longjmp_target_p (gdbarch))=C2=AC >> 3223 =C2=BB continue;=C2=AC >>=20 >> Which is forcing me to implement an (unnecessary?) arch specific >> get_longjmp_target while having a longjmp user probe in glibc should be >> enough. Removing that if/continue statement showed no regressions - it >> actually fixed 3 longjmp failures (assuming proper support in glibc for >> a longjmp probe is in place).=20 > > If I understood correctly, there are different longjmps symbols search > strategies on this create_longjmp_master_breakpoint() function: the > recent libc probe search and the per-objfile cache lookup. > > It seems this 'if' works like an optimization to avoid searching for > symbols if the arch didn't provide support for get_longjmp_target(). > However, _get_longjmp_target() function became unnecessary in > targets that provide libc probe support, as you noticed with the > addition of probes on ppc64 glibc. > > What if you try to move this 'if' to a bit below in the function (right > before "for (i =3D 0; i < NUM_LONGJMP_NAMES; i++)" loop)? Edjunior is right, Tiago. This is a bug, actually. This check should be moved to the place Edjunior mentioned. Could you post a patch to fix that? Thanks a lot for looking into this :-). --=20 Sergio