From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25714 invoked by alias); 19 May 2008 17:20:26 -0000 Received: (qmail 25692 invoked by uid 22791); 19 May 2008 17:20:22 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.29.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 19 May 2008 17:20:01 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.8/8.13.8) with ESMTP id m4JHJwor175454 for ; Mon, 19 May 2008 17:19:58 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m4JHJwWJ3706968 for ; Mon, 19 May 2008 19:19:58 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m4JHJvWf006223 for ; Mon, 19 May 2008 19:19:57 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m4JHJvgw006220; Mon, 19 May 2008 19:19:57 +0200 Message-Id: <200805191719.m4JHJvgw006220@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 19 May 2008 19:19:57 +0200 Subject: Re: [rfc][3/3] Eliminate LOC_BASEREG and LOC_BASEREG_ARG To: drow@false.org (Daniel Jacobowitz) Date: Mon, 19 May 2008 21:20:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20080519165731.GC16848@caradoc.them.org> from "Daniel Jacobowitz" at May 19, 2008 12:57:31 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-05/txt/msg00572.txt.bz2 Daniel Jacobowitz wrote: > On Mon, May 19, 2008 at 06:53:28PM +0200, Ulrich Weigand wrote: > > Removing this also allows us to get rid of the basereg member of the > > aux_value union in struct symbol. (At which point there is only one > > member of the union remaining. Should we remove the union?) > > IMO, yes. The remaining union member is probably good for any new > types also. OK. When I commit the other patches, I'll add this one on top ... Bye, Ulrich ChangeLog: * symtab.h (struct symbol): Make "aux_value" member a void pointer instead of a union. (SYMBOL_LOCATION_BATON): Update. diff -urNp gdb-orig/gdb/symtab.h gdb-head/gdb/symtab.h --- gdb-orig/gdb/symtab.h 2008-05-19 19:14:12.966210396 +0200 +++ gdb-head/gdb/symtab.h 2008-05-19 19:13:40.332972514 +0200 @@ -587,25 +587,20 @@ struct symbol const struct symbol_ops *ops; - /* Some symbols require additional information to be recorded on a - per-symbol basis. Stash those values here. */ + /* An arbitrary data pointer, allowing symbol readers to record + additional information on a per-symbol basis. Note that this data + must be allocated using the same obstack as the symbol itself. */ + /* So far it is only used by LOC_COMPUTED and LOC_COMPUTED_ARG to + find the location information. For a LOC_BLOCK symbol + for a function in a compilation unit compiled with DWARF 2 + information, this is information used internally by the DWARF 2 + code --- specifically, the location expression for the frame + base for this function. */ + /* FIXME drow/2003-02-21: For the LOC_BLOCK case, it might be better + to add a magic symbol to the block containing this information, + or to have a generic debug info annotation slot for symbols. */ - union - { - /* An arbitrary data pointer. Note that this data must be - allocated using the same obstack as the symbol itself. */ - /* So far it is only used by LOC_COMPUTED and LOC_COMPUTED_ARG to - find the location information. For a LOC_BLOCK symbol - for a function in a compilation unit compiled with DWARF 2 - information, this is information used internally by the DWARF 2 - code --- specifically, the location expression for the frame - base for this function. */ - /* FIXME drow/2003-02-21: For the LOC_BLOCK case, it might be better - to add a magic symbol to the block containing this information, - or to have a generic debug info annotation slot for symbols. */ - void *ptr; - } - aux_value; + void *aux_value; struct symbol *hash_next; }; @@ -617,7 +612,7 @@ struct symbol #define SYMBOL_LINE(symbol) (symbol)->line #define SYMBOL_SYMTAB(symbol) (symbol)->symtab #define SYMBOL_OPS(symbol) (symbol)->ops -#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value.ptr +#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value /* A partial_symbol records the name, domain, and address class of symbols whose types we have not parsed yet. For functions, it also -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com