Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix typos in lib/gdb.exp
@ 2026-11-23 13:47 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-11-23 13:47 UTC (permalink / raw)
  To: gdb-patches

Fix a few typos in lib/gdb.exp:
- Kill a progress -> Kill a process
- prevented this for working -> prevented this from working
- EXPECT -> Expect
- tcl/TCL -> Tcl
- a copy tcl's ::unknown -> a copy of Tcl's ::unknown
- if tcl version -> if the Tcl version
- as an hexadecimal value -> as a hexadecimal value
- used to invocate -> used to invoke
- dejagnu/Dejagnu/DejaGNU -> DejaGnu
---
 gdb/testsuite/lib/gdb.exp | 80 +++++++++++++++++++--------------------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 950bfbcae73..ecb19038e6a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -30,12 +30,12 @@ if {$tool == ""} {
 # Add "convenience abbreviation" for positive decimals, without leading zeros.
 set positive {(?:[1-9][0-9]*)}
 
-# Dejagnu defines decimal as one of the "convenience abbreviations".
+# DejaGnu defines decimal as one of the "convenience abbreviations".
 # Override it with one that uses parentheses, which flushes incorrect uses
 # like "\[Inferior $decimal\]".
 set decimal {(?:[0-9]+)}
 
-# Dejagnu defines hex as one of the "convenience abbreviations".
+# DejaGnu defines hex as one of the "convenience abbreviations".
 # Override it with one that uses parentheses.
 set hex {(?:0x[0-9A-Fa-f]+)}
 
@@ -161,7 +161,7 @@ proc load_lib { file } {
 
 # Tcl 9.0 changed the default channel encoding profile to "strict".
 # When runtest sets LC_ALL=C the system encoding is iso8859-1, so file
-# channels opened by DejaGNU (gdb.sum, gdb.log) and spawn channels
+# channels opened by DejaGnu (gdb.sum, gdb.log) and spawn channels
 # (for GDB and subprocesses) default to iso8859-1 with strict profile.
 # Writing non-Latin-1 characters in test names then raises EILSEQ, and
 # sending them to GDB truncates the command at the unrepresentable
@@ -169,7 +169,7 @@ proc load_lib { file } {
 #
 # Fix this by:
 # 1. Overriding open_logs to reconfigure gdb.sum to UTF-8 after
-#    DejaGNU opens it with the system (iso8859-1) encoding.  Only
+#    DejaGnu opens it with the system (iso8859-1) encoding.  Only
 #    "-encoding utf-8" is needed here, not "-profile replace".  The
 #    test names written to gdb.sum are Unicode strings, and since
 #    UTF-8 can represent every Unicode character, the encode
@@ -1264,16 +1264,16 @@ proc gdb_test_multiple { command message args } {
 	error "gdbserver does not support $command without extended-remote"
     }
 
-    # TCL/EXPECT WART ALERT
+    # Tcl/Expect WART ALERT
     # Expect does something very strange when it receives a single braced
     # argument.  It splits it along word separators and performs substitutions.
     # This means that { "[ab]" } is evaluated as "[ab]", but { "\[ab\]" } is
-    # evaluated as "\[ab\]".  But that's not how TCL normally works; inside a
+    # evaluated as "\[ab\]".  But that's not how Tcl normally works; inside a
     # double-quoted list item, "\[ab\]" is just a long way of representing
     # "[ab]", because the backslashes will be removed by lindex.
 
     # Unfortunately, there appears to be no easy way to duplicate the splitting
-    # that expect will do from within TCL.  And many places make use of the
+    # that Expect will do from within Tcl.  And many places make use of the
     # "\[0-9\]" construct, so we need to support that; and some places make use
     # of the "[func]" construct, so we need to support that too.  In order to
     # get this right we have to substitute quoted list elements differently
@@ -1758,7 +1758,7 @@ proc python_version_at_least { major minor } {
 		<= [list $python_version_major $python_version_minor]]
 }
 
-# Return 1 if tcl version used is at least MAJOR.MINOR.PATCHLEVEL.
+# Return 1 if the Tcl version used is at least MAJOR.MINOR.PATCHLEVEL.
 proc tcl_version_at_least { major minor {patchlevel 0} } {
     set current_version [package require Tcl]
     set min_version "$major.$minor.$patchlevel"
@@ -2687,7 +2687,7 @@ proc gdb_file_cmd { arg {kill_flag 1} } {
 }
 
 # The expect "spawn" function puts the tty name into the spawn_out
-# array; but dejagnu doesn't export this globally.  So, we have to
+# array; but DejaGnu doesn't export this globally.  So, we have to
 # wrap spawn with our own function and poke in the built-in spawn
 # so that we can capture this value.
 #
@@ -3289,7 +3289,7 @@ proc transparent_uplevel { body } {
 #
 # About test prefixes:
 #
-# $pf_prefix is the string that dejagnu prints after the result (FAIL,
+# $pf_prefix is the string that DejaGnu prints after the result (FAIL,
 # PASS, etc.), and before the test message/name in gdb.sum.  E.g., the
 # underlined substring in
 #
@@ -3376,7 +3376,7 @@ proc foreach_with_prefix {var list body} {
     }]
 }
 
-# Like TCL's native proc, but defines a procedure that wraps its body
+# Like Tcl's native proc, but defines a procedure that wraps its body
 # within 'with_test_prefix "$proc_name" { ... }'.
 proc proc_with_prefix {name arguments body} {
     # Define the advertised proc.
@@ -3648,7 +3648,7 @@ proc with_gdb_cwd { dir body } {
 #
 # 1) If you want to use, for example, "(foo)" as the prompt you must pass it
 # as "(foo)", and not the regexp form "\(foo\)" (expressed as "\\(foo\\)" in
-# TCL).  PROMPT is internally converted to a suitable regexp for matching.
+# Tcl).  PROMPT is internally converted to a suitable regexp for matching.
 # We do the conversion from "(foo)" to "\(foo\)" here for a few reasons:
 #   a) It's more intuitive for callers to pass the plain text form.
 #   b) We need two forms of the prompt:
@@ -3785,9 +3785,9 @@ proc with_spawn_id { spawn_id body } {
     }
 }
 
-# DejaGNU records spawn ids in a global array and tries to wait for
+# DejaGnu records spawn ids in a global array and tries to wait for
 # them when exiting.  Sometimes this caused problems if gdb's test
-# suite has already waited for the particular spawn id.  And, dejagnu
+# suite has already waited for the particular spawn id.  And, DejaGnu
 # only seems to allow a single spawn id per "machine".  This proc can
 # be used to clean up after a spawn id has been closed.
 proc clean_up_spawn_id {host id} {
@@ -6153,7 +6153,7 @@ gdb_caching_proc target_is_gdbserver {} {
 # [ gdb_compile -E $ifile > $binfile.ci ]
 # source $binfile.ci
 #
-#   dejagnu target_compile says that it supports output redirection,
+#   DejaGnu target_compile says that it supports output redirection,
 #   but the code is completely different from the normal path and I
 #   don't want to sweep the mines from that path.  So I didn't even try
 #   this.
@@ -6162,11 +6162,11 @@ gdb_caching_proc target_is_gdbserver {} {
 # eval $cppout
 #
 #   I actually do this for all targets now.  gdb_compile runs the right
-#   compiler, and TCL captures the output, and I eval the output.
+#   compiler, and Tcl captures the output, and I eval the output.
 #
-#   Unfortunately, expect logs the output of the command as it goes by,
-#   and dejagnu helpfully prints a second copy of it right afterwards.
-#   So I turn off expect logging for a moment.
+#   Unfortunately, Expect logs the output of the command as it goes by,
+#   and DejaGnu helpfully prints a second copy of it right afterwards.
+#   So I turn off Expect logging for a moment.
 #
 # [ gdb_compile $ifile $ciexe_file executable $args ]
 # [ remote_exec $ciexe_file ]
@@ -6780,7 +6780,7 @@ proc gdb_compile {source dest type options} {
 	#   optimization-level option will turn off most compiler
 	#   optimizations similar to use of '-O0'
 	#
-	# The warning makes dejagnu think that compilation has failed.
+	# The warning makes DejaGnu think that compilation has failed.
 	#
 	# Furthermore, if no -O flag is passed, icx and icc optimize
 	# the code by default.  This breaks assumptions in many GDB
@@ -6859,7 +6859,7 @@ proc gdb_compile {source dest type options} {
     #   without any optimization-level option will turnoff most
     #   compiler optimizations similar to use of '-O0'
     #
-    # The warning makes dejagnu think that compilation has failed.
+    # The warning makes DejaGnu think that compilation has failed.
     #
     # Furthermore, if no -O flag is passed, Intel compilers optimize
     # the code by default.  This breaks assumptions in many GDB
@@ -7972,7 +7972,7 @@ proc_with_prefix gdb_spawn_attach_cmdline { testpid } {
     return 0
 }
 
-# Kill a progress previously started with spawn_wait_for_attach, and
+# Kill a process previously started with spawn_wait_for_attach, and
 # reap its wait status.  PROC_SPAWN_ID is the spawn id associated with
 # the process.
 
@@ -8232,14 +8232,14 @@ proc gdb_touch_execfile { binfile } {
     }
 }
 
-# Override of dejagnu's remote_upload, which doesn't handle remotedir.
+# Override of DejaGnu's remote_upload, which doesn't handle remotedir.
 
 rename remote_upload dejagnu_remote_upload
 proc remote_upload { dest srcfile args } {
     if { [is_remote $dest] && [board_info $dest exists remotedir] } {
 	set remotedir [board_info $dest remotedir]
 	if { ![string match "$remotedir*" $srcfile] } {
-	    # Use hardcoded '/' as separator, as in dejagnu's remote_download.
+	    # Use hardcoded '/' as separator, as in DejaGnu's remote_download.
 	    set srcfile $remotedir/$srcfile
 	}
     }
@@ -8587,7 +8587,7 @@ proc default_gdb_init { test_file_name } {
     # want to disable bracketed paste mode.  Versions of Readline
     # before 8.0 will not understand this and will issue a warning.
     # We tried using a $if to guard it, but Readline 8.1 had a bug in
-    # its version-comparison code that prevented this for working.
+    # its version-comparison code that prevented this from working.
     setenv INPUTRC [cached_file inputrc "set enable-bracketed-paste off"]
 
     # This disables style output, which would interfere with many
@@ -8666,7 +8666,7 @@ proc default_gdb_init { test_file_name } {
     # Also set this value for the currently running GDB.
     match_max [match_max -d]
 
-    # We want to add the name of the TCL testcase to the PASS/FAIL messages.
+    # We want to add the name of the Tcl testcase to the PASS/FAIL messages.
     set pf_prefix "[file tail [file dirname $test_file_name]]/[file tail $test_file_name]:"
 
     global gdb_prompt
@@ -8683,20 +8683,20 @@ proc default_gdb_init { test_file_name } {
     gdb_setup_known_globals
 
     if { [info procs ::gdb_tcl_unknown] != "" } {
-	# Dejagnu overrides proc unknown.  The dejagnu version may trigger in a
+	# DejaGnu overrides proc unknown.  The DejaGnu version may trigger in a
 	# test-case but abort the entire test run.  To fix this, we install a
-	# local version here, which reverts dejagnu's override, and restore
-	# dejagnu's version in gdb_finish.
+	# local version here, which reverts DejaGnu's override, and restore
+	# DejaGnu's version in gdb_finish.
 	rename ::unknown ::dejagnu_unknown
 	proc unknown { args } {
-	    # Use tcl's unknown.
+	    # Use Tcl's unknown.
 	    set cmd [lindex $args 0]
 	    unresolved "testcase aborted due to invalid command name: $cmd"
 	    return [uplevel 1 ::gdb_tcl_unknown $args]
 	}
     }
 
-    # Dejagnu version 1.6.3 and later produce an unresolved at the end of a
+    # DejaGnu version 1.6.3 and later produce an unresolved at the end of a
     # testcase if an error triggered, resetting errcnt and warncnt to 0, in
     # order to avoid errors in one test-case influencing the following
     # test-case.  Do this manually here, to support older versions.
@@ -8730,7 +8730,7 @@ proc make_gdb_parallel_path { args } {
 # directory, as seen from the build machine.  I.e., as seen from the
 # system driving DejaGnu.  (E.g., if DejaGnu is being driven by MSYS2
 # to test native Windows GDB, the "build" file names should be file
-# names TCL understands, i.e., Unix file names.)  It is OK if BASENAME
+# names Tcl understands, i.e., Unix file names.)  It is OK if BASENAME
 # is the empty string; in this case the directory is returned.
 
 proc build_standard_output_file {basename} {
@@ -8925,7 +8925,7 @@ proc standard_testfile {args} {
 }
 
 # The default timeout used when testing GDB commands.  We want to use
-# the same timeout as the default dejagnu timeout, unless the user has
+# the same timeout as the default DejaGnu timeout, unless the user has
 # already provided a specific value (probably through a site.exp file).
 global gdb_test_timeout
 if {![info exists gdb_test_timeout]} {
@@ -8983,8 +8983,8 @@ proc gdb_cleanup_globals {} {
     }
 }
 
-# Create gdb_tcl_unknown, a copy tcl's ::unknown, provided it's present as a
-# proc.
+# Create gdb_tcl_unknown, a copy of Tcl's ::unknown, provided it's present as
+# a proc.
 set temp [interp create]
 if { [interp eval $temp "info procs ::unknown"] != "" } {
     # tclint-disable-next-line command-args
@@ -9018,7 +9018,7 @@ proc gdb_finish { } {
     global known_globals
 
     if { [info procs ::gdb_tcl_unknown] != "" } {
-	# Restore dejagnu's version of proc unknown.
+	# Restore DejaGnu's version of proc unknown.
 	unproc ::unknown
 	rename ::dejagnu_unknown ::unknown
     }
@@ -9035,7 +9035,7 @@ proc gdb_finish { } {
 	set cleanfiles_host {}
     }
 
-    # Unblock write access to the banned variables.  Dejagnu typically
+    # Unblock write access to the banned variables.  DejaGnu typically
     # resets some of them between testcases.
     global banned_variables
     global banned_procedures
@@ -10131,7 +10131,7 @@ proc get_integer_valueof { exp default {test ""} } {
     return ${val}
 }
 
-# Retrieve the value of EXP in the inferior, as an hexadecimal value
+# Retrieve the value of EXP in the inferior, as a hexadecimal value
 # (using "print /x").  DEFAULT is used as fallback if print fails.
 # TEST is the test message to use.  It can be omitted, in which case
 # a test message is built from EXP.
@@ -11115,7 +11115,7 @@ proc gdb_stdin_log_write { message {type standard} } {
     flush $in_file
 }
 
-# Write the command line used to invocate gdb to the cmd file.
+# Write the command line used to invoke gdb to the cmd file.
 
 proc gdb_write_cmd_file { cmdline } {
     set logfile [standard_output_file_with_gdb_instance gdb.cmd]
@@ -11490,7 +11490,7 @@ proc tuiterm_env { } {
     load_lib tuiterm.exp
 }
 
-# Dejagnu has a version of note, but usage is not allowed outside of dejagnu.
+# DejaGnu has a version of note, but usage is not allowed outside of DejaGnu.
 # Define a local version.
 proc gdb_note { message } {
     verbose -- "NOTE: $message" 0

base-commit: 036d8f79dfc293bed210e989783bcf0da47332a9
-- 
2.51.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23 13:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 13:47 [pushed] [gdb/testsuite] Fix typos in lib/gdb.exp Tom de Vries

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