From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6474 invoked by alias); 12 Jun 2015 12:00:46 -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 6460 invoked by uid 89); 12 Jun 2015 12:00:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 12 Jun 2015 12:00:44 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 48F223173F0; Fri, 12 Jun 2015 12:00:43 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5CC0fs2009302; Fri, 12 Jun 2015 08:00:42 -0400 Message-ID: <557AC9E9.60600@redhat.com> Date: Fri, 12 Jun 2015 12:00:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH v2 0/7] Support reading/writing memory on architectures with non 8-bits addressable memory References: <1429127258-1033-1-git-send-email-simon.marchi@ericsson.com> <555E1989.7010407@redhat.com> <5579F856.9030202@ericsson.com> In-Reply-To: <5579F856.9030202@ericsson.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00249.txt.bz2 On 06/11/2015 10:06 PM, Simon Marchi wrote: > Here is a draft of how the changes would look like in gdbserver when using addressable > memory units. It's really not that bad I think. > > https://github.com/simark/binutils-gdb/commit/2ecb2f054a288053e3726e92fb6126dd4c782a15 > > So in the end, it might be more consistent to use addressable memory units everywhere > in the RSP, and not more complicated to implement. Of course, that's only for things > related to the target memory, things that fetch an XML file would still be in bytes. > > What is your opinion on this? > I agree. >>> >>> -> $m1000,8#?? >>> <- aaaabbbbccccdddd >>> >>> -> $M1000,6:eeeeffffeeee#?? >>> <- OK >>> >>> -> $m1000,8#?? >>> <- eeeeffffeeeedddd >>> >>> If there are any other RSP packets or MI commands that need such >>> clarification, it will be on a case-by-case basis, whatever makes more >>> sense for each particular one. >> >> Off hand, I thought of qCRC and qSearch:memory. The latter is >> more interesting: >> >> - Would you allow searching for an 1 8-bit byte pattern? > > Hmm I don't know. To be safe I'd say no. If we do, it means we need to > search with a granularity of a byte. What if you search for the pattern > 0x2345 in this memory: > > 0x100 0123 > 0x101 4567 > 0x102 89ab > 0x103 cdef > > Should there be a match that spans halves of two addresses? Unless we only > search with a byte granularity in the special case where the pattern is > one byte long? But then what about 3-bytes patterns? > > I think it's a lot of corner cases for not much value. I think it could be > enhanced later to support it if somebody needs it. I agree. (it seems good/desirable to me to have all memory-related packets likewise treat memory range lengths the same) > >> - So what length would you use for that one? Host byte >> or addressable units? > > Length here would be in addressable units. > Agreed. Thanks, Pedro Alves