From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25337 invoked by alias); 30 Aug 2014 03:27:24 -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 25309 invoked by uid 89); 30 Aug 2014 03:27:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 30 Aug 2014 03:27:18 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1XNZJr-0005nM-88 from Yao_Qi@mentor.com ; Fri, 29 Aug 2014 20:27:15 -0700 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Fri, 29 Aug 2014 20:27:14 -0700 From: Yao Qi To: Omair Javaid CC: Subject: Re: [PATCH 4/7] Implements aarch64 process record and reverse debugging support References: <1401898871-2270-1-git-send-email-omair.javaid@linaro.org> <1401898871-2270-5-git-send-email-omair.javaid@linaro.org> Date: Sat, 30 Aug 2014 03:27:00 -0000 In-Reply-To: <1401898871-2270-5-git-send-email-omair.javaid@linaro.org> (Omair Javaid's message of "Wed, 4 Jun 2014 21:21:08 +0500") Message-ID: <87k35q8xuf.fsf@codesourcery.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: 2014-08/txt/msg00662.txt.bz2 Omair Javaid writes: > This patch defines structures, macros and functions required for process = record > and reverse debugging support on aarch64-linux targets. Also implements > support for recording most if not all of instructions from a64 instructio= n set. > > gdb: > > 2014-06-04 Omair Javaid > > * aarch64-linux-tdep.c (aarch64_linux_init_abi): Updated. > * aarch64-tdep.c (record.h): Include. > (record-full.h): Include. > (aarch64_record_data_proc_reg): New function. > (aarch64_record_data_proc_imm): New function. > (aarch64_record_branch_except_sys): New function. > (aarch64_record_load_store): New function. > (aarch64_record_decode_insn_handler): New function. > (deallocate_reg_mem): New function. > (aarch64_process_record): New function. > * aarch64-tdep.h (submask): New macro. > (bit): New macro. > (bits): New macro. > (REG_ALLOC): New macro. > (MEM_ALLOC): New macro. > (struct aarch64_mem_r): Defined. > (aarch64_record_result): New enum. > (struct insn_decode_record): Defined. > (insn_decode_record): New typedef. > (aarch64_process_record): New extern declaration. We want to support process record on aarch64-linux, but the code is added to aarch64-tdep.c. Does aarch64-elf target need process record? I prefer to add code to aarch64-linux-tdep.c. I know that code for process record on arm was added to arm-tdep.c too, but I don't think it is correct either. > diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h > index 78fb779..8a193f4 100644 > --- a/gdb/aarch64-tdep.h > +++ b/gdb/aarch64-tdep.h > @@ -90,4 +90,69 @@ struct gdbarch_tdep > struct type *vnb_type; > }; >=20=20 > +/* aarch64 process record-replay related structures, defines etc. */ > + > +#define submask(x) ((1L << ((x) + 1)) - 1) > +#define bit(obj,st) (((obj) >> (st)) & 1) > +#define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st))) If they are only used in aarch64-tdep.c, please define them there. > + > +/* ARM memory record structure. */ s/ARM/AArch64/ > +struct aarch64_mem_r > +{ > + uint64_t len; /* Record length. */ > + uint64_t addr; /* Memory address. */ > +}; > + > +enum aarch64_record_result > +{ > + AARCH64_RECORD_SUCCESS, > + AARCH64_RECORD_FAILURE, > + AARCH64_RECORD_USUPPORTED > +}; > + > +/* ARM instruction record contains opcode of current insn Likewise. --=20 Yao (=E9=BD=90=E5=B0=A7)