Document 'set|show exec-file-mismatch (ask|warn|off)'
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 21 Dec 2019 13:47:17 +0000 (14:47 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 25 Jan 2020 10:09:13 +0000 (11:09 +0100)
Mention in NEWS the new option and the set/show commands.

Document in gdb.texinfo the new option and the set/show commands.

gdb/ChangeLog
2020-01-25  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* NEWS: Mention the new option and the set/show commands.

gdb/doc/ChangeLog
2020-01-25  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* gdb.texinfo (Attach): Document the new option and the
set/show commands.
(Connecting): Reference the exec-file-mismatch option.

gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index fdd66225ea34c08e566e7f14b7d851e6d9802769..b3aa3e03106fa040aa88d3e6de977f5102f4332a 100644 (file)
@@ -1,3 +1,7 @@
+2020-01-25  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+       * NEWS: Mention the new option and the set/show commands.
+
 2020-01-25  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
        * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
index 1305eceecafae888bdeb1c9d5334ad48247241f5..d4e2e70f38713c57da7752ab73914b54f720cc2b 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
   that support it (see entry for GDB 9, below), providing faster
   performance for programs with many symbols.
 
+* New commands
+
+set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|off).
+show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
+  Set or show the option 'exec-file-mismatch'.  When GDB attaches to
+  a running process and can determine the name of the executable file
+  the process runs, this new option indicates whether to detect mismatch
+  between the name of the current executable file loaded by GDB
+  and the name of the executable file used to start the process.
+  If 'ask', the default, display a warning and ask the user
+  whether to load the process executable file; if 'warn', just display
+  a warning; if 'off', don't attempt to detect a mismatch.
+
 *** Changes in GDB 9
 
 * 'thread-exited' event is now available in the annotations interface.
index 4fc02ea80c9aac0600217533bd1109331a1d00cc..139951f48c261d006aee8eec0914cc6a3e9bc15d 100644 (file)
@@ -1,3 +1,9 @@
+2020-01-25  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+       * gdb.texinfo (Attach): Document the new option and the
+       set/show commands.
+       (Connecting): Reference the exec-file-mismatch option.
+
 2020-01-10  Pedro Alves  <palves@redhat.com>
 
        * gdb.texinfo (Starting): Say "current inferior not connected"
index 67882d0cd89bf61b0e79520e5896b698eebbf862..2a38b03f33e356dd908924a0b320ee62cf8ed700 100644 (file)
@@ -2905,6 +2905,30 @@ the program is not found) by using the source file search path
 the @code{file} command to load the program.  @xref{Files, ,Commands to
 Specify Files}.
 
+@anchor{set exec-file-mismatch}
+If the debugger can determine the name of the executable file running
+in the process it is attaching to, and this file name does not match
+the name of the current exec-file loaded by @value{GDBN}, the option
+@code{exec-file-mismatch} specifies how to handle the mismatch.
+
+@table @code
+@kindex exec-file-mismatch
+@cindex set exec-file-mismatch
+@item set exec-file-mismatch @samp{ask|warn|off}
+
+Whether to detect mismatch between the name of the current executable
+file loaded by @value{GDBN} and the name of the executable file used to
+start the process.  If @samp{ask}, the default, display a warning
+and ask the user whether to load the process executable file; if
+@samp{warn}, just display a warning; if @samp{off}, don't attempt to
+detect a mismatch.
+
+@cindex show exec-file-mismatch
+@item show exec-file-mismatch
+Show the current value of @code{exec-file-mismatch}.
+
+@end table
+
 The first thing @value{GDBN} does after arranging to debug the specified
 process is to stop it.  You can examine and modify an attached process
 with all the @value{GDBN} commands that are ordinarily available when
@@ -21839,6 +21863,12 @@ established.  If you are using @code{gdbserver}, you may also invoke
 @code{gdbserver} using the @option{--attach} option
 (@pxref{Running gdbserver}).
 
+Some remote targets allow @value{GDBN} to determine the executable file running
+in the process the debugger is attaching to.  In such a case, @value{GDBN}
+uses the value of @code{exec-file-mismatch} to handle a possible mismatch
+between the executable file name running in the process and the name of the
+current exec-file loaded by @value{GDBN} (@pxref{set exec-file-mismatch}).
+
 @end table
 
 @anchor{Host and target files}
This page took 0.078425 seconds and 4 git commands to generate.