From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6938 invoked by alias); 11 Nov 2013 09:53:51 -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 6929 invoked by uid 89); 11 Nov 2013 09:53:51 -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,GARBLED_BODY,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2013 09:53:50 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VfoBb-00050C-4W from Yao_Qi@mentor.com ; Mon, 11 Nov 2013 01:53:35 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 11 Nov 2013 01:53:34 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Mon, 11 Nov 2013 01:53:34 -0800 Message-ID: <5280A8CA.3040307@codesourcery.com> Date: Mon, 11 Nov 2013 10:01:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Omair Javaid CC: , Patch Tracking Subject: Re: [PATCH 2/2] GDB process record and reverse debugging improvements for arm*-linux* References: <5268865F.6060307@codesourcery.com> <527C5887.8070304@linaro.org> In-Reply-To: <527C5887.8070304@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00281.txt.bz2 On 11/08/2013 11:20 AM, Omair Javaid wrote: > 2013-11-08 Omair Javaid > > * arm-linux-tdep.c (struct arm_linux_record_tdep): Declare. > (arm_canonicalize_syscall): New function. > (arm_all_but_pc_registers_record): New function. > (arm_linux_syscall_record): New function. > (arm_linux_init_abi): Add syscall recording constructs. > * arm-tdep.c (thumb_record_ldm_stm_swi): Update thumb syscall decoding. > (arm_record_coproc_data_proc): Update arm syscall decoding. > * arm-tdep.h (gdbarch_tdep): Update arm_syscall_record declaration. > We can write the last entry like this: * arm-tdep.h (struct gdbarch_tdep) : Remove. : New field. > > +#include "record-full.h" > +#include "linux-record.h" > + We should mention these two inclusions in ChangeLog too, like * arm-linux-tdep.c: Include "record-full.h" and "linux-record.h". > #include "cli/cli-utils.h" > #include "stap-probe.h" > #include "parser-defs.h" > @@ -1231,6 +1234,98 @@ arm_stap_parse_special_token (struct gdb > return 1; > } > > +/* ARM process record-replay constructs; syscall, signal etc. */ > + > +struct linux_record_tdep arm_linux_record_tdep; > + > +/* arm_canonicalize_syscall maps from the native arm Linux set > + of syscall ids into a canonical set of syscall ids used by > + process record. */ > + > +static enum gdb_syscall > +arm_canonicalize_syscall (int syscall) > +{ > + enum { sys_process_vm_writev = 377 }; > + > + if (syscall <= gdb_sys_sched_getaffinity) > + { > + return syscall; > + } Unnecessary braces. > + else if (syscall >= 243 && syscall <= 247 ) > + { > + return syscall + 2; > + } > + else if (syscall >= 248 && syscall <= 253 ) > + { > + return syscall + 4; > + } > + > + return -1; > +} > + > +/* Handler for arm system call instruction and recording. */ > + > +static int > +arm_linux_syscall_record (struct regcache *regcache, unsigned long > svc_number) Your mailer should wrap your patch. That means other people can't apply your patch cleanly. Patch looks good to me but you still need a maintainer's approval. -- Yao (齐尧)