From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15690 invoked by alias); 24 Jul 2011 18:10:41 -0000 Received: (qmail 15554 invoked by uid 22791); 24 Jul 2011 18:10:40 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Jul 2011 18:10:12 +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 p6OIABAn032230 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 24 Jul 2011 14:10:11 -0400 Received: from host1.jankratochvil.net (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6OIA9Q9027072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 24 Jul 2011 14:10:11 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p6OIA9Rt008786; Sun, 24 Jul 2011 20:10:09 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p6OIA8FD008785; Sun, 24 Jul 2011 20:10:08 +0200 Date: Sun, 24 Jul 2011 20:00:00 -0000 From: Jan Kratochvil To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [patch] workaround gcc46: prologue skip skips too far (PR 12435) #2 Message-ID: <20110724181008.GA8727@host1.jankratochvil.net> References: <20110722215821.GA3433@host1.jankratochvil.net> <201107241803.p6OI3rMR008990@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107241803.p6OI3rMR008990@glazunov.sibelius.xs4all.nl> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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/msg00675.txt.bz2 On Sun, 24 Jul 2011 20:03:53 +0200, Mark Kettenis wrote: > > It does not solve overlays well, but the code just does not work for > > overlays, it has no other negative effect. > > Sorry, but what do you mean with "overlays" here? See skip_prologue_sal: /* If the function is in an unmapped overlay, use its unmapped LMA address, so that gdbarch_skip_prologue has something unique to work on. */ if (section_is_overlay (section) && !section_is_mapped (section)) pc = overlay_unmapped_address (pc, section); /* Skip "first line" of function (which is actually its prologue). */ pc += gdbarch_deprecated_function_start_offset (gdbarch); if (skip) pc = gdbarch_skip_prologue (gdbarch, pc); /* For overlays, map pc back into its mapped VMA range. */ pc = overlay_mapped_address (pc, section); So in gdbarch_skip_prologue the PC is LMA, I do not know how gdbarch_skip_prologue could read the bytes at PC (without introducing new parameter(s) to gdbarch_skip_prologue). Thanks, Jan