Files
binutils-gdb/gdb/testsuite/gdb.opt/break-on-_exit.exp
Tom de Vries 8f6606b6e3 [gdb] Fix common misspellings
Fix the following common misspellings:
...
accidently -> accidentally
additonal -> additional
addresing -> addressing
adress -> address
agaisnt -> against
albiet -> albeit
arbitary -> arbitrary
artifical -> artificial
auxillary -> auxiliary
auxilliary -> auxiliary
bcak -> back
begining -> beginning
cannonical -> canonical
compatiblity -> compatibility
completetion -> completion
diferent -> different
emited -> emitted
emiting -> emitting
emmitted -> emitted
everytime -> every time
excercise -> exercise
existance -> existence
fucntion -> function
funtion -> function
guarentee -> guarantee
htis -> this
immediatly -> immediately
layed -> laid
noone -> no one
occurances -> occurrences
occured -> occurred
originaly -> originally
preceeded -> preceded
preceeds -> precedes
propogate -> propagate
publically -> publicly
refering -> referring
substract -> subtract
substracting -> subtracting
substraction -> subtraction
taht -> that
targetting -> targeting
teh -> the
thier -> their
thru -> through
transfered -> transferred
transfering -> transferring
upto -> up to
vincinity -> vicinity
whcih -> which
whereever -> wherever
wierd -> weird
withing -> within
writen -> written
wtih -> with
doesnt -> doesn't
...

Tested on x86_64-linux.
2024-10-06 07:59:48 +02:00

66 lines
2.3 KiB
Plaintext

# Copyright 2021-2024 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
# Set a breakpoint on libc's _exit, and verify that it triggers. The function
# tends to do a syscall immediately after the prologue, and if the breakpoint is
# set past the syscall due to faulty prologue skipping, the breakpoint will not
# trigger.
#
# In particular, we're trying to exercise the instruction analysis
# functionality of prologue skipping. If the non-minimal symbols are
# read for libc, then that functionality might not be used because f.i.
# line-info is used instead. Also, if the minimal symbols are not read
# for libc, then the breakpoint is set on the exec-local _exit@plt instead,
# and that functionality will also not be used.
#
# We may get the required setup in case of a libc with misssing separate
# debuginfo, but we want the same effect if that debuginfo is installed.
#
# So, we use -readnever to read minimal symbols, but not non-miminal symbols.
#
# Because the code at _exit may be and usually is optimized, the test is in
# the gdb.opt directory.
standard_testfile
# See if we have target board readnow.exp or similar.
if {[readnow]} {
untested "--readnever not allowed in combination with --readnow"
return -1
}
save_vars { GDBFLAGS } {
append GDBFLAGS " -readnever"
if {[prepare_for_testing "failed to prepare" $testfile $srcfile nodebug]} {
return -1
}
}
if {![runto_main]} {
return 0
}
gdb_breakpoint "_exit"
# Give some background information about the breakpoint(s) and corresponding
# the shared lib(s).
gdb_test "info breakpoints"
gdb_test "info shared"
# If the skip_prologue analysis of _exit is too eager, we may not hit the
# breakpoint.
gdb_continue_to_breakpoint "_exit" "_exit \\(\\) .*"