From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18260 invoked by alias); 31 Oct 2013 02:36:23 -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 18246 invoked by uid 89); 31 Oct 2013 02:36:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp05.br.ibm.com Received: from e24smtp05.br.ibm.com (HELO e24smtp05.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 31 Oct 2013 02:36:21 +0000 Received: from /spool/local by e24smtp05.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 31 Oct 2013 00:36:16 -0200 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp05.br.ibm.com (10.172.0.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 31 Oct 2013 00:36:15 -0200 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 074C13520054 for ; Wed, 30 Oct 2013 22:36:14 -0400 (EDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.8.31.93]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9V2aGcp1302564 for ; Thu, 31 Oct 2013 00:36:17 -0200 Received: from d24av02.br.ibm.com (localhost [127.0.0.1]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9V2aDBA018596 for ; Thu, 31 Oct 2013 00:36:13 -0200 Received: from [9.8.7.226] ([9.8.7.226]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r9V2aD3D018591 for ; Thu, 31 Oct 2013 00:36:13 -0200 Message-ID: <1383186973.5925.103.camel@localhost.localdomain> Subject: Get longjmp target check in breakpoint.c - is it necessary? From: Tiago =?ISO-8859-1?Q?St=FCrmer?= Daitx To: GDB Development Date: Thu, 31 Oct 2013 02:36:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13103102-2362-0000-0000-00000C368382 X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00191.txt.bz2 We have in gdb/breakpoint.c the following condition checking: 3222 if (!gdbarch_get_longjmp_target_p (gdbarch))¬ 3223 » continue;¬ 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). I would be glad to hear your thoughts on any possible side effects of removing that statement. $ diff -u gdb/testsuite/gdb.sum gdb/testsuite/gdb-no-get-longjmp-target-check.sum [snip] -FAIL: gdb.base/longjmp.exp: next over longjmp(1) +PASS: gdb.base/longjmp.exp: next over longjmp(1) +PASS: gdb.base/longjmp.exp: next into else block (1) +PASS: gdb.base/longjmp.exp: next into safety net (1) PASS: gdb.base/longjmp.exp: breakpoint at pattern 2 start PASS: gdb.base/longjmp.exp: continue to breakpoint at pattern 2 start PASS: gdb.base/longjmp.exp: breakpoint at miss_step_2 PASS: gdb.base/longjmp.exp: next over setjmp (2) -FAIL: gdb.base/longjmp.exp: next over call_longjmp (2) +PASS: gdb.base/longjmp.exp: next over call_longjmp (2) +PASS: gdb.base/longjmp.exp: next into else block (2) +PASS: gdb.base/longjmp.exp: next into safety net (2) [snip] -XFAIL: gdb.base/stale-infcall.exp: test system longjmp tracking support -UNTESTED: gdb.base/stale-infcall.exp: System lacks support for tracking longjmps +PASS: gdb.base/stale-infcall.exp: test system longjmp tracking support +PASS: gdb.base/stale-infcall.exp: delete $test_fail_bpnum +PASS: gdb.base/stale-infcall.exp: continue to breakpoint: break-run1 +PASS: gdb.base/stale-infcall.exp: print infcall () +PASS: gdb.base/stale-infcall.exp: stack corrupted +PASS: gdb.base/stale-infcall.exp: bt +PASS: gdb.base/stale-infcall.exp: maintenance print dummy-frames +PASS: gdb.base/stale-infcall.exp: maintenance info breakpoints Everything was tested on both PPC and PPC64. The glibc user probes have been implemented but are not yet upstream. Cheers! -tiago -- Tiago Stürmer Daitx tdaitx@linux.vnet.ibm.com IBM - Linux Technology Center