From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125144 invoked by alias); 8 Jul 2015 16:09:10 -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 125092 invoked by uid 89); 8 Jul 2015 16:09:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: mail-pd0-f178.google.com Received: from mail-pd0-f178.google.com (HELO mail-pd0-f178.google.com) (209.85.192.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 08 Jul 2015 16:09:06 +0000 Received: by pdbep18 with SMTP id ep18so148000819pdb.1 for ; Wed, 08 Jul 2015 09:09:05 -0700 (PDT) X-Received: by 10.68.205.100 with SMTP id lf4mr21691612pbc.87.1436371744964; Wed, 08 Jul 2015 09:09:04 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id z6sm2965395pdk.83.2015.07.08.09.09.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 08 Jul 2015 09:09:03 -0700 (PDT) From: Yao Qi To: Pierre Langlois Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/8] [AArch64] Refactor aarch64_make_prologue_cache References: <1436273518-5959-1-git-send-email-pierre.langlois@arm.com> <1436273518-5959-2-git-send-email-pierre.langlois@arm.com> Date: Wed, 08 Jul 2015 16:09:00 -0000 In-Reply-To: <1436273518-5959-2-git-send-email-pierre.langlois@arm.com> (Pierre Langlois's message of "Tue, 7 Jul 2015 13:51:51 +0100") Message-ID: <86380yocmc.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-07/txt/msg00229.txt.bz2 Pierre Langlois writes: > static struct aarch64_prologue_cache * > -aarch64_make_prologue_cache (struct frame_info *this_frame) > +aarch64_make_prologue_cache (struct frame_info *this_frame, void > **this_cache) Could you document this function? add comments about it, its arguments, and return value. > { > struct aarch64_prologue_cache *cache; > CORE_ADDR unwound_fp; > int reg; >=20=20 > + if (*this_cache) > + return *this_cache; > + Please check NULL explicitly, like if (*this_cache !=3D NULL), see https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards OK with these changes. --=20 Yao (=E9=BD=90=E5=B0=A7)