From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26410 invoked by alias); 14 May 2010 19:54:52 -0000 Received: (qmail 26402 invoked by uid 22791); 14 May 2010 19:54:51 -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, 14 May 2010 19:54:46 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4EJsjjv026376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 May 2010 15:54:45 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4EJsi95023885; Fri, 14 May 2010 15:54:44 -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 o4EJsh6Z026278; Fri, 14 May 2010 15:54:44 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 5E9F0378850; Fri, 14 May 2010 13:54:43 -0600 (MDT) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: RFC: fix bug in pieced value with offset References: <20100514110537.GA25586@host0.dyn.jankratochvil.net> <20100514192324.GA25176@host0.dyn.jankratochvil.net> Reply-To: Tom Tromey Date: Fri, 14 May 2010 20:02:00 -0000 In-Reply-To: <20100514192324.GA25176@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Fri, 14 May 2010 21:23:24 +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/msg00309.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> On Fri, 14 May 2010 19:29:33 +0200, Tom Tromey wrote: >> >>>>> "Jan" == Jan Kratochvil writes: >> Jan> Thinking now if the BFD_ENDIAN_BIG patch by Ulrich Weigand Jan> [rfc] Handle DWARF-2 value pieces residing in *parts* of a register Jan> http://sourceware.org/ml/gdb-patches/2009-12/msg00305.html Jan> should not have been applied also for DWARF_VALUE_STACK; but this Jan> is outside of the scope of this patch. [...] Jan> I am sorry, s/should not have/should have/. Does it make sense now? Yeah. However I think this is adequately handled by store_unsigned_integer. Is it not? Jan> I believe it should be instead: Jan> # + reg_offset = (register_size (arch, gdb_regnum) Jan> # + - this_size); Jan> Therefore I believe we should read in 0xad, 0xbe, 0xef. Jan> Your patch reads in 0xba, 0xad, 0xbe. Thanks for walking me through it. Jan> I agree with your sentence. I do not agree your sentence describes Jan> your code. The comparison present in code is exactly the opposite Jan> one. Your sentence describes "n < c->addr_size". Hah, true. I thought for sure I asked about this on the DWARF list, but I can't find the discussion. Issuing a complaint in this code is somewhat strange. We don't have information about where the piece originated. I think it would be better to issue complaints in execute_stack_op... though even that is not super, because they will be issued over and over again. Tom