From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103797 invoked by alias); 1 Jul 2018 21:07:48 -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 103783 invoked by uid 89); 1 Jul 2018 21:07:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=gives, combined, NEWS, H*F:D*be X-HELO: mailsec107.isp.belgacom.be Received: from mailsec107.isp.belgacom.be (HELO mailsec107.isp.belgacom.be) (195.238.20.103) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Jul 2018 21:07:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1530479264; x=1562015264; h=from:to:subject:date:message-id; bh=tEv+1V7SDx9jQ203iQN8KzZ32p8UstcTibNUwT+TdWg=; b=QPSYk0nPYm7YzSx6YZFjjUNde1QsLgbLN4m07Dp0Z2m7KK2a4u6uZIts bVKu5yv+qo3SqmljLrSMhk/mxap34w==; Received: from 224.41-64-87.adsl-dyn.isp.belgacom.be (HELO md.home) ([87.64.41.224]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 01 Jul 2018 23:07:40 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Subject: [RFC 0/5] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] Date: Sun, 01 Jul 2018 21:07:00 -0000 Message-Id: <20180701210734.3793-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00001.txt.bz2 [RFC 0/5] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] 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. This patch series does not depend on [RFA_v3 0/8] Implement 'frame apply COMMAND', enhance 'thread apply COMMAND'. However, the new features above can usefully be combined with frame apply and thread apply. So, 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 depends on the 'thread/frame apply' patch series. * 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 and NEWS is (supposed to be) complete. ChangeLog and tests are still to be done.