endif
# With check-single, if TESTS was expanded to "no-matching-tests-found" then
-# this will be passed to DejaGnu, resuling in an error. With check-parallel
+# this will be passed to DejaGnu, resulting in an error. With check-parallel
# in the same situation, we avoid invoking DejaGnu, and instead just call
# the check/no-matching-tests-found rule (which prints a helpful message).
#
2,4,6,8,12,16,and 20 bytes. Same for structure return of all those
sizes ("return", "finish", and call function).
-Get crossload tests to use --enable-targets and reenable them.
+Get crossload tests to use --enable-targets and re-enable them.
corefile.exp:
Test ability to run program when there is a core target, then go
# override our definitions.
load_lib mi-support.exp
-# Overriden in order to start a "gdbserver --multi" instance whenever
+# Overridden in order to start a "gdbserver --multi" instance whenever
# GDB is started. Note nothing is needed for gdb_exit, since
# gdbserver is started with --once, causing it to exit once GDB
# disconnects.
return 0
}
-# Overriden in order to set the remote exec-file whenever a file is
+# Overridden in order to set the remote exec-file whenever a file is
# loaded to gdb.
#
if { [info procs extended_gdbserver_gdb_file_cmd] == "" } {
# To be addressed or set in your baseboard config file:
#
# set_board_info gdb_protocol "remote"
-# Unles you have a gdbserver that uses a different protocol...
+# Unless you have a gdbserver that uses a different protocol...
#
# set_board_info use_gdb_stub 1
# This tells the rest of the test suite not to do things
# like "run" which don't work well on remote targets.
#
# set_board_info gdb,do_reload_on_run 1
-# Unles you have a gdbserver that can handle multiple sessions.
+# Unless you have a gdbserver that can handle multiple sessions.
#
# set_board_info noargs 1
# Set this if the board does not support passing arguments to the
# Neither the traditional gdbserver nor the one in libremote
# can presently capture stdout and relay it to GDB via the
# 'O' packet. This means that tests involving printf will
-# fail unles you set this varibale in your baseboard
+# fail unless you set this variable in your baseboard
# configuration file.
#
# set_board_info gdb,no_hardware_watchpoints 1
-# Unles you have a gdbserver that supports hardware watchpoints.
+# Unless you have a gdbserver that supports hardware watchpoints.
# FIXME: gdb should detect if the target doesn't support them,
# and fall back to using software watchpoints.
#
gdb_test -nonl {output $$2[3]} $re \
"output partially available Large_3d_Array row from history"
- # These go straigth to the inferior.
+ # These go straight to the inferior.
set re \
[string_to_regexp \
"((33, 34, 35, 36), (37, 38, 39, 40),\
mi_clean_restart $::testfile
###################################################
-# 2. Try catching conditionnal failed assertion. #
+# 2. Try catching conditional failed assertion. #
###################################################
# Here is the scenario:
disp_step_func "test_rip_vex3"
# Confirm the instruction's expected side effects. It should have
- # modifed the 'var128' variable.
+ # modified the 'var128' variable.
gdb_test "p /x (unsigned long long \[2\]) var128" \
" = \\{0x1122334455667788, 0x0\\}" \
"var128 has expected value after"
# instruction. Executing this instruction will enable the x87 unit,
# causing the kernel to place the default values into all registers.
# After this GDB will no longer supply the default values itself but
- # will instread read the values out of the xsave buffer.
+ # will instead read the values out of the xsave buffer.
gdb_test "stepi" "fwait" "step to FWAIT instruction"
gdb_test "stepi" "nop" "step past FWAIT instruction"
; Verify that store of the non-callee saved registers is not part of prologue.
; Repeat this test for multiple registers, to check boundaries. Also check
; with both ST and PUSH (aka ST.AW). We have to use multiple functions for
-; this, because GDB would stop analisys at the first instruction that is not
+; this, because GDB would stop analysis at the first instruction that is not
; part of prologue.
.align 4
add sp,sp,8
; BLINK is saved, but after an instruction that is not part of prologue.
-; Currently arc_analyze_prologue stops analisys at the first intstruction
+; Currently arc_analyze_prologue stops analysis at the first instruction
; that is not a part of prologue. This might be not the best way, but it is
; what it is right now, so this test confirms this.
add sp,sp,12
j [blink]
-; Two stores at the same adddress. GDB should report only the R14.
+; Two stores at the same address. GDB should report only the R14.
.align 4
double_store:
#endif
push {r7}
push {r1} /* Push the right address so that PC will get it. */
- /* Push the wrong address so r0-r7 will get the wrong a ddress. If PC
+ /* Push the wrong address so r0-r7 will get the wrong address. If PC
is set from any of them, we can get a FAIL. */
push {r2}
push {r2}
"Breakpoint.*at.* file .*$srcfile, line.*" \
"break test_str_pc_end"
- # Set breakpoint on both lables pc_offset_right and pc_offset_wrong
+ # Set breakpoint on both labels pc_offset_right and pc_offset_wrong
gdb_test "break *pc_offset_right" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
"break pc_offset_right"
gdb_continue_to_breakpoint "continue to test_str_pc" \
".*str.*pc\,.*\[sp, #-4\].*"
- # If breakpoint on lable pc_offset_wrong is hit, that means the offset
+ # If breakpoint on label pc_offset_wrong is hit, that means the offset
# computed in displaced stepping is different from offset computed
# without displaced stepping. Report a failure.
gdb_continue_to_breakpoint "continue to pc_offset_right" \
" ret\n");
/* The purpose of this function is to verify that, during prologue
- skip, GDB does not follow a jump at the beginnning of the "real"
+ skip, GDB does not follow a jump at the beginning of the "real"
code. */
asm(".text\n"
set msg "single-stepping through \"${func}\" ($id)"
- # Arbitrarily limit the maximium number of steps made to avoid looping
+ # Arbitrarily limit the maximum number of steps made to avoid looping
# indefinitely in the case something goes wrong, increase as (if)
# necessary.
set count 8
represented in the machines native byte order when words are fetched 32-bits
at a time. The first .long is for the 32-bit prefix word and the second
.long is for the 32-bit suffix word thus making the word order independent
- of the machine Endianes. The use of the .quad statement on Big Endian
+ of the machine Endianness. The use of the .quad statement on Big Endian
results in the disassembler fetching the 32-bit suffix before the 32-bit
prefix word. */
.long 0x06000000 /* paddi r0,r1,0 */
# Test access to special purpose registers PPR and DSCR. The test
# inferior writes to these registers, we check that GDB reads the same
-# values, then write to the registers trough GDB, step once, and check
+# values, then write to the registers through GDB, step once, and check
# again if we read back the same values.
require {istarget "powerpc*-*-linux*"}
clean_restart $testfile
-# Check if the disassemble ouput is correct.
+# Check if the disassemble output is correct.
gdb_test "x /i main+8" \
"$hex <main\\+8>:\[ \t\]+bx\[ \t\]+lr" \
"disassemble thumb instruction, 1st try"
# proceed if FLEN equals XLEN, otherwise we'd need more test XML
# files.
if { $flen != 1 && $flen != $xlen } {
- unsupport "unknown xlen/flen combination"
+ unsupported "unknown xlen/flen combination"
return
}
}
}
- # Record what is the default endianess. As an
+ # Record what is the default endianness. As an
# optimization, we'll skip testing the manual "set
# endian DEFAULT" case.
set test "show endian"
proc args_test { name arglist {re_esc_list {}} {re_no_esc_list {}} } {
- # If either of the two regexp lists are not specificed then we can
+ # If either of the two regexp lists are not specified then we can
# use an earlier argument value instead.
#
# For the first regexp list, if this is missing then we use the
# This file is part of the gdb testsuite
#
-# tests for all the assignemnt operators
+# tests for all the assignment operators
# with mixed types and with int type variables
#
gdb_test "start" "Don't know how to run.*" "start no longer works"
}
-# Reenable auto-connecting to the native target. Plain "start" should
+# Re-enable auto-connecting to the native target. Plain "start" should
# start working again.
gdb_test_no_output "set auto-connect-native-target on"
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Tools which use the BFD library will output error messages of the
-# form "BFD: some messsage" when a problem with the file upon which it
+# form "BFD: some message" when a problem with the file upon which it
# operating is found. E.g. an actual message (modulo some shortening
# of the pathname) from this test is:
#
# very large values. Since GDB uses a 64-bit off_t (when
# possible) it shouldn't have this problem. Assume that
# things are going to work. Without this assumption the test
- # is skiped on systems (such as i386 GNU/Linux with patched
+ # is skipped on systems (such as i386 GNU/Linux with patched
# kernel) which do pass.
pass "check core size"
set core_ok 1
}
}
-# If we're using a remote target then conditions could be evaulated
+# If we're using a remote target then conditions could be evaluated
# locally on the host, or on the remote target. Otherwise, conditions
# are always evaluated locally.
#
gdb_test "print \$commands_ran" " = void" \
"breakpoint commands didn't run"
- # Reenable the breakpoint, and check that it gets hit and accounted
+ # Re-enable the breakpoint, and check that it gets hit and accounted
# for this time.
- gdb_test "enable \$bpnum" "" "reenable breakpoint"
+ gdb_test "enable \$bpnum" "" "re-enable breakpoint"
gdb_test "continue" "Breakpoint .*" \
"stop at permanent breakpoint thrice"
*/
-/* Useful abreviations. */
+/* Useful abbreviations. */
typedef void t;
typedef char tc;
typedef short ts;
# Given N (0..25), return the corresponding alphabetic letter in lower
-# or upper case. This is ment to be i18n proof.
+# or upper case. This is meant to be i18n proof.
proc i2a { n } {
return [string range "abcdefghijklmnopqrstuvwxyz" $n $n]
# Check that "return" works.
# GDB must always force the return of a function that has
- # a struct result. Dependant on the ABI, it may, or may not be
+ # a struct result. Dependent on the ABI, it may, or may not be
# possible to store the return value in a register.
# The relevant code looks like "L{n} = fun{n}()". The test forces
# GDB currently screws up the passing of function parameters for
# ABIs that use function descriptors. Instead of passing the
- # address of te function descriptor, GDB passes the address of the
+ # address of the function descriptor, GDB passes the address of the
# function body. This results in the called function treating the
# first few instructions of the function proper as a descriptor
# and attempting a jump through that (a totally random address).
}
with_test_prefix "relative path" {
- # Generate a core file using relative a path. We ned to work
+ # Generate a core file using relative a path. We need to work
# around the core_find proc a little here. The core_find proc
# creates a sub-directory using standard_output_file and runs the
# test binary from inside that directory.
#test overlay
gdb_test "overlay" "List of \"overlay\" subcommands:.*"
-#test a non-existant overlay subcommand
+#test a non-existent overlay subcommand
gdb_test "overlay on" "Undefined overlay command.* Try \"help overlay\"."
gdb_test_no_output "overlay manual" "overlay manual #1"
gdb_test_no_output "overlay auto"
char c = 'Q';
int *p_i = &i;
float *p_f = &f;
- char *p_c = "rubarb and fries";
+ char *p_c = "rhubarb and fries";
/* Need some code here to set breaks on.
*/
# This test relies on finding the dynamic linker library, and is
# currently written assuming Linux.
if { ![istarget *-linux*] } {
- unsupport "cannot find dynamic linker library on this target"
+ unsupported "cannot find dynamic linker library on this target"
return
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test inappropriate offseting of multiple sections with the same name.
+# Test inappropriate offsetting of multiple sections with the same name.
# When kept in object file (before final executable link) it still works.
# When separate debug info file is not used it still works.
# When the ELF symbol table is kept in the main binary it still works.
set p2 "fail"
if { "$what" == "enable" } {
- # Set varibale values for enable command.
+ # Set variable values for enable command.
set oppos "disable"
set oppos_res "n"
set what_res "y"
Define TestStrings, TestStringsH, and TestStringsW to test utf8, utf16,
and utf32 strings respectively.
To avoid compile errors due to old compiler mode, we don't use string
-literals. The content of each array is the same as followings:
+literals. The content of each array is the same as the following:
const char TestStrings[] = {
"ABCD"
gdb_test "print (void*) (~((long long)(unsigned long) -1) - 1)" \
"warning: value truncated.*" "truncate (void*) 0xffffffff00000000 - 1"
-# String concatentation.
+# String concatenation.
test_expr "print \"x\" \"y\"" "${::valnum_re} = \"xy\""
test_expr "print \"x\" \"y\" \"z\"" "${::valnum_re} = \"xyz\""
if (ret >= 0)
close (ret);
stop ();
- /* Opening nonexistant file */
+ /* Opening nonexistent file */
errno = 0;
ret = open (NONEXISTENT, O_RDONLY);
printf ("open 4: ret = %d, errno = %d %s\n", ret, errno,
gdb_test continue \
"Continuing\\..*open 4:.*ENOENT$stop_msg" \
-"Opening nonexistant file returns ENOENT"
+"Opening nonexistent file returns ENOENT"
gdb_test "continue" ".*" ""
gdb_test continue \
"Continuing\\..*stat 4:.*ENOENT$stop_msg" \
-"Stat a nonexistant file returns ENOENT"
+"Stat a nonexistent file returns ENOENT"
gdb_test continue \
"Continuing\\..*fstat 1:.*OK$stop_msg" \
gdb_test continue \
"Continuing\\..*rename 5:.*ENOENT$stop_msg" \
-"Renaming a nonexistant file returns ENOENT"
+"Renaming a nonexistent file returns ENOENT"
gdb_test continue \
"Continuing\\..*unlink 1:.*OK$stop_msg" \
gdb_test continue \
"Continuing\\..*unlink 3:.*ENOENT$stop_msg" \
-"Unlinking a nonexistant file returns ENOENT"
+"Unlinking a nonexistent file returns ENOENT"
gdb_test continue \
"Continuing\\..*time 1:.*OK$stop_msg" \
set allow_float_test [allow_float_test]
-# re-use the program from the "return2" test.
+# reuse the program from the "return2" test.
if { [prepare_for_testing "failed to prepare" finish return2.c] } {
return
}
".*Required frame unwinder may have been disabled, see 'maint info frame-unwinders'.*" \
"no suitable unwinders should be found"
-# Reenable all unwinders.
+# Re-enable all unwinders.
gdb_test_no_output "maint frame-unwinder enable -all"
check_unwinder_class "\\w+" "Y" \
"all unwinders should be re-enabled"
# watched (myrec.x) gets updated. This is the instruction where we
# expect to receive a watchpoint notification when we do the "stepi"
# below. However, having the breakpoint at the same location as this
-# intruction can possibly interfere with our testcase, as stepping
+# instruction can possibly interfere with our testcase, as stepping
# over the breakpoint in order to get past it may incorrectly lead
# to the debugger missing the watchpoint hit. This would be a bug
# in GDB, but this is not the bug that we are trying to test here.
# By the nature of the bug, it could pass if the C compiler is not smart
# enough to implement 'abort' as a noreturn function. This is okay.
# The real point is that users often put breakpoints on noreturn
-# functions such as 'abort' or some kind of exitting function, and those
+# functions such as 'abort' or some kind of exiting function, and those
# breakpoints should work.
gdb_test_multiple "backtrace" "backtrace from abort" {
"set value-history\[3\] using \$3"
gdb_test "print \$\$" "\\\$4 = 102" \
- "print value-history\[MAX-1\] using inplicit index \$\$"
+ "print value-history\[MAX-1\] using implicit index \$\$"
gdb_test "print \$\$" "\\\$5 = 103" \
"print value-history\[MAX-1\] again using implicit index \$\$"
if {!$resolver_debug && !$final_debug} {
# Do the test that is supposed to succeed first, to make sure
- # elf_gnu_ifunc_record_cache is empty. This excercises PR28224.
+ # elf_gnu_ifunc_record_cache is empty. This exercises PR28224.
gdb_test "p (int) gnu_ifunc (3)" " = 4"
gdb_test "p gnu_ifunc()" \
return
}
-# Get endianess for the scalar->vector casts
+# Get endianness for the scalar->vector casts
set endian [get_endianness]
# Test printing of character vector types
return
}
-# The ouput of mktemp contains an end of line, remove it.
+# The output of mktemp contains an end of line, remove it.
set cache_dir [string trimright $cache_dir \r\n]
test_cache_disabled $cache_dir "before populate"
#include <string.h>
#include "attributes.h"
-/* Useful abreviations. */
+/* Useful abbreviations. */
typedef char tc;
typedef short ts;
typedef int ti;
# call that will never return. GDB should eventually timeout and stop
# the inferior.
#
-# When UNWIND is "off" the inferior wil be left in the frame where the
+# When UNWIND is "off" the inferior will be left in the frame where the
# timeout occurs, otherwise, when UNWIND is "on", GDB should unwind
# back to the frame where the inferior call was made.
proc run_test { target_async target_non_stop non_stop unwind } {
# As with the previous test, the double quotes are lost when the
# arguments are sent through gdbserver_start, as such, this test isn't
# going to work when using the native-gdbserver board, hence we set
-# the second arguemnt to 'false'.
+# the second argument to 'false'.
lappend test_desc_list [list "test three" \
false \
{ "\&" "\<" "\#" "\^" "\>" "\$" "\`" } \
#ifdef JIT_H
#error "We don't include jit.h directly since we'd like the jit-reader unit \
tests to break if we make ABI incompatible changes to the structures \
- re-declared here."
+ redeclared here."
#endif
#ifndef JIT_PROTOCOL_H
{
/* We open a file and move file pos from 0 to 1. We set the checkpoint
when pos is 0, and restart it when pos is 1. This makes sure that
- restarting the checkpoint excercises calling lseek in the
+ restarting the checkpoint exercises calling lseek in the
inferior. */
/* Open a file. */
}
# Make three copies of the single source file in the build directory
-# based source tree. Two of the source files are modified slighly to
+# based source tree. Two of the source files are modified slightly to
# make the output of 'list' unique for each copy.
file copy "$srcdir/$subdir/$srcfile" "$file_main"
copy_and_update_source_file $file_a "3"
".*" \
"$last_linenum\\s+\[^\r\n\]+"]
-# Now list using a more acurate filename, we should only get a single
+# Now list using a more accurate filename, we should only get a single
# result.
gdb_test "list a/foo.c:$linenum" \
[multi_line \
gdb_test "list list0.c:foo" "Function \"foo\" not defined in .*list0.c" "list filename:function; wrong filename rejected"
- gdb_test "list foobar.c:main" "No source file named foobar.c.|Location not found" "list filename:function; nonexistant file"
+ gdb_test "list foobar.c:main" "No source file named foobar.c.|Location not found" "list filename:function; nonexistent file"
- gdb_test "list list0.h:foobar" "Function \"foobar\" not defined in \"list0.h\"." "list filename:function; nonexistant function"
+ gdb_test "list list0.h:foobar" "Function \"foobar\" not defined in \"list0.h\"." "list filename:function; nonexistent function"
}
# Follows tests that require execution.
# Build source listing pattern based on a line range spec string. The
-# range can be specificed as "START-END" indicating all lines in range
+# range can be specified as "START-END" indicating all lines in range
# (inclusive); or just "LINE", indicating just that line.
proc build_pattern { range_spec } {
# COMMAND is the actual list command, including arguments. LISTSIZE1
# and LISTSIZE2 are the listsizes set just before and after running
# the program to the stop point. COMMAND is issued twice. The first
-# time, the lines specificed by LINERANGE1 are expected; the second
+# time, the lines specified by LINERANGE1 are expected; the second
# time, the lines specified by LINERANGE2 are expected.
proc test_list {command listsize1 listsize2 linerange1 linerange2} {
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test the case where we have so many completions that we require the
-# completions hash table within GDB to grow. Make sure that afte the
+# completions hash table within GDB to grow. Make sure that after the
# hash table has grown we try to add duplicate entries into the
# hash. This checks that GDB doesn't corrupt the hash table when
# resizing it.
#
# In this case we create a test with more functions than the default
-# number of entires in the completion hash table (which is 200), then
+# number of entries in the completion hash table (which is 200), then
# complete on all function names.
#
# GDB will add all the function names from the DWARF, and then from
# We don't want to stop gathering completions too early.
gdb_test_no_output "set max-completions unlimited"
-# Collect all possible completions, and check for duplictes.
+# Collect all possible completions, and check for duplicates.
set completions [capture_command_output "complete break func_" ""]
set duplicates 0
foreach {-> name} [regexp -all -inline -line {^break (\w+\S*)} $completions] {
gdb_test "disable mem 7 8" \
"No memory region number 7.*No memory region number 8." \
- "disable non-existant regions"
+ "disable non-existent regions"
#
# Test delete
}
gdb_test "delete mem 8" "No memory region number 8." \
- "delete non-existant region"
+ "delete non-existent region"
#
# Test overlapping checking
# pass "illegal pointer assignment rejected"
# }
# -re ".*$gdb_prompt $" { fail "illegal pointer assignment rejected" }
-# timeout { fail "(timeout) ilegal pointer assignment rejected" }
+# timeout { fail "(timeout) illegal pointer assignment rejected" }
# }
#send_gdb "print v_unsigned_int_pointer == v_double_pointer\n"
#send_gdb "print v_unsigned_int_pointer = v_double_pointer\n"
#gdb_expect {
# -re ".*.*$gdb_prompt $" {
-# pass "ilegal pointer assignment rejected"
+# pass "illegal pointer assignment rejected"
# }
# -re ".*$gdb_prompt $" { fail "illegal pointer assignment rejected" }
# timeout { fail "(timeout) illegal pointer assignment rejected" }
# When the inferior continued, and eventually returned to the dummy
# frame, it would try to execute instruction from the dummy frame
# (which for most, or even all, targets, is on the stack), and then
-# experience undefined behaviuor, often a SIGSEGV.
+# experience undefined behaviour, often a SIGSEGV.
standard_testfile .c
gdb_test_no_output "set remote exec-file prog2"
}
-# Check that "show remote exec-file" diplays each inferior's
+# Check that "show remote exec-file" displays each inferior's
# exec-file.
with_test_prefix "show inf 1" {
"Return value type not available for selected stack frame\\.\r\nPlease use an explicit cast of the value to return\\." \
"return from function with no debug info without a cast"
- # Cast of the result to the proper width must be done explicitely.
+ # Cast of the result to the proper width must be done explicitly.
gdb_test "return ($type) -1" "#0 .* main \\(.*" \
"return from function with no debug info with a cast" \
"Make selected stack frame return now\\? \\(y or n\\) " "y"
# The test doesn't work when the remote target uses the
# synchronous remote protocol, because GDB can't kill the
# remote inferior while it is running, when we "run" or
- # "attach" again. When aswering "yes" to the "Start it from
+ # "attach" again. When answering "yes" to the "Start it from
# the beginning?" question, we otherwise get:
#
# Cannot execute this command while the target is running. Use the
# Note, we don't pass a binfile to clean_restart because we need to
# avoid gdb_load here. With remote targets, gdb_load connects to the
-# remote target, and we specificaly want the following tests to run
+# remote target, and we specifically want the following tests to run
# before the program is started.
clean_restart
gdb_file_cmd $binfile
"list using location inside included file"
# Try the same, but this time with a breakpoint. We need to exit
-# GDB to make sure that we havn't loaded the full symbols yet when
+# GDB to make sure that we haven't loaded the full symbols yet when
# we test the breakpoint insertion.
clean_restart $testfile
#
# It mimics how a bug with psymtab sharing was initially found:
#
-# 1. Load the test file twice, such that the second objfile re-uses the
+# 1. Load the test file twice, such that the second objfile reuses the
# per_bfd object created for the first objfile.
# 2. Run to some point where in the backtrace there is a frame for a
# function that's in a CU that's not yet read in.
return
}
-# Load $binfile a second time. The second created objfile will re-use the
+# Load $binfile a second time. The second created objfile will reuse the
# partial symtabs created by the first one.
if { [gdb_file_cmd $binfile] != 0 } {
fail "file command failed"
gdb_test "continue" "Breakpoint.*pc(\r\n| *)=> [at_segv] .*" \
"${name}; continue to breakpoint at fault"
- # Now single step the faulted instrction at that breakpoint.
+ # Now single step the faulted instruction at that breakpoint.
gdb_test "stepi" \
"Program received signal ${signame}.*pc(\r\n| *)=> [at_segv] .*" \
"${name}; stepi fault"
gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
gdb_test "handle SIGBUS" "SIGBUS.*Yes.*Yes.*Yes.*Bus error"
-# For the given signal type, check that: the SIGSEGV occures; a
+# For the given signal type, check that: the SIGSEGV occurs; a
# backtrace from the SEGV works; the sigsegv is delivered; a backtrace
# through the SEGV works.
validate_backtrace
# Goes to handler using ENTER_CMD, runs IN_HANDLER while in the signal
-# hander, and then steps out of the signal handler using EXIT_CMD.
+# handler, and then steps out of the signal handler using EXIT_CMD.
proc advance { enter_cmd in_handler_prefix in_handler exit_cmd } {
global gdb_prompt inferior_exited_re
with_test_prefix "$cmd to handler" {
restart
- # Use the real-time itimer, as otherwize the process never gets
+ # Use the real-time itimer, as otherwise the process never gets
# enough time to expire the timer.
gdb_test_no_output "set itimer = itimer_real"
with_test_prefix "$cmd to handler entry" {
restart
- # Use the real-time itimer, as otherwize the process never gets
+ # Use the real-time itimer, as otherwise the process never gets
# enough time to expire the timer.
gdb_test_no_output "set itimer = itimer_real"
with_test_prefix "$cmd over handler" {
restart
- # Use the real-time itimer, as otherwize the process never gets
+ # Use the real-time itimer, as otherwise the process never gets
# enough time to expire the timer.
gdb_test_no_output "set itimer = itimer_real"
gdb_test_no_output "set displaced-stepping $displaced"
- # Use the real-time itimer, as otherwize the process never gets
+ # Use the real-time itimer, as otherwise the process never gets
# enough time to expire the timer.
gdb_test_no_output "set itimer = itimer_real"
gdb_test_no_output "set displaced-stepping $displaced"
- # Use the real-time itimer, as otherwize the process never gets
+ # Use the real-time itimer, as otherwise the process never gets
# enough time to expire the timer.
gdb_test_no_output "set itimer = itimer_real"
gdb_test_no_output "set displaced-stepping $displaced"
- # Use the real-time itimer, as otherwize the process never gets
+ # Use the real-time itimer, as otherwise the process never gets
# enough time to expire the timer.
gdb_test_no_output "set itimer = itimer_real"
"echo test source options.*" \
"source -v -s"
-# Test sourcing a non-existant file, both when the source command
+# Test sourcing a non-existent file, both when the source command
# comes from the a command entered at the GDB prompt, and when
# it comes from a script being sourced.
gdb_test "source for-sure-nonexistant-file" \
# Count the number of probes of TYPE (either 'stap' or 'dtrace'),
# from provider matching PROVIDER, with a name matching NAME, and from
-# an objec file matching OBJECT.
+# an object file matching OBJECT.
#
# The OBJECT is optional, in which case all objects will be matched.
#
# the contents of MSG, first, we need to calculate the total length of
# each line, as seen in GDB's output. For this we need to get the sum
# of the lengths of each TEXT part. With this length we can then
- # calculate the ammount of padding needed for a given terminal width.
+ # calculate the amount of padding needed for a given terminal width.
#
# The second use of MSG is to build the regexp that is used to actually
# match GDB's output. For this we use STYLE to add escape sequences to
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* Useful abreviations. */
+/* Useful abbreviations. */
typedef void t;
typedef char tc;
typedef short ts;
}
# Given N (0..25), return the corresponding alphabetic letter in lower
-# or upper case. This is ment to be i18n proof.
+# or upper case. This is meant to be i18n proof.
proc i2a { n } {
return [string range "abcdefghijklmnopqrstuvwxyz" $n $n]
# Check that "return" works.
# GDB must always force the return of a function that has
- # a struct result. Dependant on the ABI, it may, or may not be
+ # a struct result. Dependent on the ABI, it may, or may not be
# possible to store the return value in a register.
# The relevant code looks like "L{n} = fun{n}()". The test forces
# Create a copy of STR with all the '\033' characters removed.
# Then compare string lengths to get a count of the '\033'
- # charactes present in STR.
+ # characters present in STR.
regsub -all "\033" $str {} stripped
set count [expr {[string length $str] - [string length $stripped]}]
# sysroot.
#
# Start GDB, set the sysroot, and then load the executable, ensure GDB
-# finds the debug information, which must have happened by lookin in
+# finds the debug information, which must have happened by looking in
# the sysroot.
proc_with_prefix lookup_via_build_id {} {
set filename ${::binfile}_1
#
# Copy the executable into the sysroot and then start GDB, set the
# sysroot, and load the executable. Check that GDB finds the debug
-# information, which must have happened by lookin in the sysroot.
+# information, which must have happened by looking in the sysroot.
proc_with_prefix lookup_via_debuglink {} {
set filename ${::binfile}_2
if { [build_executable "build exec" ${filename} $::srcfile \
gdb_test "help" "List of classes of commands:.*"
}
-with_test_prefix "redirect logging and debuging" {
+with_test_prefix "redirect logging and debugging" {
gdb_test_no_output "set logging redirect on"
gdb_test_no_output "set logging debugredirect on"
gdb_test "set logging enabled on" \
include_dir "${srcdir}/${subdir}"
file_name "$srcfile" 1
- # Generate a line table program. This mimicks clang-13's behavior
+ # Generate a line table program. This mimics clang-13's behavior
# of adding some !is_stmt at the end of a loop line, making until
# not work properly.
program {
return 1
}
-# Watch WIDTH bytes at BASE + OFFSET. CMD specifices the specific
+# Watch WIDTH bytes at BASE + OFFSET. CMD specifies the specific
# type of watchpoint to use. If CMD is "hbreak", WIDTH is ignored.
# The HW_WP_P flag tells us if hardware watchpoints are enabled or
# not.
/* Setting a breakpoint on an instruction after an instruction triggering a
watchpoint makes it ambiguous which one will be reported.
- Insert a dummy instruction inbetween to make sure the watchpoint gets
+ Insert a dummy instruction in between to make sure the watchpoint gets
reported. */
volatile_dummy = 1;
for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} {
set test "$rwatch data.u.size1\[$wpoffset\]"
set wpnum ""
- # Initialize the result incase the test fails.
+ # Initialize the result in case the test fails.
set wpoffset_to_wpnum($wpoffset) 0
gdb_test_multiple $test $test {
-re "$rwatch_exp (${::decimal}): .*\r\n$gdb_prompt $" {
gdb_test {watch $pc} "^(?:Hardware w|W)atchpoint $::decimal: .pc"
gdb_test_no_output "disable \$bpnum" "disable watchpoint `\$pc'"
- gdb_test_no_output "enable \$bpnum" "reenable watchpoint `\$pc'"
+ gdb_test_no_output "enable \$bpnum" "re-enable watchpoint `\$pc'"
gdb_test "info watchpoint \$bpnum" \
".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+.pc.*" \
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test callling a method on a variable that has been put in a
+# Test calling a method on a variable that has been put in a
# register.
require allow_cplus_tests
# Some convenience variables for this test
set DEC {[0-9]}; # a decimal number
-set HEX {[0-9a-fA-F]}; # a hexidecimal number
+set HEX {[0-9a-fA-F]}; # a hexadecimal number
set CONVAR "\\\$$DEC+"; # convenience variable regexp
set ADDR "0x$HEX+"; # address
# Check that disabling an invalid breakpoint location range does not
# cause unexpected behavior.
gdb_test "disable 2.6-7" "Bad breakpoint location number '6'" \
- "disable an unvalid location breakpoint range"
+ "disable an invalid location breakpoint range"
gdb_test "info break" [make_info_breakpoint_reply_re y y y y y y] \
"breakpoint info disable 2.6-7"
# "catch catch" catchpoint ended up with multiple locations. This
# testcase exercises that scenario by building the binary with
# -static-libgcc/-static-libstdc++ and a shared library that depends
-# on the libstc++.so DSO (which is how GDB was built and revealed the
+# on the libstdc++.so DSO (which is how GDB was built and revealed the
# bug), and vice versa.
require allow_shlib_tests
{"free_inline_func" "FIF" {= \{void \(void\)\} $hex <free_inline_func>}}
}
-# A list of all the static varibles defined in each scope. The first
+# A list of all the static variables defined in each scope. The first
# column is the name of the variable, without the prefix, and the
# second column is a regex matching what printing the variable should
# output.
# Test nested type definitions. LIMIT specifies how many nested levels
# of definitions to test. If LOG is true, output the tree to the log in
-# a human-readable format mimicing the source code.
+# a human-readable format mimicking the source code.
#
# Only test when not logging. Generating source code usable by the
# test is not quite the same as how GDB outputs it.
}
/* 1. A standard conversion sequence is better than a user-defined sequence
- which is better than an elipses conversion sequence. */
+ which is better than an ellipses conversion sequence. */
class A{};
class B: public A {public: operator int (){ return 1;}};
template int cbv_container<$classname> ($classname arg);"
}
-# Generate useful statements that use a class in the debugee program
+# Generate useful statements that use a class in the debuggee program
proc generate_stmts { classprefix states {cbvfun "cbv"}} {
set classname "${classprefix}_[join $states _]"
- # Having an explicit call to the cbv function in the debugee program
+ # Having an explicit call to the cbv function in the debuggee program
# ensures that the compiler will emit necessary function in the binary.
if {[is_copy_constructible $states]} {
set cbvcall "$cbvfun<$classname> (${classname}_var);\n"
return "$cbvcall"
}
-# Generate the complete debugee program
+# Generate the complete debuggee program
proc generate_program { classes stmts } {
global ADDED
set result ".*// [string_to_regexp $expected]"
# Test whether the function/method can be "list"ed
- # with the filename pre-pended.
+ # with the filename prepended.
if {[string compare $test "xxx::${ans}::A::func"] == 0
&& !$have_gcc_45682_fixed} {
setup_xfail gcc/45682 "*-*-*"
gdb_test "print rtti_data" " = .*, data = 1\}"
# Printing a pointer into a virtual base of a larger object used to do
-# pointer adjusment directly into the value being printed, in-place
+# pointer adjustment directly into the value being printed, in-place
# (and did it wrong, too). Print the pointer, and then access the
# value history to check the pointer value is not changed. If it had
# been changed, then we'd not be able to find the real type anymore.
"char32_t is typedef"
}
- # wchar_t is a disctinct built-in type in C++03+.
+ # wchar_t is a distinct built-in type in C++03+.
if {$lang != "c"} {
gdb_test "ptype $wchar_exp" "type = wchar_t" \
"wchar_t is distinct"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* This C file provides some global variables laid out in a way
- that mimicks what the GNAT Ada compiler calls "fat pointers".
+ that mimics what the GNAT Ada compiler calls "fat pointers".
These fat pointers are the memory representation used by
the compiler to handle dynamic arrays.
/* This tests that gdb can read compressed sections. The contents
are the same as dw2-basic.S, but the .debug_abbrev section has been
- comrpessed using zlib. */
+ compressed using zlib. */
/* Dummy function to provide debug information for. */
}
}
-# Gobal used to give each generated binary a unique name.
+# Global used to give each generated binary a unique name.
set test_id 0
proc run_test { dwarf_version empty_loc entry_pc_type } {
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test different ways in which DW_AT_entry_pc can be expressed in the
-# DWARF. Also test with DWARF-4 and DWARF-5. See the individule test
+# DWARF. Also test with DWARF-4 and DWARF-5. See the individual test
# procs below precise details of what DW_AT_entry_pc forms are tested.
load_lib dwarf.exp
"block for foo has expected content"
}
-# Buidl ASM_FILE, along with the global SRCFILE into an executable called
+# Build ASM_FILE, along with the global SRCFILE into an executable called
# TESTFILE. Place a breakpoint in 'foo', run to the breakpoint, and use
# BLOCK_CHECK_FUNC to ensure the block for 'foo' is correct.
#
# | 7 | 1 | END | Y | | |
# |------|------|------|------|--------|--------|
#
-# Places a brekpoint at file 2, line 22. Previously GDB would discard
+# Places a breakpoint at file 2, line 22. Previously GDB would discard
# the line table entry for this line due to switching files for the
# file 1, line 18 non-statement line. After patching however, GDB now
# discards the file 1, line 18 entry instead, and the breakpoint at
#
# Range 'A' is a hypothetical case of how the compiler might choose to
# represent this range, this has never been seen in the wild, but is
-# an improved debug experiece over range 'B'. However, if we ever run
+# an improved debug experience over range 'B'. However, if we ever run
# in to the situation where GDB can support the range 'A' test, or
# support some real DWARF seen in the wild, then the range 'A' case
# should be dropped in favour of supporting real world cases. This is
# |------|------|------|------|--------|
#
#
-# Place the first brekpoint at file 2, line 22 and a second breakpoint
+# Place the first breakpoint at file 2, line 22 and a second breakpoint
# at file 1, line 19. A third breakpoint is placed at file 1, line
# 18, but as this line table entry will have been discarded[1] the
# third breakpoint will actually be placed at the same location as the
"check for breakpoint at ${srcfile3}"
# Line table entry for line 18 will have been discarded, so this
-# brekpoint will be at the same location as line 19.
+# breakpoint will be at the same location as line 19.
gdb_test "break ${srcfile3}:18" \
"Note: breakpoint $decimal also set at pc $hex.*"
information describes a parameter as being in a register but a more
recent (inner) frame marks the register as being undefined.
- This can arrise if the dwarf producer has the location of a parameter in
+ This can arise if the dwarf producer has the location of a parameter in
a callee clobbered register at the time of a call. Older versions of
gcc used to do this, newer versions seem to avoid this issue.
# Generate the following line table:
#
- # Index | Address | Symtab | Line | Statment
+ # Index | Address | Symtab | Line | Statement
# ------|---------|--------|------------
# 0 | A1 | F1 | 101 | X
# 1 | A2 | F2 | 201 | X
Dwarf::assemble $asm_file {
global srcfile
- # Create local varibles like BAR_SRC_* containing the line number
- # for the souce lines of 'foo' and 'bar' and 'baz'. These will be
+ # Create local variables like BAR_SRC_* containing the line number
+ # for the source lines of 'foo' and 'bar' and 'baz'. These will be
# referenced in the generated DWARF.
for { set i 1 } { $i <= 2 } { incr i } {
set bar_src_$i [gdb_get_line_number "bar line $i"]
Dwarf::assemble $asm_file {
global srcfile
- # Create local varibles BAR_SRC_* containing the line number for
- # the four souce lines of 'foo' and 'bar'. These will be
+ # Create local variables BAR_SRC_* containing the line number for
+ # the four source lines of 'foo' and 'bar'. These will be
# referenced in the generated DWARF.
for { set i 1 } { $i <= 4 } { incr i } {
set bar_src_$i [gdb_get_line_number "bar line $i"]
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test that GDB can support accesing fields of a structure if the
+# Test that GDB can support accessing fields of a structure if the
# fields have non-standard names. Specifically, if the names are
# reserved C type names like 'double', 'float', 'int', etc.
#
standard_testfile main.c -dw.S
-# We need to know the endianess in order
+# We need to know the endianness in order
# to write some of the debugging info we'd like to generate.
if {[prepare_for_testing "failed to prepare for endianness test" ${testfile} ${srcfile}]} {
return
call test_associated (associated (a_real_p, a_real))
! Setup for final tests, these are performed at the print line
- ! below. These final tests are all error conditon checks,
+ ! below. These final tests are all error condition checks,
! i.e. things that can't be compiled into Fortran.
array_1d_p => array_1d
# If this first test fails then the Fortran compiler being used uses
# different names, or maybe a completely different approach, for
# representing class like structures. The following tests are
-# cetainly going to fail.
+# certainly going to fail.
# Hence the test case is modified for flang.
if { [test_compiler_info {flang-*} f90] } {
gdb_test "print this" " = \\( a = 0, b = \\(\\(1, 2, 3\\) \\(4, 5, 6\\)\\) \\)"
"Set value-history\[3\] using \$3"
gdb_test "print \$\$" "\\\$4 = 102" \
- "Print value-history\[MAX-1\] using inplicit index \$\$"
+ "Print value-history\[MAX-1\] using implicit index \$\$"
gdb_test "print \$\$" "\\\$5 = 103" \
"Print value-history\[MAX-1\] again using implicit index \$\$"
}
-re -wrap "SIZE can only be applied to arrays" {
# Because of ifort's DWARF pointer representation we need to
- # aditionally de-reference Fortran pointers.
+ # additionally de-reference Fortran pointers.
regsub -all "\\(" $command "\(\*" command_deref
gdb_test "p $command_deref" " = $answer"
pass $gdb_test_name
}
-re -wrap "SIZE can only be applied to arrays" {
# Because of ifort's DWARF pointer representation we need to
- # aditionally de-reference Fortran pointers.
+ # additionally de-reference Fortran pointers.
gdb_test "p size (*$var, 3)" \
"DIM argument to SIZE must be between 1 and \[1-2\]"
pass $gdb_test_name
}
-re -wrap "SIZE can only be applied to arrays" {
# Because of ifort's DWARF pointer representation we need to
- # aditionally de-reference Fortran pointers.
+ # additionally de-reference Fortran pointers.
gdb_test "p size (*$var)" \
"Attempt to take contents of a not associated pointer\."
pass $gdb_test_name
\\\(1, 1, 321, 1, 1\\\)\
\\\(1, 1, 1, 1, 1\\\) .*"
-# Check type with attribute at beginn of type
+# Check type with attribute at begin of type
gdb_breakpoint [gdb_get_line_number "threev-filled"]
gdb_continue_to_breakpoint "threev-filled"
gdb_test "print threev%ivla(1)" " = 1"
gdb_test "print array2(2,1,1)=20" " = 20" \
"set array(2,2,2) to 20 in subroutine"
gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
- "print array2 in foo after it was mofified in debugger"
+ "print array2 in foo after it was modified in debugger"
gdb_test "finish" \
".*(foo\\\(sub_arr1\\\(5:10, 5:10\\\), sub_arr2\\\(10:15,10:15,10:15\\\)\\\)|foo \\\(array1=..., array2=...\\\).*)" \
gdb_test "print array2(2,1,1)=20" " = 20" \
"set array(2,2,2) to 20 in subroutine (passed fixed array)"
gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
- "print array2 in foo after it was mofified in debugger (passed fixed array)"
+ "print array2 in foo after it was modified in debugger (passed fixed array)"
# Try to access values from a fixed sub-array handled as VLA in subroutine.
gdb_test "print array2(2,1,1)=20" " = 20" \
"set array(2,2,2) to 20 in subroutine, passed sub-array"
gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
- "print array2 in foo after it was mofified in debugger, passed sub-array"
+ "print array2 in foo after it was modified in debugger, passed sub-array"
# Try to access values from a VLA passed to subroutine.
gdb_test "print array2(2,1,1)=20" " = 20" \
"set array(2,2,2) to 20 in subroutine, passed vla"
gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
- "print array2 in foo after it was mofified in debugger, passed vla"
+ "print array2 in foo after it was modified in debugger, passed vla"
"print pvla(5, 45, 20) after deassociated"
gdb_test "print pvla(7, 45, 14)" \
"no such vector element \\\(vector not associated\\\)" \
- "print pvla(7, 45, 14) after dissasociated"
+ "print pvla(7, 45, 14) after disassociated"
gdb_test "print pvla" " = <not associated>" \
"print vla1 after deassociated"
}
}
- set tst "complete non-existant function name"
+ set tst "complete non-existent function name"
send_gdb "break -function foo\t"
gdb_test_multiple "" $tst {
-re "break -function foo\\\x07" {
}
}
- set tst "complete non-existant file name"
+ set tst "complete non-existent file name"
send_gdb "break -source foo\t"
gdb_test_multiple "" $tst {
-re "break -source foo" {
}
}
- set tst "complete filename and non-existant function name"
+ set tst "complete filename and non-existent function name"
send_gdb "break -sou 3explicit.c -fun foo\t"
gdb_test_multiple "" $tst {
-re "break -sou 3explicit.c -fun foo\\\x07" {
"$tst resolved"
}
- # Test interaction of condition command and explicit linespec conditons.
+ # Test interaction of condition command and explicit linespec conditions.
clean_restart $exefile
set tst "condition_command overrides explicit linespec condition"
gdb_assert {[llength $py_regs] > 0} \
"Found at least one register from python"
gdb_assert {[llength $py_regs] == [llength $regs]} \
- "Same numnber of registers found"
+ "Same number of registers found"
set found_non_match 0
for { set i 0 } { $i < [llength $regs] } { incr i } {
class ShowInfoRepr(TestDisassembler):
"""Call the __repr__ method on the DisassembleInfo, convert the result
- to a string, and incude it in a comment in the disassembler output."""
+ to a string, and include it in a comment in the disassembler output."""
def disassemble(self, info):
comment = "\t## " + repr(info)
class ShowInfoSubClassRepr(TestDisassembler):
- """Create a sub-class of DisassembleInfo. Create an instace of this
+ """Create a sub-class of DisassembleInfo. Create an instance of this
sub-class and call the __repr__ method on it. Convert the result
- to a string, and incude it in a comment in the disassembler
+ to a string, and include it in a comment in the disassembler
output. The DisassembleInfo sub-class does not override __repr__
so we are calling the implementation on the parent class."""
class ShowResultRepr(TestDisassembler):
"""Call the __repr__ method on the DisassemblerResult, convert the
- result to a string, and incude it in a comment in the disassembler
+ result to a string, and include it in a comment in the disassembler
output."""
def disassemble(self, info):
class ShowResultStr(TestDisassembler):
- """Call the __str__ method on a DisassemblerResult object, incude the
+ """Call the __str__ method on a DisassemblerResult object, include the
resulting string in a comment within the disassembler output."""
def disassemble(self, info):
info = self.MyInfo(info, self._start, self._end, self._nop_bytes)
result = builtin_disassemble_wrapper(info)
- # Record some informaiton about the first 'nop' instruction we find.
+ # Record some information about the first 'nop' instruction we find.
if self._nop_index is None and is_nop(result.string):
self._nop_index = len(self._pass_1_length)
# The offset in the following read_memory call defaults to 0.
break
# If we still don't have a replacement candidate, then search again,
- # this time looking for an instruciton that is the same length as a
+ # this time looking for an instruction that is the same length as a
# nop instruction.
if replace_idx is None:
for idx in range(len(self._pass_1_length)):
gdb_test "python print (finishbp_default.is_valid())" "False" \
"check finishBP on default frame has been hit"
gdb_test "python print (finishbp.is_valid())" "False.*"\
- "ensure that finish bp is invalid afer normal hit"
+ "ensure that finish bp is invalid after normal hit"
# check FinishBreakpoint in main no allowed
# Grab the address of 'bar'. Hopefully this will be the same address
# as 'foo', but if not, that's not the end of the world, the test just
-# wont be quite as tough.
+# won't be quite as tough.
set bar_addr [get_hexadecimal_valueof "&bar" "UNKNOWN"]
# Now format the address of bar using the default inferior and
"Got: $bar_addr <bar>" \
"gdb.format_address for bar, while inferior 2 is selected"
-# And again, but this time, specificy the program space and
+# And again, but this time, specify the program space and
# architecture.
gdb_test "python print(\"Got: \" + gdb.format_address($bar_addr, inf2.progspace, inf2.architecture()))" \
"Got: $bar_addr <bar>" \
"Got: $bar_addr <bar>" \
"gdb.format_address for bar, while inferior 1 is selected, pass progspace and architecture"
-# Try pasing incorrect object types for program space and architecture.
+# Try passing incorrect object types for program space and architecture.
gdb_test "python print(\"Got: \" + gdb.format_address($bar_addr, inf2.progspace, inf2.progspace))" \
[multi_line \
"TypeError.*: The architecture argument is not a gdb.Architecture object" \
# Produces a potentially cut down version of $whole_big_string like GDB
# would represent it.
# $max is the maximum number of characters allowed in the string (but
-# the return value may contain more to accound for the extra quotes and
+# the return value may contain more to account for the extra quotes and
# "..." added by GDB).
proc get_cut_big_string { max } {
global whole_big_string
"test b using named arguments"
# Test the read_var function in another block other than the current
-# block (in this case, the super block). Test thar read_var is reading
+# block (in this case, the super block). Test that read_var is reading
# the correct variables of i and f but they are the correct value and type.
gdb_py_test_silent_cmd "python sb = bf1.block().superblock" "get superblock" 0
gdb_test "python print (bf1.read_var(\"i\", sb))" "1.1.*" "test i = 1.1"
# Now test read_var with a variable and block using named arguments.
gdb_test "python print (bf1.read_var(block = sb, variable = \"i\"))" "1.1.*" \
- "test i = 1.1 usign named arguments"
+ "test i = 1.1 using named arguments"
gdb_test "python print (bf1.read_var(block = sb, variable = \"f\"))" "2.2.*" \
"test f = 2.2 using named arguments"
"bt no-filter 1 no address"
gdb_test "bt 1" \
"#0 cnuf_dneThe End \\(foo=21, bar=\"Param\", fb=, bf=\{nothing = \"Foo Bar\", f = 42, s = 19\}\\) at .*py-framefilter.c.*" \
- "bt 1 no addresss"
+ "bt 1 no address"
gdb_test_no_output "set python print-stack message" \
"Set python print-stack to message for Error filter"
"-var-info-path-expression c1.car.atom.ival"
-# Regression test for a crasher that would occur when deleting a
+# Regression test for a crash that would occur when deleting a
# varobj that held an iterator that hadn't yet been completed.
# See PR varobj/28131.
mi_gdb_test "-var-create c1_again * &c1" \
gdb_test_no_output "python handler_obj.set_mode(Mode.RETURN_TRUE, \
\"$hidden_filename\", \
\"$debug_filename\")" \
- "confirgure handler"
+ "configure handler"
gdb_file_cmd $binfile
gdb_assert {$gdb_file_cmd_debug_info == "debug"} "debug info found"
gdb_test_no_output "python handler_obj.set_mode(Mode.RETURN_TRUE, \
\"$hidden_filename\", \
\"$build_id_filename\")" \
- "confirgure handler"
+ "configure handler"
# Reload the binary and check the debug information is found.
gdb_file_cmd $binfile
# Configure the handler return a filename string.
gdb_test_no_output "python handler_obj.set_mode(Mode.RETURN_STRING, \
\"$hidden_filename\")" \
- "confirgure handler"
+ "configure handler"
# Reload the binary and check the debug information is found.
gdb_file_cmd $binfile
# Register another global handler, this one raises an exception. Reload the
# debug information, the bad handler should be invoked first, which raises
-# an excetption, at which point GDB should skip further Python handlers.
+# an exception, at which point GDB should skip further Python handlers.
with_test_prefix "handler raises an exception" {
gdb_test_no_output \
"python gdb.missing_debug.register_handler(None, rhandler)"
" Foo"]
gdb_test_no_output "python handler_obj.set_mode(Mode.RETURN_FALSE)" \
- "confirgure handler"
+ "configure handler"
gdb_file_cmd $binfile
gdb_test "python print(handler_call_log)" \
# Register another global handler, this one raises an exception. Reload the
# core-file, the bad handler should be invoked first, which raises an
-# excetption, at which point GDB should skip further Python handlers.
+# exception, at which point GDB should skip further Python handlers.
with_test_prefix "handler raises an exception" {
gdb_test_no_output \
"python gdb.missing_objfile.register_handler(None, rhandler)"
" Foo"]
gdb_test_no_output "python handler_obj.set_mode(Mode.RETURN_FALSE)" \
- "confirgure handler"
+ "configure handler"
load_core_file
gdb_test "python print(handler_call_log)" \
"BasicParamPrefixWithMultiLineDoc('prefix-6')" "" \
"gdb.Parameter('prefix-6 param-1', gdb.COMMAND_NONE, gdb.PARAM_BOOLEAN)" "" \
"class BasicParamPrefixWithDocParameter(gdb.ParameterPrefix):" "" \
- " \"\"\"This is an unsused doc string.\"\"\"" "" \
+ " \"\"\"This is an unused doc string.\"\"\"" "" \
" def __init__(self, name, doc):" "" \
" super().__init__(name, gdb.COMMAND_NONE, doc)" "" \
"BasicParamPrefixWithDocParameter('prefix-7'," "" \
gdb_test_no_output "python test_color_param.value = gdb.Color('#FED210')" \
"assign test_color_param.value to #FED210"
gdb_test "python print (test_color_param.value.components)" "\\(254, 210, 16\\)" \
- "test color parameter components from RGB hex tripple value"
+ "test color parameter components from RGB hex triple value"
gdb_test "set print test-color-param 256" \
"integer 256 out of range.*" "set invalid color parameter"
gdb_test "python test_color_param.value = gdb.Color(256)" \
gdb_test_no_output "python input_text = \"this is a unique string that is unlikely to appear elsewhere 12345\"" \
"setup an input string"
gdb_test_no_output "with style enabled off -- python output_text = filename_style.apply(input_text)" \
- "create an ouput string by applying filename_style"
+ "create an output string by applying filename_style"
gdb_test_no_output "python input_text = \"a totally different string that is also, hopefully, unique\"" \
"replace the input string"
gdb_test "python print(output_text)" \
gdb_continue_to_breakpoint "Break at end for variable a" ".*Break at end.*"
gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
-# Check that we find the static sybol local to this file over the
+# Check that we find the static symbol local to this file over the
# static symbol from the second source file.
gdb_test "python print (gdb.lookup_static_symbol ('rr').value ())" "42" \
"print value of rr from main file"
gdb_test "python print (fields\[0\].name)" "a" "check structure field a name"
gdb_test "python print (fields\[1\].name)" "b" "check structure field b name"
- # Test that unamed fields have 'None' for name.
+ # Test that unnamed fields have 'None' for name.
gdb_py_test_silent_cmd "python ss = gdb.parse_and_eval('ss')" "init ss" 1
gdb_py_test_silent_cmd "python ss_fields = ss.type.fields()" \
"get fields from ss.type" 1
}
# Compare the types of different symbols from the inferior, we're
-# checking that the types of different sybols of the same declared
+# checking that the types of different symbols of the same declared
# type, are equal (in Python).
proc test_type_equality {} {
gdb_test_no_output "python evalue = gdb.history (0)"
gdb_test "python print (int (evalue))" "2"
- # Test pointer arithmethic
+ # Test pointer arithmetic
# First, obtain the pointers
gdb_test "print (void *) 2" ".*" ""
gdb_test "python obj = MyValue(b\[size_a0:\],tp)" "In MyValue.__init__" \
"convert 2nd elem of buffer to a MyValue"
gdb_test "python print(obj)" "2" \
- "check printing of MyValue when initiaized with a type"
+ "check printing of MyValue when initialized with a type"
}
# Test the history count. This must be the first thing called after
gdb_test "p a1\[6\]" ".*int &.*6" "after a1\[\]"
gdb_test "p b1\[7\]" ".*const int &.*7" "after b1\[\]"
-# Note the following test. Xmethods on dynamc types are not looked up
+# Note the following test. Xmethods on dynamic types are not looked up
# currently. Hence, even though a_ptr points to a B object, the xmethod
# defined for A objects is invoked.
gdb_test "p a_ptr->geta()" "From Python <A_geta>.*30" "after: a_ptr->geta()"
gdb_py_test_silent_cmd "set python print-stack full" \
"Set print-stack full for prompt tests" 1
-# Test prompt substituion
+# Test prompt substitution
gdb_test_multiline "prompt substitution" \
"python" "" \
}
}
-gdb_test_multiple "python" "test we ignore substitution for seconday prompts" {
+gdb_test_multiple "python" "test we ignore substitution for secondary prompts" {
-re "\r\n>$" {
pass $gdb_test_name
}
Term::command "tui disable"
send_gdb "tui enable\n"
- gdb_assert { [Term::wait_for "^$::gdb_prompt tui disable"] } "TUI renabled"
+ gdb_assert { [Term::wait_for "^$::gdb_prompt tui disable"] } "TUI re-enabled"
Term::check_box "check for python window" 0 0 80 16
}
if cleanup_properly:
# Disconnect the listeners and delete the lambda functions.
- # This removes cyclic references to SELF, and so alows SELF to
+ # This removes cyclic references to SELF, and so allows SELF to
# be deleted.
gdb.events.stop.disconnect(self._stop_listener)
gdb.events.exited.disconnect(self._exit_listener)
int
main (void)
{
- pid_t childs[NFORKS];
+ pid_t children[NFORKS];
int i;
int status;
int num_exited = 0;
if (pid > 0)
{
/* Parent. */
- childs[i] = pid;
+ children[i] = pid;
}
else if (pid == 0)
{
# CONDITION is the expression to be used as the breakpoint condition.
#
# N_EXPECTED_HITS is the number of threads that we expect to stop due to
-# CONDITON.
+# CONDITION.
#
# MESSAGE is used as a test name prefix.
proc run_condition_test { message n_expected_hits condition \
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This test reprocuces bug gdb/28942, performing an inferior function
+# This test reproduces bug gdb/28942, performing an inferior function
# call from a breakpoint condition in a multi-threaded inferior.
#
# The important part of this test is that, when the conditional
#
# TARGET_ASYNC and TARGET_NON_STOP are used when starting up GDB.
#
-# When STOP_AT_COND is true the breakpoint condtion will evaluate to
+# When STOP_AT_COND is true the breakpoint condition will evaluate to
# true, and GDB will stop at the breakpoint. Otherwise, the
# breakpoint condition will evaluate to false and GDB will not stop at
# the breakpoint.
if {${target-non-stop} == "on"} {
# With non-stop. GDB issues ContinueDebugEvent as soon as it
- # seens a debug event, so after a bit, the windows backend
+ # sees a debug event, so after a bit, the windows backend
# will have seen all the thread and process exit events, even
# while the user has the prompt. Give it a bit of time for
# that to happen, so we can tell which threads have exited by
# remembers from step 4 a pending SIGTRAP to report for thread 1,
# so reports it now.
#
-# 6) From GDB's perpective, this SIGTRAP can't represent a finished
+# 6) From GDB's perspective, this SIGTRAP can't represent a finished
# single-step, since thread 1 was not single-stepping (it was
# continued in step 5). Neither does this SIGTRAP correspond to a
# breakpoint hit. GDB reports to the user a spurious SIGTRAP.
exp_continue
}
} else {
- # All stop mode. Something should have stoppped
+ # All stop mode. Something should have stopped
# by now otherwise we shouldn't have a prompt, but
# we can't know which thread will have stopped as
# that is a race condition.
# We know that the thread shouldn't be stopped
# at _start, though. This is the location of
# the scratch pad on Linux at the time of
- # writting.
+ # writing.
verbose -log "XXX: thread 2 is bad, stuck in scratchpad"
incr thread_count
incr bad_threads
return
}
-# Check we hace non-stop mode. We do try to force this on above, but maybe
+# Check we have non-stop mode. We do try to force this on above, but maybe
# the target doesn't support non-stop mode, in which case (hopefully)
# non-stop mode will still show as off, and this test should not be run.
if {![is_target_non_stop]} {
global gdb_prompt
global tdlabel_re
- set thre -1
+ set res -1
set test "get $func thread id"
gdb_test_multiple "info threads" $test {
-re "(${::decimal})\[^\n\r\]*${tdlabel_re}\[^\n\r\]*$func.*$gdb_prompt $" {
# Get the thread's id.
- set thre $expect_out(1,string)
+ set res $expect_out(1,string)
pass $test
}
}
- return $thre
+ return $res
}
proc check_thread_specific_breakpoint {non_stop} {
# We are in a trace frame at which we collected only the registers
# Therefore we expect to be able to identify stack frame #0, but
- # we don't expect to be able to display its args unles they are
+ # we don't expect to be able to display its args unless they are
# passed in registers (which isn't the case for m68k), and we
# don't expect to be able to identify the caller's stack frame.
#
# This test should run on targets that don't support tracing, but for
# which libinproctrace.so is built and helps catch some issues where
-# libinproctrace.so is so broken inferiors wont even start.
+# libinproctrace.so is so broken inferiors won't even start.
load_lib "trace-support.exp"
with_test_prefix "collect $myregs" {
prepare_for_trace_test
- # We'll simply re-use the args_test_function for this test
+ # We'll simply reuse the args_test_function for this test
gdb_test "trace args_test_func" \
"Tracepoint ${::decimal} at .*" \
"set tracepoint"
with_test_prefix "collect \$_ret" {
prepare_for_trace_test
- # We'll simply re-use the args_test_function for this test.
+ # We'll simply reuse the args_test_function for this test.
gdb_test "trace args_test_func" \
"Tracepoint ${::decimal} at .*" \
"set tracepoint"
gdb_test "tfind tracepoint 0" "failed to find.*" \
"8.25: tfind tracepoint rejects zero"
gdb_test "tfind tracepoint 32767" "failed to find.*" \
- "8.25: tfind tracepoint rejects nonexistant tracepoint"
+ "8.25: tfind tracepoint rejects nonexistent tracepoint"
gdb_test "tfind tracepoint -1" "failed to find.*" \
- "8.25: tfind tracepoint rejects nonexistant tracepoint of -1"
+ "8.25: tfind tracepoint rejects nonexistent tracepoint of -1"
# 8.37 tfind tracepoint n where n no longer exists (but used to)
gdb_test_no_output "delete trace $tdp2" ""
"8.14: tfind pc x has correct line"
gdb_test "printf \"x \%d x\\n\", \$pc == \$test_pc" \
"x 1 x" \
- "8.14: tfind pc x has corrrect address"
+ "8.14: tfind pc x has correct address"
# 8.15 tfind pc <no arg>
## check pc same before and after, $trace_frame changed
\[\t \]+not installed on target" \
"1.4b: trace function by name"
-# 1.5 trace non-existant function
+# 1.5 trace non-existent function
gdb_delete_tracepoints
gdb_test "trace NoSuChFuNc" "Function \"NoSuChFuNc\" not defined." \
"1.5a: trace invalid function"
prepare_for_trace_test
- # We'll simply re-use the globals_test_function for this test
+ # We'll simply reuse the globals_test_function for this test
gdb_test "trace globals_test_func" \
"Tracepoint ${::decimal} at .*" \
"set tracepoint"
prepare_for_trace_test
- # We'll simply re-use the globals_test_function for this test
+ # We'll simply reuse the globals_test_function for this test
gdb_test "trace globals_test_func" \
"Tracepoint ${::decimal} at .*" \
"set tracepoint"
# Note, depends on previous test.
gdb_test "print \$\[1\]" \
" = <unavailable>" \
- "subscript a non-memory rvalue array, accessing an unvailable element"
+ "subscript a non-memory rvalue array, accessing an unavailable element"
# Access a field of a non-lazy value, making sure the
# unavailable-ness is propagated. History values are easy
# As with the exit tracking above we also need to track any nested
# caching procs that this proc might call. To do this we backup
# the current global list of nested caching proc calls and reset
- # the global back ot the empty list. As nested caching procs are
+ # the global back to the empty list. As nested caching procs are
# called their names are added to the global list, see
# gdb_cache_maybe_gdb_exit for where this is done.
set old_gdb_nested_caching_proc_calls $::gdb_nested_caching_proc_calls
_check_well_formed_name $message
}
- # If COUNT is greater than zero, disply PREFIX followed by COUNT.
+ # If COUNT is greater than zero, display PREFIX followed by COUNT.
proc maybe_show_count { prefix count } {
if { $count > 0 } {
clone_output "$prefix$count"
#
# If you test the same class declaration more than once, you can specify
# IN_CLASS_TABLE as "ibid". "ibid" means: look for a previous class
-# table that had the same IN_KEY and IN_TAG, and re-use that table.
+# table that had the same IN_KEY and IN_TAG, and reuse that table.
#
# IN_TAIL is the expected text after the close brace, specifically the "*"
# in "struct { ... } *". This is an optional parameter. The default
set data_($oid) [linsert $data_($oid) 0 $elem]
}
- # Re-use some common routines from the Stack implementation.
+ # Reuse some common routines from the Stack implementation.
namespace import ::Stack::create ::Stack::new ::Stack::empty \
::Stack::delete ::Stack::push ::Stack::length ::Stack::error_if
# if { $share } shared_gdb_disable
# }
#
-# to write functionalty that could share ($share == 1) or could not
+# to write functionality that could share ($share == 1) or could not
# share ($share == 0) a gdb session between two uses.
proc shared_gdb_enable {} {
# added in the BODY.
# default = 1.
# As a special case, if OPTIONS is a list of length 1, it's
- # interpreted as specifing the filename.
+ # interpreted as specifying the filename.
# BODY is Tcl code to emit the assembly. It is evaluated via
# "eval" -- not uplevel as you might expect, because it is
# important to run the body in the Dwarf namespace.
exit 2
}
-# Add "convience abbreviation" for positive decimals, without leading zeros.
+# Add "convenience abbreviation" for positive decimals, without leading zeros.
set positive {(?:[1-9][0-9]*)}
# Dejagnu defines decimal as one of the "convenience abbreviations".
}
verbose "using GCORE = $GCORE" 2
-# Return 0 if the gcore scipt is missing.
+# Return 0 if the gcore script is missing.
proc has_gcore_script {} {
global GCORE
if {$GCORE == ""} {
|| [istarget "*-*-*djgpp"]
|| [istarget "*-*-cygwin*"])} {
# Force output to unbuffered mode, by linking in an object file
- # with a global contructor that calls setvbuf.
+ # with a global constructor that calls setvbuf.
#
# Compile the special object separately for two reasons:
# 1) Insulate it from $options.
}
# Build executable named EXECUTABLE, from SOURCES. If SOURCES are not
-# provided, uses $EXECUTABLE.c. The TESTNAME paramer is the name of test
+# provided, uses $EXECUTABLE.c. The TESTNAME parameter is the name of test
# to pass to untested, if something is wrong. OPTIONS are passed
# to gdb_compile directly.
proc build_executable { testname executable {sources ""} {options {debug}} } {
return $index_type
}
-# Add a .gdb_index section to PROGRAM, unless it alread has an index
+# Add a .gdb_index section to PROGRAM, unless it already has an index
# (.gdb_index/.debug_names). Gdb doesn't support building an index from a
# program already using one. Return 1 if a .gdb_index was added, return 0
# if it already contained an index, and -1 if an error occurred.
}
-re ".*$gdb_prompt $" {
set has_hw_wp_support 0
- verbose -log "\n$me: Default, hardware watchpoint not deteced"
+ verbose -log "\n$me: Default, hardware watchpoint not detected"
}
}
# To be addressed or set in your baseboard config file:
#
# set_board_info gdb_protocol "remote"
-# Unles you have a gdbserver that uses a different protocol...
+# Unless you have a gdbserver that uses a different protocol...
# After GDB starts you should check global $gdbserver_protocol instead as
# the testfile may force a specific different target protocol itself.
#
# An index which is appended to root varobjs to ensure uniqueness.
variable _root_idx 0
- # A procedure to help with debuggging varobj trees.
+ # A procedure to help with debugging varobj trees.
# VARIABLE_NAME is the name of the variable to dump.
- # CMD, if present, is the name of the callback to output the contstructed
+ # CMD, if present, is the name of the callback to output the constructed
# strings. By default, it uses expect's "send_log" command.
# TERM, if present, is a terminating character. By default it is the newline.
#
cl_int *data;
/* In order to see which devices the OpenCL implementation on your platform
- provides you may issue a call to the print_clinfo () fuction. */
+ provides you may issue a call to the print_clinfo () function. */
/* Initialize the data the OpenCl program operates on. */
data = (cl_int*) calloc (1, size);
/* Default READMORE method. */
#define READMORE_METHOD_DEFAULT 2
-/* Default READMORE sleep time in miliseconds. */
+/* Default READMORE sleep time in milliseconds. */
#define READMORE_SLEEP_DEFAULT 10
/* Helper function. Initialize *METHOD according to environment variable
}
# Accept some output from gdb and update the screen. Wait for the screen
-# region X/Y/WIDTH/HEIGTH to matches REGEXP. Return 0 on timeout, 1 on
+# region X/Y/WIDTH/HEIGHT to matches REGEXP. Return 0 on timeout, 1 on
# success.
proc Term::wait_for_region_contents {x y width height regexp} {
while 1 {
return "lr corner is $c, not +"
}
- # Note we do not check the full horizonal borders of the box.
+ # Note we do not check the full horizontal borders of the box.
# The top will contain a title, and the bottom may as well, if
# it is overlapped by some other border. However, at most a
# title should appear as '+-VERY LONG TITLE-+', so we can