From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22075 invoked by alias); 23 Oct 2014 18:09:10 -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 22064 invoked by uid 89); 23 Oct 2014 18:09:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mail-lb0-f181.google.com Received: from mail-lb0-f181.google.com (HELO mail-lb0-f181.google.com) (209.85.217.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 23 Oct 2014 18:09:08 +0000 Received: by mail-lb0-f181.google.com with SMTP id l4so1320091lbv.12 for ; Thu, 23 Oct 2014 11:09:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Oxksy0BjkhHalQ+nIX5evsi7Aemy36oOSKLqpm+hsLs=; b=I9NXAbU+qcILTeX1/mZQIj5w9OO2BVc2Y1B1R49n8o1lit9jbvQNsGG4PnWBXOmDtu D7SIAii9JU82TOANrFeeBPsQ0cNuFxrhIxMH4lUNV0I4RXnWJf5Q5ry26pNmOLcamnTb tECTDUh4cR29uxUKcYtkZhz5yhVmSym1j3JyBLyaEODDsYfuBLBL7UrfAPl/HuLz58Dp a11A35iObIeLB+LBv1bl2NLRCb0AFl3PAgCIwN+/71MIbCfrJuFh6uF2YERvdBypA1T9 wykXy0SwKR6Z7QfAj3smqB3798n12s/yKvdK6ORoGnu4gE1IlQ4C7TEfyMmyhqTE4mzo 32DA== X-Gm-Message-State: ALoCoQkZKsq5H6G90MP9VMyH4z7wSmguba8RfeacWMwE+O62iPUDcp+Ia5UqIFEgUmfr2UFFQZl4 MIME-Version: 1.0 X-Received: by 10.112.85.106 with SMTP id g10mr6888298lbz.38.1414087744822; Thu, 23 Oct 2014 11:09:04 -0700 (PDT) Received: by 10.112.59.129 with HTTP; Thu, 23 Oct 2014 11:09:04 -0700 (PDT) In-Reply-To: <201410231757.s9NHvX3r026780@d06av02.portsmouth.uk.ibm.com> References: <201410231757.s9NHvX3r026780@d06av02.portsmouth.uk.ibm.com> Date: Thu, 23 Oct 2014 18:09:00 -0000 Message-ID: Subject: Re: [PATCH] Python API: Add gdb.is_in_prologue and gdb.is_in_epilogue. From: Martin Galvan To: Ulrich Weigand Cc: Pedro Alves , gdb-patches@sourceware.org, dje@google.com, Eli Zaretskii , Daniel Gutson Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-10/txt/msg00610.txt.bz2 On Thu, Oct 23, 2014 at 2:57 PM, Ulrich Weigand wrote: > The fundamental problem is that the notion of "prologue" and "epilogue" > simply no longer exists in optimized code generated by modern compilers; > and even more compiler features get implemented that make those notions > even less useful (e.g. shrink-wrapping). > > As a result, we have been trying to the rid of using those notions as > much as possible; for example, when debugging optimized code with modern > DWARF information present, GDB will today no longer even use prologue > skipping at all. Instead, the debug information is good enough that > the correct location of local variables can be recovered at every > instruction in the function, making the distinction no longer needed. > > The in_prologue routine is likewise only still uses under certain rather > rare circumstances; in fact it might even today be possible to simply > remove it. Once more platforms provide correct DWARF covering epilogues > as well, the gdbarch_in_function_epilogue_p calls in breakpoint.c may > likewise become unnecessary. > > So if we hope at some point to get rid of those routines, then it seems > counterproductive to now export them as part of a fixed external API ... While that may be true, it's also true that at some points we still see the local variables having wrong values when stepping through machine code. The aim of this patch is to expose a way of detecting such situations for scripts that may need it. Until we have a safer way to do it I think this should be integrated to the code base. --=20 Mart=C3=ADn Galv=C3=A1n Software Engineer Taller Technologies Argentina San Lorenzo 47, 3rd Floor, Office 5 C=C3=B3rdoba, Argentina Phone: 54 351 4217888 / +54 351 4218211