From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75379 invoked by alias); 8 Sep 2018 22:32:51 -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 75358 invoked by uid 89); 8 Sep 2018 22:32:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.2 spammy= X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Sep 2018 22:32:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1536445966; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=D4QBTenPhvd8hn+3FxVjBN/NtCRimojD9gcUtYjVO3o=; b=NPrpiJ1MOu07IZd82la3UpzgJy3r5mxmhomBKzaW4V9fATzHEXzEzabIlWA0OG/T UOQmYPzxVgKQojJ3L924h0AgkigJqRsS5Frxuw2tvt0Yb90bKv2EJIvWOXaI1hWu YS+r1zBpRpeQiMp8aUW+zwRCnL/ZetLpQA4B1lR5HAk=; Received: from ESESSMB502.ericsson.se (Unknown_Domain [153.88.183.120]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id F8.AB.21978.E0E449B5; Sun, 9 Sep 2018 00:32:46 +0200 (CEST) Received: from ESESBMR503.ericsson.se (153.88.183.135) by ESESSMB502.ericsson.se (153.88.183.190) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Sun, 9 Sep 2018 00:32:46 +0200 Received: from ESESSMB504.ericsson.se (153.88.183.165) by ESESBMR503.ericsson.se (153.88.183.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Sun, 9 Sep 2018 00:32:46 +0200 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB504.ericsson.se (153.88.183.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Sun, 9 Sep 2018 00:32:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0zhoT8oSM9BhPJfvq0btwHJ0z6af+NfumSJGM6NscEc=; b=ObwOm93EDXyIpV6xi+rnqPAJE8F56LCdkSsCkp1SVX9Jo+5rdn4R9nTWofRbjUQFzZJ37QwvvoEsiFhYmltW7QFwsmt4xVdwKa5XwIsza+LTz9rNtsHW6vynjy3sajckcJ13uaPlkn/9Y9rN6ThWOCAnp5jGmDSz72u37X6tr4Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [100.94.32.129] (192.176.1.81) by BYAPR15MB2389.namprd15.prod.outlook.com (2603:10b6:a02:8c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15; Sat, 8 Sep 2018 22:32:42 +0000 Subject: Re: [PATCH 2/5] Add a new 'info proc files' subcommand of 'info proc'. To: John Baldwin , References: <20180908003659.37482-1-jhb@FreeBSD.org> <20180908003659.37482-3-jhb@FreeBSD.org> From: Simon Marchi Message-ID: <9d7d17e2-3a0a-0476-24f2-c8e04119f250@ericsson.com> Date: Sat, 08 Sep 2018 22:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180908003659.37482-3-jhb@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00211.txt.bz2 On 2018-09-08 01:36 AM, John Baldwin wrote: > This command displays a list of open file descriptors. > > gdb/ChangeLog: > > * defs.h (enum info_proc_what) [IP_FILES]: New value. > * infcmd.c (info_proc_cmd_files): New function. > (_initialize_infcmd): Register 'info proc files' command. > --- > gdb/ChangeLog | 6 ++++++ > gdb/defs.h | 3 +++ > gdb/infcmd.c | 12 ++++++++++++ > 3 files changed, 21 insertions(+) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index d32b390778..2e5cd0a687 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,9 @@ > +2018-09-07 John Baldwin > + > + * defs.h (enum info_proc_what) [IP_FILES]: New value. > + * infcmd.c (info_proc_cmd_files): New function. > + (_initialize_infcmd): Register 'info proc files' command. > + > 2018-09-07 John Baldwin > > * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of > diff --git a/gdb/defs.h b/gdb/defs.h > index fc4217005a..6e3f4df116 100644 > --- a/gdb/defs.h > +++ b/gdb/defs.h > @@ -389,6 +389,9 @@ enum info_proc_what > /* * Display `info proc cwd'. */ > IP_CWD, > > + /* * Display `info proc files'. */ > + IP_FILES, > + > /* * Display all of the above. */ > IP_ALL > }; > diff --git a/gdb/infcmd.c b/gdb/infcmd.c > index 860909f5e2..c6cfc10a49 100644 > --- a/gdb/infcmd.c > +++ b/gdb/infcmd.c > @@ -3218,6 +3218,14 @@ info_proc_cmd_exe (const char *args, int from_tty) > info_proc_cmd_1 (args, IP_EXE, from_tty); > } > > +/* Implement `info proc files'. */ > + > +static void > +info_proc_cmd_files (const char *args, int from_tty) > +{ > + info_proc_cmd_1 (args, IP_FILES, from_tty); > +} > + > /* Implement `info proc all'. */ > > static void > @@ -3543,6 +3551,10 @@ List command line arguments of the process."), > List absolute filename for executable of the process."), > &info_proc_cmdlist); > > + add_cmd ("files", class_info, info_proc_cmd_files, _("\ > +List of open files."), > + &info_proc_cmdlist); > + > add_cmd ("all", class_info, info_proc_cmd_all, _("\ > List all available /proc info."), > &info_proc_cmdlist); The code LGTM, but please wait for Eli's reply on the doc bits. Thanks, Simon