From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104198 invoked by alias); 17 Feb 2018 03:50:36 -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 104182 invoked by uid 89); 17 Feb 2018 03:50:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Feb 2018 03:50:33 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w1H3oRIr032566 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 16 Feb 2018 22:50:31 -0500 Received: by simark.ca (Postfix, from userid 112) id 168801E76C; Fri, 16 Feb 2018 22:50:27 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 3D0A91E093; Fri, 16 Feb 2018 22:50:26 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 17 Feb 2018 03:50:00 -0000 From: Simon Marchi To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 09/10] Move register_dump to regcache-dump.c In-Reply-To: <1517999572-14987-10-git-send-email-yao.qi@linaro.org> References: <1517999572-14987-1-git-send-email-yao.qi@linaro.org> <1517999572-14987-10-git-send-email-yao.qi@linaro.org> Message-ID: <9c0e590fd8e1d5d54a426aefe7c78650@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 17 Feb 2018 03:50:27 +0000 X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00227.txt.bz2 Hi Yao, I think it would make sense to move the remaining dump-related things (the register_dump class, the register_dump::dump implementation) to regcache-dump.c. For all empty destructors, you can use "= default" instead of {}. > diff --git a/gdb/regcache-dump.c b/gdb/regcache-dump.c > new file mode 100644 > index 0000000..4780fc4 > --- /dev/null > +++ b/gdb/regcache-dump.c > @@ -0,0 +1,335 @@ > +/* Copyright (C) 1986-2017 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or > modify > + it under the terms of the GNU General Public License as published > by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see > . */ > + > +#include "defs.h" > +#include "gdbcmd.h" > +#include "regcache.h" > +#include "common/def-vector.h" > +#include "valprint.h" > +#include "remote.h" > +#include "reggroups.h" > +#include "target.h" > + > +/* Dump registers from regcache, used for dump raw registers and > + cooked registers. */ I just saw it now, but you could say either "used for dumping" or "used to dump", but "for dump" doesn't sound right. Simon