From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2651 invoked by alias); 21 May 2010 17:44:57 -0000 Received: (qmail 2642 invoked by uid 22791); 21 May 2010 17:44:56 -0000 X-SWARE-Spam-Status: No, hits=-5.7 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; Fri, 21 May 2010 17:44:53 +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 o4LHipUo007646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 May 2010 13:44:51 -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 o4LHipJn031607; Fri, 21 May 2010 13:44:51 -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 o4LHiooq006561; Fri, 21 May 2010 13:44:50 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 2E04E37818E; Fri, 21 May 2010 11:44:50 -0600 (MDT) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: RFC: implement DW_OP_bit_piece References: <20100520210135.GA31238@host0.dyn.jankratochvil.net> Reply-To: tromey@redhat.com Date: Fri, 21 May 2010 17:57:00 -0000 In-Reply-To: <20100520210135.GA31238@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Thu, 20 May 2010 23:01:35 +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-05/txt/msg00504.txt.bz2 Tom> We do take care to optimize for the byte-aligned case. Jan> FYI I am strongly against this decision. This creates (a) more Jan> complicated code to maintain (b) less used and more dense to debug Jan> codepath (the bits one) and (c) I doubt current hardware and Jan> current `gcc -O2' code will ever notice a difference Ok. I will change this and make all the other changes you recommend. Jan> GDB has much more serious performance issues (symbols reading, Jan> lookup) than evaluation of any specific values. If you know of specific bad cases, I'm very interested in that. I think we understand the symbol reading problem pretty well now, but other stuff could at least use bug reports. Jan> And this function needs to distinguish both the bits endianity and Jan> the bytes endianity. Out of big-byte-endian machines there are Jan> both big-bits-endian and little-bits-endian ones: Jan> http://en.wikipedia.org/wiki/Bit_numbering#Usage Jan> OTOH there is currently no GDB target using set_gdbarch_bits_big_endian, Jan> therefore all the GDB targets are little-bits-endian. This seems Jan> to be wrong. As we discussed on irc, gdb is actually mostly ok here -- the default is set properly in gdbarch.c: gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG); There may be some architecture where this is wrong -- Jakub mentioned some ARM part? -- but naturally that is outside the scope of this patch. Tom