From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21277 invoked by alias); 1 Jun 2010 17:34:55 -0000 Received: (qmail 21124 invoked by uid 22791); 1 Jun 2010 17:34:53 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Jun 2010 17:34:45 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o51HYgUK014261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 Jun 2010 13:34:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o51GfsBB030877; Tue, 1 Jun 2010 12:41:54 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o51Gfpqo001142; Tue, 1 Jun 2010 12:41:53 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A439F3782DC; Tue, 1 Jun 2010 10:41:51 -0600 (MDT) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: RFC: partially fix empty DW_OP_piece References: <20100514223521.GA3975@host0.dyn.jankratochvil.net> Reply-To: tromey@redhat.com Date: Tue, 01 Jun 2010 17:34:00 -0000 In-Reply-To: <20100514223521.GA3975@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Sat, 15 May 2010 00:35:21 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-06/txt/msg00007.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: We were talking on irc and Jan asked for more information about part of my plan... Tom> The other way is to simply remove val_print entirely and make all of Tom> printing work using values. I think this is the route I would prefer. Jan> That could hopefully solve the problem of missing type-associated object Jan> address for DW_OP_push_object_address for the VLA (variable length arrays) Jan> patch. I am curious to know what you need here. I started by looking briefly at replacing val_print. This looks pretty big, though. So I looked into other solutions. I wrote a big patch to pass lval_funcs through all the val_print code. However, it turns out that this is not sufficient: the code has to handle value_offset() as well, which means either adding another argument (the offset) or just passing the original value through. So, currently I am thinking I will go through my existing patch and have it pass a value instead of lval_funcs. Of course this means a lot of redundant info, which is ugly. There are barriers to removing val_print. I think the biggest one, conceptually, is that recursion in val_print means making new values, which means copying the value contents. This can be expensive. (Of course there are solutions to that, reference counting the value contents comes to mind.) Tom