Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Fine tune exec-file-mismatch help and documentation.
@ 2020-06-27 20:12 Philippe Waroquiers
  2020-06-28  2:25 ` Eli Zaretskii
  2020-06-29 12:06 ` Pedro Alves
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Waroquiers @ 2020-06-27 20:12 UTC (permalink / raw)
  To: gdb-patches

It was deemed better to explicitly mention in help and doc that build IDs
are used for comparison, and that symbols are loaded when asking to
load the exec-file.

gdb/ChangeLog
2020-06-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* exec.c (_initialize_exec): Update exec-file-mismatch help.

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

	* gdb.texinfo (Attach): Updte exec-file-mismatch doc.
---
 gdb/doc/gdb.texinfo | 2 ++
 gdb/exec.c          | 8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index fbe9f850af..142684b694 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3016,6 +3016,8 @@ by @value{GDBN} and 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.
+If the user asks to load the process ececutable file, then its symbols
+will be loaded as well.
 
 @cindex show exec-file-mismatch
 @item show exec-file-mismatch
diff --git a/gdb/exec.c b/gdb/exec.c
index de473fbcb2..84e75e0798 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -305,7 +305,7 @@ validate_exec_file (int from_tty)
 	exec_file_target = TARGET_SYSROOT_PREFIX + exec_file_target;
 
       warning
-	(_("Mismatch between current exec-file %ps\n"
+	(_("Build ID mismatch between current exec-file %ps\n"
 	   "and automatically determined exec-file %ps\n"
 	   "exec-file-mismatch handling is currently \"%s\""),
 	 styled_string (file_name_style.style (), current_exec_file),
@@ -1269,7 +1269,11 @@ loaded by GDB and the exec-file automatically determined when attaching\n\
 to a process:\n\n\
  ask  - warn the user and ask whether to load the determined exec-file.\n\
  warn - warn the user, but do not change the exec-file.\n\
- off  - do not check for mismatch."),
+ off  - do not check for mismatch.\n\
+\n\
+GDB detects a mismatch by comparing the build IDs of the files.\n\
+If the user asks to load the determined exec-file, then its symbols\n\
+will be loaded as well."),
 			set_exec_file_mismatch_command,
 			show_exec_file_mismatch_command,
 			&setlist, &showlist);
-- 
2.20.1



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

* Re: [RFA] Fine tune exec-file-mismatch help and documentation.
  2020-06-27 20:12 [RFA] Fine tune exec-file-mismatch help and documentation Philippe Waroquiers
@ 2020-06-28  2:25 ` Eli Zaretskii
  2020-06-29 12:06 ` Pedro Alves
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2020-06-28  2:25 UTC (permalink / raw)
  To: Philippe Waroquiers; +Cc: gdb-patches

> Date: Sat, 27 Jun 2020 22:12:43 +0200
> From: Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
> 
> It was deemed better to explicitly mention in help and doc that build IDs
> are used for comparison, and that symbols are loaded when asking to
> load the exec-file.
> 
> gdb/ChangeLog
> 2020-06-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* exec.c (_initialize_exec): Update exec-file-mismatch help.
> 
> gdb/doc/ChangeLog
> 2020-06-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* gdb.texinfo (Attach): Updte exec-file-mismatch doc.

OK, thanks.


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

* Re: [RFA] Fine tune exec-file-mismatch help and documentation.
  2020-06-27 20:12 [RFA] Fine tune exec-file-mismatch help and documentation Philippe Waroquiers
  2020-06-28  2:25 ` Eli Zaretskii
@ 2020-06-29 12:06 ` Pedro Alves
  1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2020-06-29 12:06 UTC (permalink / raw)
  To: Philippe Waroquiers, gdb-patches

On 6/27/20 9:12 PM, Philippe Waroquiers via Gdb-patches wrote:
> It was deemed better to explicitly mention in help and doc that build IDs
> are used for comparison, and that symbols are loaded when asking to
> load the exec-file.
> 
> gdb/ChangeLog
> 2020-06-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* exec.c (_initialize_exec): Update exec-file-mismatch help.
> 
> gdb/doc/ChangeLog
> 2020-06-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
> 
> 	* gdb.texinfo (Attach): Updte exec-file-mismatch doc.

Typo: Updte -> Update

> ---
>  gdb/doc/gdb.texinfo | 2 ++
>  gdb/exec.c          | 8 ++++++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index fbe9f850af..142684b694 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -3016,6 +3016,8 @@ by @value{GDBN} and 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.
> +If the user asks to load the process ececutable file, then its symbols
> +will be loaded as well.

Typo: ececutable -> executable

Hmm, isn't "ask" being used for both the "GDB asks the user"
and "user confirms after being asked by GDB" a little confusing?

Would 

  "If the user confirms loading the "

instead sound OK?

>  
>  @cindex show exec-file-mismatch
>  @item show exec-file-mismatch
> diff --git a/gdb/exec.c b/gdb/exec.c
> index de473fbcb2..84e75e0798 100644
> --- a/gdb/exec.c
> +++ b/gdb/exec.c
> @@ -305,7 +305,7 @@ validate_exec_file (int from_tty)
>  	exec_file_target = TARGET_SYSROOT_PREFIX + exec_file_target;
>  
>        warning
> -	(_("Mismatch between current exec-file %ps\n"
> +	(_("Build ID mismatch between current exec-file %ps\n"
>  	   "and automatically determined exec-file %ps\n"
>  	   "exec-file-mismatch handling is currently \"%s\""),
>  	 styled_string (file_name_style.style (), current_exec_file),
> @@ -1269,7 +1269,11 @@ loaded by GDB and the exec-file automatically determined when attaching\n\
>  to a process:\n\n\
>   ask  - warn the user and ask whether to load the determined exec-file.\n\
>   warn - warn the user, but do not change the exec-file.\n\
> - off  - do not check for mismatch."),
> + off  - do not check for mismatch.\n\
> +\n\
> +GDB detects a mismatch by comparing the build IDs of the files.\n\
> +If the user asks to load the determined exec-file, then its symbols\n\
> +will be loaded as well."),

Ditto here.


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

end of thread, other threads:[~2020-06-29 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-27 20:12 [RFA] Fine tune exec-file-mismatch help and documentation Philippe Waroquiers
2020-06-28  2:25 ` Eli Zaretskii
2020-06-29 12:06 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox