This is the mail archive of the gdb-cvs@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]

[binutils-gdb] NEWS and documentation for info sources [-dirname | -basename] [--] [REGEXP].


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ae60f04e08bf48f65d9101a6ab63f3806e6fca5e

commit ae60f04e08bf48f65d9101a6ab63f3806e6fca5e
Author: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Date:   Sat Aug 3 21:20:44 2019 +0200

    NEWS and documentation for info sources [-dirname | -basename] [--] [REGEXP].
    
    gdb/ChangeLog
    2019-08-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
    
            * NEWS: Mention changes to "info sources" command.
    
    gdb/doc/ChangeLog
    2019-08-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
    
            * gdb.texinfo (Symbols): Document new args -dirname and -basename
            of "info sources" command.

Diff:
---
 gdb/ChangeLog       |  4 ++++
 gdb/NEWS            |  9 +++++++++
 gdb/doc/ChangeLog   |  5 +++++
 gdb/doc/gdb.texinfo | 10 ++++++++++
 4 files changed, 28 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a5c8942..71f1691 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2019-08-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
+        * NEWS: Mention changes to "info sources" command.
+
+2019-08-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
 	* symtab.c (filename_partial_match_opts): New struct type.
 	(struct output_source_filename_data): New members
 	regexp, c_regexp, partial_match.
diff --git a/gdb/NEWS b/gdb/NEWS
index 3c3351e..da641cb 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -144,6 +144,12 @@ eval
   This allows to do formatted printing of strings without having
   a running inferior, or when debugging a core dump.
 
+info sources [-dirname | -basename] [--] [REGEXP]
+  This command has now optional arguments to only print the files
+  whose names match REGEXP.  The arguments -dirname and -basename
+  allow to restrict matching respectively to the dirname and basename
+  parts of the files.
+
 show style
   The "show style" and its subcommands are now styling
   a style name in their output using its own style, to help
@@ -225,6 +231,9 @@ maint show test-options-completion-result
       -past-main [on|off]
       -past-entry [on|off]
 
+  ** The new "info sources" options -dirname and -basename options
+     are using the standard '-OPT' infrastructure.
+
    All options above can also be abbreviated.  The argument of boolean
    (on/off) options can be 0/1 too, and also the argument is assumed
    "on" if omitted.  This allows writing compact command invocations,
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index e469b60..95fd22c 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+        * gdb.texinfo (Symbols): Document new args -dirname and -basename
+        of "info sources" command.
+
 2019-07-30  Christian Biesinger  <cbiesinger@google.com>
 
 	* python.texi (Symbols In Python): Document new function
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0fcd131..89b1eda 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -18583,6 +18583,16 @@ Print the names of all source files in your program for which there is
 debugging information, organized into two lists: files whose symbols
 have already been read, and files whose symbols will be read when needed.
 
+@item info sources [-dirname | -basename] [--] [@var{regexp}]
+Like @samp{info sources}, but only print the names of the files
+matching the provided @var{regexp}.
+By default, the @var{regexp} is used to match anywhere in the filename.
+If @code{-dirname}, only files having a dirname matching @var{regexp} are shown.
+If  @code{-basename}, only files having a basename matching @var{regexp}
+are shown.
+The matching is case-sensitive, except on operating systems that
+have case-insensitive filesystem (e.g., MS-Windows).
+
 @kindex info functions
 @item info functions [-q]
 Print the names and data types of all defined functions.


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