From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104738 invoked by alias); 15 Sep 2015 11:27:29 -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 104726 invoked by uid 89); 15 Sep 2015 11:27:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f169.google.com Received: from mail-wi0-f169.google.com (HELO mail-wi0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 15 Sep 2015 11:27:28 +0000 Received: by wicfx3 with SMTP id fx3so23930266wic.1 for ; Tue, 15 Sep 2015 04:27:25 -0700 (PDT) X-Received: by 10.194.103.194 with SMTP id fy2mr37352359wjb.10.1442316445048; Tue, 15 Sep 2015 04:27:25 -0700 (PDT) Received: from E107787-LIN ([195.154.84.196]) by smtp.gmail.com with ESMTPSA id gk9sm19427252wib.9.2015.09.15.04.27.24 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Tue, 15 Sep 2015 04:27:24 -0700 (PDT) From: Yao Qi To: Pierre Langlois Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 7/8] [testsuite] Add a gdb.trace test for instruction relocation References: <1442230282-20751-1-git-send-email-pierre.langlois@arm.com> <1442230282-20751-8-git-send-email-pierre.langlois@arm.com> Date: Tue, 15 Sep 2015 11:27:00 -0000 In-Reply-To: <1442230282-20751-8-git-send-email-pierre.langlois@arm.com> (Pierre Langlois's message of "Mon, 14 Sep 2015 12:31:21 +0100") Message-ID: <86oah33otl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00317.txt.bz2 Pierre Langlois writes: > This test case makes sure that relocating PC relative instructions does > not change their behaviors. All PC relative AArch64 instructions are > covered. While call and jump (32 bit relative) instructions are covered > on x86. > > The test case creates a static array of function pointers for each > supported architecture. Each function in this array tests a specific > instruction using inline assembly. They all need to contain a symbol in > the form of 'set_point\[0-9\]+' and finish by either calling pass or > fail. The number of 'set_pointN' needs to go from 0 to > (ARRAY_SIZE - 1). > > The test will: > - look up the number of function pointers in the static array. > - set fast tracepoints on each 'set_point\[0-9\]+' symbol, one in each > functions from 0 to (ARRAY_SIZE - 1). > - run the trace experiment and make sure the pass function is called for > every function. > > gdb/testsuite/ChangeLog: > > * gdb.trace/ftrace-insn-reloc.c: New file. > * gdb.trace/ftrace-insn-reloc.exp: New file. The patch looks good to me. I am wondering we could move gdb.trace/ftrace-insn-reloc.c to gdb.arch/insn-reloc.c, because it is can be used for testing displaced stepping as well. We can move gdb.trace/ftrace-insn-reloc.exp to gdb.arch too. Any objections? You can push it in in a few days if there are no objections on moving them to gdb.arch directory. --=20 Yao (=E9=BD=90=E5=B0=A7)