From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12572 invoked by alias); 11 May 2012 18:14:12 -0000 Received: (qmail 12550 invoked by uid 22791); 11 May 2012 18:14:11 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 May 2012 18:13:58 +0000 Received: by vbbey12 with SMTP id ey12so3826324vbb.0 for ; Fri, 11 May 2012 11:13:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=AKx4Q3cqZpE7ODwWXcwYkl+jzzfr9kdbiJ9BobhLboc=; b=eI0KVdaHhog3dz5pMnd/cpmzP4fdGo98EcCUoHn6YPWioD2E2XK4ToUFD3BQPQgW5C I81cnEZg6JJf6j7iOtL4NOOEgV8Gw+h/XG0qn9hBI1Bjo0qBPFUp5hmdJL1ZxvPY9wy7 ZZpIJAKsS1V9lNoM4uTcLWAJtvhj5W55y36kDLwHVdXu3sHpg+rr3Zh3QKLNa0Gbckvs jahDEF2KDSsnPeLRQcsJ/PPwoglJQC+OSCw06JcZ0Zet+TQcqhMgTCdc49548sQc0rB6 puZK9jvnYZPKOqQxcX2sjrlH7Nqq9PFo0vXx5Ima4Yo1I1IFcSWT3MRXqfCVl6rTbTmy UlCQ== Received: by 10.52.95.110 with SMTP id dj14mr4445386vdb.69.1336760038029; Fri, 11 May 2012 11:13:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.95.110 with SMTP id dj14mr4445376vdb.69.1336760037918; Fri, 11 May 2012 11:13:57 -0700 (PDT) Received: by 10.52.25.12 with HTTP; Fri, 11 May 2012 11:13:57 -0700 (PDT) In-Reply-To: References: <8362c73huz.fsf@gnu.org> Date: Fri, 11 May 2012 18:14:00 -0000 Message-ID: Subject: Re: [RFC] - Exposing find_pc_line through Python API From: Doug Evans To: Siva Chandra Cc: Eli Zaretskii , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQnw6KGDwQzGUpx9hPGyrIHbuDQ0JqXv09htkpJDW8V203p8bwEs34ec06uGJjc3y/qiDFuK6oQpnLyln+GEcmdbI/l99EisUmYb6Ep1X/3mzaR5hPVrdvHDpKC7qaLdT/VQuuqFMv+fBJeIPmTdpIeX4DyULQ== 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: 2012-05/txt/msg00422.txt.bz2 On Fri, May 11, 2012 at 9:34 AM, Siva Chandra wrot= e: > On Fri, May 11, 2012 at 2:45 AM, Doug Evans wrote: >> I think we need to specify what the result is if there is no sal for >> the specified pc. >> ... >> "actual" can be deleted now. > > I have addressed these two comments. =A0The patch is attached. > > 2012-05-11 =A0Siva Chandra Reddy =A0 > > =A0 =A0 =A0 =A0Add a new function gdb.find_pc_line to the Python API. > =A0 =A0 =A0 =A0* NEWS (Python Scripting): Add entry about the new functio= n. > =A0 =A0 =A0 =A0* python/python.c (gdbpy_find_pc_line): New function which > =A0 =A0 =A0 =A0implements gdb.find_pc_line. > =A0 =A0 =A0 =A0(GdbMethods): Add entry for the new function. > > =A0 =A0 =A0 =A0doc/ > =A0 =A0 =A0 =A0* gdb.texinfo (Basic Python): Add description about the fu= nction > =A0 =A0 =A0 =A0gdb.find_pc_line > > =A0 =A0 =A0 =A0testsuite/ > =A0 =A0 =A0 =A0* gdb.python/python.c: Add a new breakpoint comment. > =A0 =A0 =A0 =A0* gdb.python/python.exp: Add tests to test gdb.find_pc_lin= e. > > Thanks, > Siva Chandra Thanks. The patch is ok with me. A question occurred to me, and I'm not suggesting it has to be answered before the patch can go in. In vliw architectures one pc value can be associated with multiple lines (maybe even symtabs, depending on possible future symtab implementations). In this particular case I think we can wait until there's a pressing need to address it. I just wanted to throw this out there.