public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC 0/5] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP]
@ 2018-07-01 21:07 Philippe Waroquiers
  2018-07-01 21:07 ` [RFC 1/5] New cli-utils.h/.c function extract_info_print_args Philippe Waroquiers
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Philippe Waroquiers @ 2018-07-01 21:07 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-07-04 16:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-01 21:07 [RFC 0/5] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] Philippe Waroquiers
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 3/5] Add [-q] [-t TYPEREGEXP] [NAMEREGEXP] args to info [args|functions|locals|variables] Philippe Waroquiers
2018-07-02 15:06   ` Eli Zaretskii
2018-07-01 21:07 ` [RFC 2/5] Make struct type_print_options default_ptype_flags non static Philippe Waroquiers
2018-07-01 21:07 ` [RFC 4/5] Document changes to info [args|functions|locals|variables] 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 5/5] Announce changes in NEWS " Philippe Waroquiers
2018-07-02 14:51   ` Eli Zaretskii

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