From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39136 invoked by alias); 16 Mar 2016 08:42:48 -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 39117 invoked by uid 89); 16 Mar 2016 08:42:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2821, Hx-spam-relays-external:mga04.intel.com, H*RU:192.55.52.120, Hx-spam-relays-external:192.55.52.120 X-HELO: mga04.intel.com Received: from mga04.intel.com (HELO mga04.intel.com) (192.55.52.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Mar 2016 08:42:45 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 16 Mar 2016 01:42:44 -0700 X-ExtLoop1: 1 Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga001.jf.intel.com with ESMTP; 16 Mar 2016 01:42:43 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.87]) by IRSMSX152.ger.corp.intel.com ([169.254.6.34]) with mapi id 14.03.0248.002; Wed, 16 Mar 2016 08:42:42 +0000 From: "Metzger, Markus T" To: Andreas Arnez CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] linux-record: Simplify with record_mem_at_reg() Date: Wed, 16 Mar 2016 08:42:00 -0000 Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00250.txt.bz2 > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Andreas Arnez > Sent: Tuesday, March 15, 2016 5:51 PM > To: gdb-patches@sourceware.org > Cc: Metzger, Markus T > Subject: [PATCH] linux-record: Simplify with record_mem_at_reg() Hello Andreas, I like the cleanup you're doing and other than a few comments on formatting I'm OK with the patch. This is outside of my area, though. You need the approval of a global main= tainer. > @@ -327,9 +333,7 @@ record_linux_system_call (enum gdb_syscall syscall, > || tmpulongest =3D=3D RECORD_PTRACE_PEEKDATA > || tmpulongest =3D=3D RECORD_PTRACE_PEEKUSR) > { > - regcache_raw_read_unsigned (regcache, tdep->arg4, > - &tmpulongest); > - if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4)) > + if (record_mem_at_reg (regcache, tdep->arg4, 4)) > return -1; > } Indentation seems to be broken for this file. I wouldn't fix it for indivi= dual lines, though. I'd either fix it for the entire function in a separate patch or p= reserve the broken indentation. > @@ -561,9 +540,8 @@ record_linux_system_call (enum gdb_syscall syscall, > break; >=20 > case gdb_sys_ustat: > - regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest); > - if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, > - tdep->size_ustat)) > + if (record_mem_at_reg (regcache, tdep->arg2, > + tdep->size_ustat)) This now fits onto a single line. > @@ -574,9 +552,8 @@ record_linux_system_call (enum gdb_syscall syscall, > break; >=20 > case gdb_sys_sigaction: > - regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest); > - if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, > - tdep->size_old_sigaction)) > + if (record_mem_at_reg (regcache, tdep->arg3, > + tdep->size_old_sigaction)) Same here and at a few other places. > @@ -693,12 +662,9 @@ record_linux_system_call (enum gdb_syscall syscall, >=20 > case gdb_sys_readlink: > { > - ULONGEST len; > - > - regcache_raw_read_unsigned (regcache, tdep->arg2, > - &tmpulongest); > - regcache_raw_read_unsigned (regcache, tdep->arg3, &len); > - if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) > len)) > + regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest); > + if (record_mem_at_reg (regcache, tdep->arg2, > + (int) tmpulongest)) > return -1; > } Fits onto one line now. You don't need the block anymore. Regards, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928