From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32269 invoked by alias); 30 May 2017 19:59:08 -0000 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 Received: (qmail 32223 invoked by uid 89); 30 May 2017 19:59:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 May 2017 19:59:05 +0000 Received: by simark.ca (Postfix, from userid 33) id 4D12F1E4B1; Tue, 30 May 2017 15:59:07 -0400 (EDT) To: Andreas Arnez Subject: Re: [PATCH v2 17/19] Fix bit-/byte-offset mismatch in parameter to read_value_memory X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 30 May 2017 19:59:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <1494352015-10465-18-git-send-email-arnez@linux.vnet.ibm.com> References: <1494352015-10465-1-git-send-email-arnez@linux.vnet.ibm.com> <1494352015-10465-18-git-send-email-arnez@linux.vnet.ibm.com> Message-ID: <3d3d77f7b369db28f50d388e54857a94@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00626.txt.bz2 On 2017-05-09 19:46, Andreas Arnez wrote: > @@ -984,8 +984,9 @@ read_value_memory (struct value *val, LONGEST > embedded_offset, > if (status == TARGET_XFER_OK) > /* nothing */; > else if (status == TARGET_XFER_UNAVAILABLE) > - mark_value_bytes_unavailable (val, embedded_offset + xfered_total, > - xfered_partial); > + mark_value_bits_unavailable (val, (xfered_total * HOST_CHAR_BIT > + + bit_offset), > + xfered_partial * HOST_CHAR_BIT); Since it's readily available, please use the unit_size variable here instead of HOST_CHAR_BIT. LGTM with that change.