public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
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	[thread overview]
Message-ID: <20180701210734.3793-1-philippe.waroquiers@skynet.be> (raw)

[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.


             reply	other threads:[~2018-07-01 21:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 21:07 Philippe Waroquiers [this message]
2018-07-01 21:07 ` [RFC 1/5] New cli-utils.h/.c function extract_info_print_args Philippe Waroquiers
2018-07-01 21:07 ` [RFC 5/5] Announce changes in NEWS to info [args|functions|locals|variables] Philippe Waroquiers
2018-07-02 14:51   ` Eli Zaretskii
2018-07-01 21:07 ` [RFC 3/5] Add [-q] [-t TYPEREGEXP] [NAMEREGEXP] args " Philippe Waroquiers
2018-07-02 15:06   ` Eli Zaretskii
2018-07-01 21:07 ` [RFC 4/5] Document changes " Philippe Waroquiers
2018-07-02 15:02   ` Eli Zaretskii
2018-07-02 20:46     ` Philippe Waroquiers
2018-07-04 16:44       ` Eli Zaretskii
2018-07-01 21:07 ` [RFC 2/5] Make struct type_print_options default_ptype_flags non static Philippe Waroquiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180701210734.3793-1-philippe.waroquiers@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).