From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51103 invoked by alias); 11 Aug 2016 14:08:44 -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 51088 invoked by uid 89); 11 Aug 2016 14:08:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=HX-Envelope-From:sk:thomas. X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Aug 2016 14:08:42 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2B61C2F; Thu, 11 Aug 2016 07:10:10 -0700 (PDT) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A94DE3F21A; Thu, 11 Aug 2016 07:08:40 -0700 (PDT) Subject: Re: [PATCH v5] Add negative repeat count to 'x' command To: Pedro Alves , Toshihito Kikuchi , gdb-patches@sourceware.org References: <1464857355-29883-1-git-send-email-k.toshihito@yahoo.de> <4e8feff5-935e-668e-6c68-87603173a953@foss.arm.com> <69169a01-7a25-1e72-810d-2971337ce002@redhat.com> <50dbd13a-52a2-9687-ace0-5aa51e1bc1d1@foss.arm.com> Cc: Simon Marchi From: Thomas Preudhomme Message-ID: Date: Thu, 11 Aug 2016 14:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <50dbd13a-52a2-9687-ace0-5aa51e1bc1d1@foss.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00133.txt.bz2 Hi Pedro, On 11/08/16 13:51, Thomas Preudhomme wrote: >> >> The find-strings-backwards algorithm just looks back for '\0' to >> find string boundaries. Looks like it just happens that in your >> case, the TestStrings array is immediately preceded by the >> tail of _fini, with no gap in between. >> >> Try this. It's not strictly correct to assume that the linker >> places the objects consecutively, but it's probably safe >> in practice. > > The patch works indeed. Thanks for your quick answer. While trying this I noticed that the following 2 tests fail when running with qemu-user (it works with qemu-system): gdb.base/examine-backward.exp: address zero boundary: examine 6 bytes backward gdb.base/examine-backward.exp: address zero boundary: examine 3 bytes backward from 0x0 They fail with: 0xfffffffd: Cannot access memory at address 0xfffffffd I suppose these two tests should also be guarded or maybe have several expected results. Best regards, Thomas