From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19665 invoked by alias); 10 Nov 2014 12:58:51 -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 19656 invoked by uid 89); 10 Nov 2014 12:58:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: e33.co.us.ibm.com Received: from e33.co.us.ibm.com (HELO e33.co.us.ibm.com) (32.97.110.151) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 10 Nov 2014 12:58:49 +0000 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 10 Nov 2014 05:58:47 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 10 Nov 2014 05:58:46 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 77A0C3E4003B for ; Mon, 10 Nov 2014 05:57:57 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAACwjGP54067290 for ; Mon, 10 Nov 2014 13:58:45 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAACwigD008580 for ; Mon, 10 Nov 2014 05:58:45 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id sAACwh1O008384; Mon, 10 Nov 2014 05:58:43 -0700 Message-Id: <201411101258.sAACwh1O008384@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 10 Nov 2014 13:58:42 +0100 Subject: Re: [PATCH] create_internal_breakpoint: Apply gdbarch_skip_entrypoint. To: dje@google.com (Doug Evans) Date: Mon, 10 Nov 2014 12:58:00 -0000 From: "Ulrich Weigand" Cc: palves@redhat.com, gdb-patches@sourceware.org In-Reply-To: from "Doug Evans" at Nov 07, 2014 05:49:30 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14111012-0009-0000-0000-000006365526 X-SW-Source: 2014-11/txt/msg00166.txt.bz2 Doug Evans worte: > This is important because the toolchain will optimize intra-module calls > to skip the first two instructions that set up the TOC register. > And since gdb currently doesn't to "entry point skipping" for internal > breakpoints things work (in particular shlib event breakpoints). Huh. Yes, that's clearly a bug. > This patch fixes things by applying entry point skipping to > internal breakpoints. Is this the best place to apply entry point > skipping for internal breakpoints? I think this is fine. (The alternative would be push it up into the callers, which would have the advantage that you could do it only for those callers that get the address from a symbol, and not those that e.g. get it from a probe. However, since gdbarch_skip_entrypoint is safe even if the address is not equal to a symbol address, it's probably preferable to just do the skipping in one place.) Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com