From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16611 invoked by alias); 9 Jul 2002 03:49:10 -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 16582 invoked from network); 9 Jul 2002 03:49:07 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 9 Jul 2002 03:49:07 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A73313CC5; Mon, 8 Jul 2002 23:49:00 -0400 (EDT) Message-ID: <3D2A5D2C.5040506@ges.redhat.com> Date: Mon, 08 Jul 2002 21:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jimb@redhat.com Cc: Daniel Berlin , gdb-patches@sources.redhat.com Subject: Re: [RFA]: dwarf2expr.[ch] References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00137.txt.bz2 Jim, Is it possible to simplify some of this. For instance: > + void (*error) (const char *fmt, ...); In GDB, the function error() has well understood semantics - no return, long jump, fprintf parameter checking, ..... Why not use error() directly? Failing that, the function probably wants to be marked up with NORETURN and a printf attribute. > + > + /* If it has a location expression for fbreg, record it. > + Since not all symbols use location expressions exclusively yet, > + we still need to decode it above. */ > + if (attr) > + { > + baton = obstack_alloc (&objfile->symbol_obstack, sizeof (struct locexpr_baton)); > + baton->sym = new->name; > + baton->obj = objfile; > + memcpy (&baton->locexpr, DW_BLOCK (attr), sizeof (struct dwarf_block)); > + SYMBOL_LOCATION_FUNCS (new->name) = &locexpr_funcs; > + SYMBOL_LOCATION_BATON (new->name) = baton; > + } > + Is there also a way of implementing these objects such that they check, at compile time, a match between initialized members and those that require assignment? Perhaphs a memset(0) will be easiest. I suspect, for instance, you'll need to add a thread_local_storgage() method pretty soon :-) Andrew