From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19433 invoked by alias); 17 Nov 2003 18:28:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19425 invoked from network); 17 Nov 2003 18:28:57 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 17 Nov 2003 18:28:57 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 558242B8F for ; Mon, 17 Nov 2003 13:28:53 -0500 (EST) Message-ID: <3FB91365.8050809@redhat.com> Date: Mon, 17 Nov 2003 18:28:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [rfa:symtab] SYMBOL_LOCATION_FUNCS -> SYMBOL_OPS References: <3FAD53AD.4030003@gnu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00357.txt.bz2 > Hello, > > This patch generalizes the per-symbol location_funcs, replacing them with a symbol_ops vector (the contents are unchanged). The patch doesn't change the size of the symbol. > > As the comment hints: > > + /* NOTE: cagney/2003-11-02: The fields "aclass" and "ops" contain > + overlaping information. Since GDB has only a small finite number > + of symbol classes it should be possible to merge the two fields > + into a single ops-table "index". Each entry providing both the > + "ops" and the "aclass" values. Doing that would shave 32 bits > + off every symbol. */ > > The patch sets us up for a more significant change - merge "ops" and "aclass" - and hence eliminates 32 bits (or 20%) of each symbol. I should note that right now the details of the merge are "left as an exercise for the reader". > > ok? Ping? I revised the comment thus: /* NOTE: cagney/2003-11-02: The fields "aclass" and "ops" contain overlapping information. By creating a per-aclass ops vector, or using the aclass as an index into an ops table, the aclass and ops fields can be merged. The latter, for instance, would shave 32-bits from each symbol (relative to a symbol lookup, any table index overhead would be in the noise). */ Andrew 2003-11-08 Andrew Cagney * dwarf2loc.c (dwarf_expr_frame_base): Use SYMBOL_OPS instead of SYMBOL_LOCATION_FUNCS (dwarf2_loclist_funcs, dwarf2_locexpr_funcs): Change type to "struct symbol_ops". * dwarf2loc.h (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Change type to "struct symbol_ops". * dwarf2read.c (dwarf2_symbol_mark_computed): Set SYMBOL_OPS intead of SYMBOL_LOCATION_FUNCS. * ax-gdb.c (gen_var_ref): Ditto for "tracepoint_var_ref". * printcmd.c (address_info): Ditto for "describe_location". * findvar.c (symbol_read_needs_frame): Call "read_needs_frame" when available. Assert requirement when LOC_COMPUTED or LOC_COMPUTED_ARG. (read_var_value): Ditto for "read_variable". * symtab.h (struct symbol_ops): Rename "struct location_funcs". (struct symbol): Replace ".aux_value.loc.funcs" and ".aux_value.loc.baton" with ".ops" and ".aux_value.ptr". (SYMBOL_OBJFILE): Delete macro. (SYMBOL_LOCATION_FUNCS): Delete macro. (SYMBOL_LOCATION_BATON): Update.