From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13214 invoked by alias); 7 Nov 2014 17:27:33 -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 13201 invoked by uid 89); 7 Nov 2014 17:27:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: e34.co.us.ibm.com Received: from e34.co.us.ibm.com (HELO e34.co.us.ibm.com) (32.97.110.152) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 07 Nov 2014 17:27:32 +0000 Received: from /spool/local by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Nov 2014 10:27:30 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 7 Nov 2014 10:27:27 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id A368819D8040 for ; Fri, 7 Nov 2014 10:16:08 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sA7HRQRC6488412 for ; Fri, 7 Nov 2014 18:27:26 +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 sA7HRPe2008108 for ; Fri, 7 Nov 2014 10:27:26 -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 sA7HRNIQ007851; Fri, 7 Nov 2014 10:27:23 -0700 Message-Id: <201411071727.sA7HRNIQ007851@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 07 Nov 2014 18:27:22 +0100 Subject: Re: [PING][RFC][PATCH v2] Python API: add gdb.stack_may_be_invalid To: martin.galvan@tallertechnologies.com (Martin Galvan) Date: Fri, 07 Nov 2014 17:27:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, dje@google.com (Doug Evans), eliz@gnu.org (Eli Zaretskii), palves@redhat.com (Pedro Alves), daniel.gutson@tallertechnologies.com (Daniel Gutson) In-Reply-To: from "Martin Galvan" at Nov 07, 2014 10:32:15 AM 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: 14110717-0017-0000-0000-000006218E3B X-SW-Source: 2014-11/txt/msg00146.txt.bz2 Martin Galvan wrote: > +stack_is_destroyed (gdb_py_ulongest pc) > +{ > + return gdbarch_in_function_epilogue_p (python_gdbarch, pc); > +} Just one comment here: python_gdbarch isn't really correct here. If you have a platform that supports multiple architectures, then you really should use the appropriate gdbarch for PC. (python_gdbarch is unfortunately one of those hacks; it would be preferable if we didn't have it at all ...) Ideally, the Python interface should carry enough information to determine the appropriate gdbarch, e.g. by operating on a Frame instead of a plain PC value. If that isn't possible, one fall-back might be to look up the symbol table from the PC, and use the associated objfile arch. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com