From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31867 invoked by alias); 18 Oct 2018 19:37:18 -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 31855 invoked by uid 89); 18 Oct 2018 19:37:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Below, backslash, NEWS, quoting X-HELO: mailsec115.isp.belgacom.be Received: from mailsec115.isp.belgacom.be (HELO mailsec115.isp.belgacom.be) (195.238.20.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Oct 2018 19:37:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1539891432; x=1571427432; h=message-id:subject:from:to:date:in-reply-to:references: mime-version:content-transfer-encoding; bh=8scs+8emUqRCp6RG0pDEr1eox2OlS1YK5prREdSgr50=; b=F2ERQVjmztDTIJAzTx2aKXK/Z7z+e5qBPn5qTTEXEKTinFeM6GOywJ2E zWyomX+oS52zlmbLyTG2w7walmGWXw==; Received: from unknown (HELO md) ([109.129.148.150]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 18 Oct 2018 21:37:10 +0200 Message-ID: <1539891430.4697.6.camel@skynet.be> Subject: PING^3 Re: [RFAv3 0/5] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] From: Philippe Waroquiers To: gdb-patches@sourceware.org Date: Thu, 18 Oct 2018 19:37:00 -0000 In-Reply-To: <20180923214209.985-1-philippe.waroquiers@skynet.be> References: <20180923214209.985-1-philippe.waroquiers@skynet.be> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00400.txt.bz2 Some more comments ? Thanks Philippe On Sun, 2018-09-23 at 23:42 +0200, Philippe Waroquiers wrote: > [RFAv3 0/5] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] > > RFAv3, handling the comments of Tom and Eli about RFAv2. > -------------------------------------------------------- > * code changes: > - reworked extract_arg_maybe_quoted to have it working the same way > as gdb_argv. In another patch series, I will evaluate more in > detail handling quoting/escaping inside extract_arg, by analysing > all callers. > - fixed (and tested) regression when NAMEREGEXP arg contains spaces. > - replaced INFO_PRINT_ARGS_HELP by function info_print_args_help > to make this gettext friendly. > > - instead of preg/treg regexp new arguments to iterate_over_block_arg_vars > and iterate_over_block_local_vars, have preg/treg being part > of the opaque cb_data, and do filtering inside do_print_variable_and_value. > - no need anymore to include gdb_regex.h in various files or stack.h. > - used preg/treg.has_value() instead of implicit conversion to boolean. > - used *reg instead of ® for an out parameter. > - handled language specific type printing using set_language and RAII. > - no new line after return type for function declaration. > > * documentation changes: > - handled the comments of Eli: rephrase two sentences as one, > remove redundant blank before :. > - quoting/backslash handling of TYPEREGEXP slightly updated according > to the switch to gdb_argv quoting behaviour. > > > Changes between the first RFA and RFAv2: > --------------------------------------- > The documentation parts were already reviewed by Eli, other parts > were not reviewed yet. > Compared to the first RFA, the changes are a rebase to the last trunk version, > the removal of an unused local variable, and some updates to the new > info_qt.exp test to ensure unicity of test names. > > Changes between first RFA and the RFC: > --------------------------------------- > * Handled comments of Eli on the documentation. > * ChangeLog entries added in commit messages > * Test added. > > Thanks. > > > This patch series adds flags and/or arguments > [-q] [-t TYPEREGEXP] [NAMEREGEXP] to the commands > info [args|functions|locals|variables] > > The additional arguments allow to more precisely specify what to print. > As these new features can usefully be combined with frame apply and thread > apply, the documentation gives examples combining the above > and the 'thread apply' and 'frame apply' commands. > > Some examples: > * print functions returning an int: > info functions -t '^int (' > * print local variables having pthread_t type > info locals -t pthread_t > * print global variables having type 'struct addrinfo' > info var -t 'struct addrinfo' > * print args that are likely file descriptors > info arg -t int .*fd.* > > Below examples are combined with the 'thread/frame apply' commands: > > * Assuming lock_something_t is an RAII type, show all locks: > thread apply all -s frame apply all -s info locals -q -t lock_something_t > or shorter equivalent: > tfaas i lo -q -t lock_something_t > > * show frames and args having an arg with type matchin std::.*map > so likely std::map or std::unordered_map > frame apply all -s info args -q std::.*map > > > The code, documentation, NEWS, test and ChangeLog are complete. > >