From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10387 invoked by alias); 17 Sep 2018 16:54: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 10374 invoked by uid 89); 17 Sep 2018 16:54:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=KF_SA_LOCAL, KF_VNODE_TYPE, LONGEST, KF_SA_PEER X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 16:54:07 +0000 Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3CA4910A87D; Mon, 17 Sep 2018 12:54:04 -0400 (EDT) Subject: Re: [PATCH v2 3/6] Add support for 'info proc files' on FreeBSD core dumps. To: Simon Marchi , gdb-patches@sourceware.org References: <20180912233707.43492-1-jhb@FreeBSD.org> <20180912233707.43492-4-jhb@FreeBSD.org> From: John Baldwin Message-ID: <0f1f7314-5760-6ae1-1a25-b9d42ff8ffb8@FreeBSD.org> Date: Mon, 17 Sep 2018 16:54:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00584.txt.bz2 On 9/15/18 7:27 PM, Simon Marchi wrote: > Some nits about the comments, otherwise LGTM (I didn't check the > bits-reading code in detail, I assumed it wash largely unchanged). Yes, the bits-reading code hasn't changed. > On 2018-09-12 7:37 p.m., John Baldwin wrote: >> + >> +/* Output the header for "info proc files". */ > > This should be /* See fbsd-tdep.h. */, same for fbsd_info_proc_files_entry. Ok, fixed both locally. >> +void >> +fbsd_info_proc_files_header () >> +{ >> + printf_filtered (_("Open files:\n\n")); >> + printf_filtered (" %6s %6s %10s %9s %s\n", >> + "FD", "Type", "Offset", "Flags ", "Name"); >> +} > > ... > >> +/* Output description of a single file descriptor for "info proc >> + files". The KF_TYPE, KF_FD, KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, >> + KF_SOCK_DOMAIN, KF_SOCK_TYPE, and KF_SOCK_PROTOCOL parameters >> + should contain the value of the corresponding fields in a 'struct >> + kinfo_file'. The KF_SA_LOCAL, KF_SA_PEER, and KF_PATH parameters >> + should contain pointers to the corresponding fields in a 'struct >> + kinfo_file'. */ > > Some parameters name in the doc here don't match the actual names below. > >> +extern void fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags, >> + LONGEST kf_offset, int kf_vnode_type, >> + int kf_sock_domain, int kf_sock_type, >> + int kf_sock_protocol, >> + const void *kf_sa_local, >> + const void *fa_sa_peer, >> + const void *path); Huh, I'm not sure how I botched that, but I've fixed. The comment was correct, and the actual function definition matched the comment. Only the prototype was wrong. -- John Baldwin                                                                            Â