This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 3/6] Add support for 'info proc files' on FreeBSD core dumps.


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

                                                                            


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]