This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 0/6] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP]


Ping ?

Thanks

Philippe

On Thu, 2018-07-05 at 23:37 +0200, Philippe Waroquiers wrote:
> 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, NEWS, test and ChangeLog are (supposed to be) complete.
> 
> Compared to the RFC, the changes are:
> * All comments of Eli on the documentation have been handled.
> * ChangeLog entries added in commit messages
> * Test added.
> 
> 
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]