[binutils-gdb] gdb: Improve indexing of 'dir' command and related commands

Eli Zaretskii via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=847a21398daa3b8e805a8cd856d16d9101e3fad3

commit 847a21398daa3b8e805a8cd856d16d9101e3fad3
Author: Eli Zaretskii <[email protected]>
Date:   Sat Apr 11 09:16:25 2026 +0300

    gdb: Improve indexing of 'dir' command and related commands
    
    I had difficulty finding the 'dir' command in the manual (I forgot its
    name, amazingly enough), so I've installed this to improve its indexing.
    
    * gdb/doc/gdb.texinfo (Source Path): Improve indexing.

Diff:
---
 gdb/doc/gdb.texinfo | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 07abbe7667c..1fc052bc1e6 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10050,7 +10050,7 @@ Variables}).  You can abbreviate this command as @code{rev}.
 @node Source Path
 @section Specifying Source Directories
 
-@cindex source path
+@cindex source search path
 @cindex directories for source files
 Executable programs sometimes do not record the directories of the source
 files from which they were compiled, just the names.  Even when they do,
@@ -10176,6 +10176,8 @@ Whenever you reset or rearrange the source path, @value{GDBN} clears out
 any information it has cached about where source files are found and where
 each line is in the file.
 
+@cindex source path, add directory
+@cindex add directory to source search path
 @kindex directory
 @kindex dir
 When you start @value{GDBN}, its source path includes only @samp{$cdir}
@@ -10185,8 +10187,10 @@ To add other directories, use the @code{directory} command.
 The search path is used to find both program source files and @value{GDBN}
 script files (read using the @samp{-command} option and @samp{source} command).
 
+@cindex substitution rules, for source search path
+@cindex source directories, substitution rules
 In addition to the source path, @value{GDBN} provides a set of commands
-that manage a list of source path substitution rules.  A @dfn{substitution
+that manage the list of source path substitution rules.  A @dfn{substitution
 rule} specifies how to rewrite source directories stored in the program's
 debug information in case the sources were moved to a different
 directory between compilation and debugging.  A rule is made of
@@ -10268,18 +10272,18 @@ Reset the source path to its default value (@samp{$cdir:$cwd} on Unix systems).
 @c RET-repeat for @code{directory} is explicitly disabled, but since
 @c repeating it would be a no-op we do not say that.  (thanks to RMS)
 
-@item set directories @var{path-list}
 @kindex set directories
+@item set directories @var{path-list}
 Set the source path to @var{path-list}.
 @samp{$cdir:$cwd} are added if missing.
 
-@item show directories
 @kindex show directories
+@item show directories
 Print the source path: show which directories it contains.
 
 @anchor{set substitute-path}
-@item set substitute-path @var{from} @var{to}
 @kindex set substitute-path
+@item set substitute-path @var{from} @var{to}
 Define a source path substitution rule, and add it at the end of the
 current list of existing substitution rules.  If a rule with the same
 @var{from} was already defined, then the old rule is also deleted.
@@ -10315,16 +10319,16 @@ use the second rule to rewrite @file{/usr/src/lib/foo.c} into
 @file{/mnt/src/lib/foo.c}.
 
 
-@item unset substitute-path [path]
 @kindex unset substitute-path
+@item unset substitute-path [path]
 If a path is specified, search the current list of substitution rules
 for a rule that would rewrite that path.  Delete that rule if found.
 A warning is emitted by the debugger if no rule could be found.
 
 If no path is specified, then all substitution rules are deleted.
 
-@item show substitute-path [path]
 @kindex show substitute-path
+@item show substitute-path [path]
 If a path is specified, then print the source path substitution rule
 which would rewrite that path, if any.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.