From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13983 invoked by alias); 4 Dec 2011 17:00:20 -0000 Received: (qmail 13954 invoked by uid 22791); 4 Dec 2011 17:00:17 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_SB X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Dec 2011 17:00:04 +0000 Received: by wgbds11 with SMTP id ds11so4677997wgb.12 for ; Sun, 04 Dec 2011 09:00:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.102.233 with SMTP id fr9mr8862054wib.40.1323018002550; Sun, 04 Dec 2011 09:00:02 -0800 (PST) Received: by 10.180.96.72 with HTTP; Sun, 4 Dec 2011 09:00:02 -0800 (PST) In-Reply-To: <4EDB877B.2050903@codesourcery.com> References: <998639.46560.qm@web112516.mail.gq1.yahoo.com> <4EDAD0EF.20405@codesourcery.com> <4EDB877B.2050903@codesourcery.com> Date: Sun, 04 Dec 2011 17:00:00 -0000 Message-ID: Subject: Re: [PATCH] arm reversible : From: oza Pawandeep To: Yao Qi Cc: =?ISO-8859-1?Q?Petr_Hluz=EDn?= , Tom Tromey , paawan oza , "gdb-patches@sourceware.org" , chandra krishnappa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-12/txt/msg00103.txt.bz2 Hi Yao, I have modified it; please have a look below. I have observed that some people have given little description about functions: but some places its missing. I think it is better to give small description: 2011-12-03 Oza Pawandeep * arm-linux-tdep.c (arm_linux_init_abi): Call set_gdbarch_process_record. Initialize `arm_swi_record' field. * arm-tdep.c (arm_process_record): New function. (deallocate_reg_mem): New function. (decode_insn): New function. (thumb_record_branch): New function. (thumb_record_ldm_stm_swi(): New function. (thumb_record_misc): New function. (thumb_record_ld_st_stack): New function. (thumb_record_ld_st_imm_offset): New function. (thumb_record_ld_st_reg_offset(): New function. (thumb_record_add_sub_cmp_mov): New function. (thumb_record_shift_add_sub): New function. (arm_record_coproc_data_proc): New function. (arm_record_coproc): New function. (arm_record_b_bl): New function. (arm_record_ld_st_multiple): New function. (arm_record_ld_st_reg_offset): New function. (arm_record_ld_st_imm_offset): New function. (arm_record_data_proc_imm): New function. (arm_record_data_proc_misc_ld_str): New function. (arm_record_extension_space): New function. (arm_record_strx): New function. (sbo_sbz): New function. (struct insn_decode_record): New Structure. arm insn record (REG_ALLOC): New Macros. use it for reg allocations (MEM_ALLOC): New Macros. use it for memory allocations * arm-tdep.h (struct gdbarch_tdep): New field 'arm_swi_record' Regards, Oza. On Sun, Dec 4, 2011 at 8:15 PM, Yao Qi wrote: > On 12/04/2011 07:32 PM, oza Pawandeep wrote: >> Updated patch contains all the 3 review comments fixed (Tom, Petr and Ya= o). >> Change log is elaborated; I am looking forwarding to adding more >> details if need. seeking for your feedback on the same. >> > > The format of ChangeLog looks odd to me. =C2=A0Some comments below, > >> diff -urN arm_orig/ChangeLog arm_new/ChangeLog >> --- arm_orig/ChangeLog =C2=A0 =C2=A0 =C2=A0 =C2=A02011-12-03 18:05:04.00= 0000000 +0530 >> +++ arm_new/ChangeLog 2011-12-04 16:45:00.000000000 +0530 >> @@ -1,3 +1,65 @@ >> +2011-12-03 =C2=A0Oza Pawandeep =C2=A0 >> + >> + =C2=A0 =C2=A0 * arm-linux-tdep.c: arm_linux_init_abi modified to inclu= de >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0arm reversible debugging feature. >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0registered arm_process_record to gdb= _arch >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0syscall pointer initialization. > > It can be > > =C2=A0 =C2=A0 =C2=A0 =C2=A0* arm-linux-tdep.c (arm_linux_init_abi): Call > =C2=A0 =C2=A0 =C2=A0 =C2=A0set_gdbarch_process_record. > =C2=A0 =C2=A0 =C2=A0 =C2=A0Initialize `arm_swi_record' field. > > Please care about the format of changelog entry, usually it is like this, > > [tab] =C2=A0 * file-you-modified.c (function-you-modified): What is your > [tab] =C2=A0 Change. > > Note that we write "what is changed" in ChangeLog, instead of "why is > changed". > >> + >> + =C2=A0 =C2=A0 * arm-tdep.c: arm-reversible-debugging implementation. >> + =C2=A0 =C2=A0 =C2=A0 newly added functions are as follows. >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_process_record: handles basic = initialization and record >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 summarisation, decodes basic= insn ids, on which it hands over >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 controls to decode_insn. > > So, we don't need so much details in changelog like this, we can write > it in this way, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0* arm-tdep.c (arm_process_record): New. > > There are still many new added functions, and I think they can > documented in ChangeLog in the same way. > >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> deallocate_reg_mem : clean up func= tion >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> decode_insn: Decodes arm/thumb ins= n and calls appropriate >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 decoding routine to record t= he change. >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_branch: branch insn r= eording (thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_ldm_stm_swi: load, st= ore and sycall insn >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 recoding =C2=A0(thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_misc: misc insn recor= ding =C2=A0(thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_ld_st_stack: store an= d stack insn recording =C2=A0(thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_ld_st_imm_offset: loa= d, store with immediate offset >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 insn recording =C2=A0(thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_ld_st_reg_offset: loa= d, store with register offset >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 recording =C2=A0(thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_add_sub_cmp_mov: addi= tion, subtractation, compare >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 and move insn recording =C2= =A0(thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> thumb_record_shift_add_sub: shift,= add and sub insn recording >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (thumb) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_coproc_data_proc: copro= cessor and data processing >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 recording (partially impleme= nted) (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_coproc: coprocessor ins= n recording >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (partially implemented) (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_b_bl: branch insn recor= ding (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_ld_st_multiple: load an= d store multiple insn recording >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_ld_st_reg_offset: load = and store reg offset recording >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_ld_st_imm_offset: load = and store immediate offset >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 recording (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_data_proc_imm: data pro= cessing insn recording =C2=A0(arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_data_proc_misc_ld_str: = data processing, misc, load and >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 store insn recording =C2=A0(= arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_extension_space:arm ext= ension space insn recording >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> arm_record_strx: str(X) type insn = recording =C2=A0(arm) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> sbo_sbz: checks for mendatory sbo = and sbz fields in insn, >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0added new data structures: >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> insn_decode_record_t: local record= structure which contains insn's >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0record, which includes both reg and = memory. >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0REG_ALLOC and MEM_ALLOC macros takes= care of actual memory allocation >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0in local record which is finally pro= cessed by arm_rocess_record. >> + >> + =C2=A0 =C2=A0 * arm-tdep.h: arm-reversible data structures >> + >> + =C2=A0 =C2=A0 =C2=A0 > modified gdbarch_tdep: added member (function p= ointer) arm_swi_record >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0which is supposed to be recording sy= stem calls > > This can be written in this way, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0* arm-tdep.h (struct gdbarch_tdep): New field = `arm_swi_record'. > >> + =C2=A0 =C2=A0 =C2=A0 > arm_process_record externed. >> + >> + > > Again, reading other existing changelog entries must be helpful for you > to write your own in a correct way/format. :) > > -- > Yao (=E9=BD=90=E5=B0=A7)