From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24720 invoked by alias); 20 Apr 2012 19:53:49 -0000 Received: (qmail 24582 invoked by uid 22791); 20 Apr 2012 19:53:48 -0000 X-SWARE-Spam-Status: No, hits=-5.1 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-qa0-f48.google.com (HELO mail-qa0-f48.google.com) (209.85.216.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 19:53:34 +0000 Received: by qam2 with SMTP id 2so663216qam.0 for ; Fri, 20 Apr 2012 12:53:33 -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=LKWwLYuGGoNmmqctGzgEAMoB2ul4kQ68hxDiwcSeEXU=; b=Pbwj3PP8OlBDO7hYMVHRUfE3LaKH4bZqfJHiHzzEsbH/bNlUIIw9ulb4dVJQ7LiRGV 8iljKZNupTR1qNzrNfQTY5VxBsmJO4PWutrcUMW0HNnPQq9R2FUTBtx6qkbkKJRbzC4+ nyxXRBue989GjVzNnR3u97SuyhPJCrkKTm0L3pfZaWOF7CoHEvl8sIm3a3caMDquESp3 n7RV/wNUGB5mQeT9ntDuZNptqbPkbsH3tChvYyhXuXahk8io75ICgEArKQrEVhqPxvi9 wDXzKu21M1KVRnvFZ4eTypGTBMVm3lyi9I6Of7RSO4Vz7PwC2puBoED643WLz9xiKVkL A+KA== Received: by 10.224.215.7 with SMTP id hc7mr8320281qab.29.1334951613359; Fri, 20 Apr 2012 12:53:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.215.7 with SMTP id hc7mr8304218qab.29.1334951208344; Fri, 20 Apr 2012 12:46:48 -0700 (PDT) Received: by 10.224.35.2 with HTTP; Fri, 20 Apr 2012 12:46:48 -0700 (PDT) In-Reply-To: References: <831unms3jy.fsf@gnu.org> <4F8F187D.3050402@redhat.com> <878vhsojgd.fsf@fleche.redhat.com> <87sjfyi5rj.fsf@fleche.redhat.com> Date: Fri, 20 Apr 2012 19:57:00 -0000 Message-ID: Subject: Re: [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included) From: Siva Chandra To: Doug Evans Cc: Tom Tromey , Matt Rice , Phil Muldoon , 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: ALoCoQl/mg7iU8AhPUt0REaSr5MCioEV1wHR+HOV6n09Qb4T0M69YjDNQ4BH82aG7F8XL5eDIkYoxUdK58xo2PhWL9J5pv8pHPESmWPUeN3amdsN4nX5k254M18SUCm27ekfYnuMQR1sOtJ15Y06quzN7XfDqQypsA== 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-04/txt/msg00698.txt.bz2 Siva> Similarly, if my Siva> understanding is correct, static functions and static variables Siva> defined in a source file should always be present in a static block. Siva> Hence, we again document saying that the user rely only on this Siva> information being constant. Does this sound reasonable? Matt> the following from (possibly outdated) symtab.c stuff is what i did Matt> find, i believe there is other uncommented occurrences, anyhow given Matt> the fudge and lack of errors I wouldn't be suprised to weirdness here Matt> go unnoticed. Tom> I've always assumed these comments are just wrong. Tom> If this can really happen, then the bug should be fixed in the symbol Tom> readers, not hacked around elsewhere. =A0IMNSHO of course. Doug> Yep. Doug> Something I hope attention to the symbol handling will dig into. To be frank, I do not understand much of the code in dwarf2read.c yet. However, I focused on functions and variables in my comment because LOCAL and GLOBAL bindings in a file are present right in the ELF .symtab section. If at all something is not being classified correctly in GDB, then it should be a bug (not necessarily in GDB?). I did not talk about types because they are treated as static when compiled as a C program, and as global when compiled as a C++ program (in fact, I thought this was Doug's concern to begin with!). Overall, wrt this patch, what should we conclude? Thanks, Siva Chandra