From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13658 invoked by alias); 17 Nov 2014 01:47:28 -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 13642 invoked by uid 89); 17 Nov 2014 01:47:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Nov 2014 01:47:23 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1XqBPU-0000pN-36 from Yao_Qi@mentor.com ; Sun, 16 Nov 2014 17:47:20 -0800 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.181.6; Sun, 16 Nov 2014 17:47:19 -0800 From: Yao Qi To: Doug Evans CC: Subject: Re: [PATCH 4/5] struct symtab split part 1: buildsym api cleanup References: Date: Mon, 17 Nov 2014 01:47:00 -0000 In-Reply-To: (Doug Evans's message of "Tue, 11 Nov 2014 20:27:51 -0800") Message-ID: <87h9xyha3c.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00389.txt.bz2 Doug Evans writes: > I realize there are a lot of globals in buildsym.c, and I'm not trying > to get rid of them in this patch set, but if one thinks of > buildsym as an object and start_symtab as a constructor, > then there's no need to pass the compilation directory to > start_subfile, and there's no need to pass objfile to end_symtab*. > This patch applies these changes. Hi Doug, I am worried about adding new static variables in buildsym.c. Why do you have to the change like this? because part 2 needs such updated api? I can't estimate the date that buildsym is rewritten as an object in c++, so in foreseeable future, the structure of buildsym still remains nearly unchanged, I assume. Adding static variables runes in the opposite direction, IMO. Secondly, shouldn't be buildsym a stateless processor, which gets objfile as input and ouputs symbols? In this way, isn't it nicer to have argument objfile for the api? I don't know much on buildsym, so I may miss something. --=20 Yao (=E9=BD=90=E5=B0=A7)