Remove HP-UX references fom testsuite
This patch removes all special cases for HP-UX, for which support has been removed earlier, that I found in the testsuite. Note that the hppa architecture != HP-UX, since other OSes can run on hppa, so I tried to leave everything that is not HP-UX specific. Two complete tests were completely HP-UX specific, so I removed them. I ran the testsuite on Linux x86-64, native and native-gdbserver, and noticed no regressions. gdb/testsuite/ChangeLog: * gdb.asm/asm-source.exp: Remove HP-UX references. * gdb.base/annota1.exp: Likewise. * gdb.base/annota3.exp: Likewise. * gdb.base/attach.exp: Likewise. * gdb.base/bigcore.exp: Likewise. * gdb.base/break.exp: Likewise. * gdb.base/call-ar-st.exp: Likewise. * gdb.base/callfuncs.exp: Likewise. * gdb.base/catch-fork-static.exp: Likewise. * gdb.base/display.exp: Likewise. * gdb.base/foll-exec-mode.exp: Likewise. * gdb.base/foll-exec.exp: Likewise. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/hbreak2.exp: Likewise. * gdb.base/inferior-died.exp: Likewise. * gdb.base/interrupt.exp: Likewise. * gdb.base/multi-forks.exp: Likewise. * gdb.base/nodebug.exp: Likewise. * gdb.base/sepdebug.exp: Likewise. * gdb.base/solib1.c: Likewise. * gdb.base/step-test.exp: Likewise. * gdb.mi/non-stop.c: Likewise. * gdb.mi/pthreads.c: Likewise. * gdb.multi/bkpt-multi-exec.ex: Likewise. * gdb.threads/pthreads.c: Likewise. * gdb.threads/staticthreads.exp: Likewise. * lib/future.exp: Likewise. * lib/gdb.exp: Likewise. * gdb.base/so-indr-cl.c: Remove. * gdb.base/so-indr-cl.exp: Likewise. * gdb.base/solib.c: Likewise. * gdb.base/solib.exp: Likewise. * gdb.base/solib2.c: Likewise.
This commit is contained in:
parent
b6304613bf
commit
3ca22649a6
|
@ -1,3 +1,41 @@
|
|||
2015-12-21 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* gdb.asm/asm-source.exp: Remove HP-UX references.
|
||||
* gdb.base/annota1.exp: Likewise.
|
||||
* gdb.base/annota3.exp: Likewise.
|
||||
* gdb.base/attach.exp: Likewise.
|
||||
* gdb.base/bigcore.exp: Likewise.
|
||||
* gdb.base/break.exp: Likewise.
|
||||
* gdb.base/call-ar-st.exp: Likewise.
|
||||
* gdb.base/callfuncs.exp: Likewise.
|
||||
* gdb.base/catch-fork-static.exp: Likewise.
|
||||
* gdb.base/display.exp: Likewise.
|
||||
* gdb.base/foll-exec-mode.exp: Likewise.
|
||||
* gdb.base/foll-exec.exp: Likewise.
|
||||
* gdb.base/foll-fork.exp: Likewise.
|
||||
* gdb.base/foll-vfork.exp: Likewise.
|
||||
* gdb.base/funcargs.exp: Likewise.
|
||||
* gdb.base/hbreak2.exp: Likewise.
|
||||
* gdb.base/inferior-died.exp: Likewise.
|
||||
* gdb.base/interrupt.exp: Likewise.
|
||||
* gdb.base/multi-forks.exp: Likewise.
|
||||
* gdb.base/nodebug.exp: Likewise.
|
||||
* gdb.base/sepdebug.exp: Likewise.
|
||||
* gdb.base/solib1.c: Likewise.
|
||||
* gdb.base/step-test.exp: Likewise.
|
||||
* gdb.mi/non-stop.c: Likewise.
|
||||
* gdb.mi/pthreads.c: Likewise.
|
||||
* gdb.multi/bkpt-multi-exec.ex: Likewise.
|
||||
* gdb.threads/pthreads.c: Likewise.
|
||||
* gdb.threads/staticthreads.exp: Likewise.
|
||||
* lib/future.exp: Likewise.
|
||||
* lib/gdb.exp: Likewise.
|
||||
* gdb.base/so-indr-cl.c: Remove.
|
||||
* gdb.base/so-indr-cl.exp: Likewise.
|
||||
* gdb.base/solib.c: Likewise.
|
||||
* gdb.base/solib.exp: Likewise.
|
||||
* gdb.base/solib2.c: Likewise.
|
||||
|
||||
2015-12-21 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* gdb.base/break.exp: Remove references to HP CC/aCC compilers.
|
||||
|
|
|
@ -159,10 +159,6 @@ switch -glob -- [istarget] {
|
|||
set asm-arch pa
|
||||
set debug-flags "-gdwarf-2"
|
||||
}
|
||||
"hppa64-*-hpux*" {
|
||||
set asm-arch pa64
|
||||
set debug-flags "-gdwarf-2"
|
||||
}
|
||||
"h83*-*" {
|
||||
set asm-arch h8300
|
||||
set debug-flags "-gdwarf-2"
|
||||
|
|
|
@ -405,20 +405,10 @@ gdb_test_multiple "info inferior 1" "$test" {
|
|||
# annotate-signal-string-end
|
||||
# FIXME: annotate-signal not tested (requires that the inferior be
|
||||
# stopped by a "random" signal)
|
||||
#
|
||||
# SIGTRAP signals are dropped before they get to the inferior process
|
||||
# on hpux11. In theory, this behaivor can be controlled by setting
|
||||
# TTEO_NORM_SIGTRAP in the inferior, but doing so did not cause
|
||||
# the signal to be properly delivered.
|
||||
#
|
||||
# It has been verified that other signals will be delivered. However,
|
||||
# rather than twiddle the test, I choose to leave it as-is as it
|
||||
# exposes an interesting failure on hpux11.
|
||||
|
||||
if [target_info exists gdb,nosignals] {
|
||||
unsupported "signal sent"
|
||||
} else {
|
||||
setup_xfail hppa*-*-hpux11*
|
||||
gdb_test_multiple "signal SIGTRAP" "signal sent" {
|
||||
-re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" {
|
||||
pass "signal sent"
|
||||
|
|
|
@ -362,22 +362,11 @@ gdb_test_multiple "info inferior 1" "$test" {
|
|||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Send a signal that is not handled
|
||||
#
|
||||
# SIGTRAP signals are dropped before they get to the inferior process
|
||||
# on hpux11. In theory, this behaivor can be controlled by setting
|
||||
# TTEO_NORM_SIGTRAP in the inferior, but doing so did not cause
|
||||
# the signal to be properly delivered.
|
||||
#
|
||||
# It has been verified that other signals will be delivered. However,
|
||||
# rather than twiddle the test, I choose to leave it as-is as it
|
||||
# exposes an interesting failure on hpux11.
|
||||
|
||||
if [target_info exists gdb,nosignals] {
|
||||
unsupported "signal sent"
|
||||
} else {
|
||||
setup_xfail hppa*-*-hpux11*
|
||||
send_gdb "signal SIGTRAP\n"
|
||||
gdb_expect_list "signal sent" "$gdb_prompt$" {
|
||||
"\r\n\032\032post-prompt\r\n"
|
||||
|
|
|
@ -13,18 +13,6 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
# On HP-UX 11.0, this test is causing a process running the program
|
||||
# "attach" to be left around spinning. Until we figure out why, I am
|
||||
# commenting out the test to avoid polluting tiamat (our 11.0 nightly
|
||||
# test machine) with these processes. RT
|
||||
#
|
||||
# Setting the magic bit in the target app should work. I added a
|
||||
# "kill", and also a test for the R3 register warning. JB
|
||||
if { [istarget "hppa*-*-hpux*"] } {
|
||||
return 0
|
||||
}
|
||||
|
||||
if {![can_spawn_for_attach]} {
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ if ![isnative] then {
|
|||
# I/O bandwith.
|
||||
|
||||
if { [istarget "*-*-*bsd*"]
|
||||
|| [istarget "*-*-hpux*"]
|
||||
|| [istarget "*-*-solaris*"]
|
||||
|| [istarget "*-*-darwin*"]
|
||||
|| [istarget "*-*-cygwin*"] } {
|
||||
|
|
|
@ -485,24 +485,13 @@ gdb_test_multiple "catch fork" "$name" {
|
|||
}
|
||||
|
||||
|
||||
# If we are on HP-UX 10.20, we expect an error message to be
|
||||
# printed if we type "catch vfork" at the gdb gdb_prompt. This is
|
||||
# because on HP-UX 10.20, we cannot catch vfork events.
|
||||
|
||||
set name "set catch vfork, never expected to trigger"
|
||||
|
||||
if [istarget "hppa*-hp-hpux10.20"] then {
|
||||
gdb_test "catch vfork" \
|
||||
"Catch of vfork events not supported on HP-UX 10.20..*" \
|
||||
"$name"
|
||||
} else {
|
||||
gdb_test_multiple "catch vfork" "$name" {
|
||||
-re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $" {
|
||||
pass $name
|
||||
}
|
||||
-re "Catch of vfork not yet implemented.*$gdb_prompt $" {
|
||||
pass $name
|
||||
}
|
||||
gdb_test_multiple "catch vfork" "$name" {
|
||||
-re "Catchpoint \[0-9\]* .vfork..*$gdb_prompt $" {
|
||||
pass $name
|
||||
}
|
||||
-re "Catch of vfork not yet implemented.*$gdb_prompt $" {
|
||||
pass $name
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -646,27 +635,15 @@ gdb_test "print marker2(99)" \
|
|||
|
||||
# As long as we're stopped (breakpointed) in a called function,
|
||||
# verify that we can successfully backtrace & such from here.
|
||||
#
|
||||
# In this and the following test, the _sr4export check apparently is needed
|
||||
# for hppa*-*-hpux.
|
||||
#
|
||||
gdb_test_multiple "bt" "backtrace while in called function" {
|
||||
-re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" {
|
||||
pass "backtrace while in called function"
|
||||
}
|
||||
-re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" {
|
||||
pass "backtrace while in called function"
|
||||
}
|
||||
}
|
||||
gdb_test "bt" \
|
||||
"#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
|
||||
"backtrace while in called function"
|
||||
|
||||
# Return from the called function. For remote targets, it's important to do
|
||||
# this before runto_main, which otherwise may silently stop on the dummy
|
||||
# breakpoint inserted by GDB at the program's entry point.
|
||||
#
|
||||
gdb_test_multiple "finish" "finish from called function" {
|
||||
-re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" {
|
||||
pass "finish from called function"
|
||||
}
|
||||
-re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" {
|
||||
pass "finish from called function"
|
||||
}
|
||||
|
@ -704,40 +681,6 @@ gdb_test_multiple "finish" "finish from outermost frame disallowed" {
|
|||
}
|
||||
}
|
||||
|
||||
# Verify that we can explicitly ask GDB to stop on all shared library
|
||||
# events, and that it does so.
|
||||
#
|
||||
if [istarget "hppa*-*-hpux*"] then {
|
||||
if ![runto_main] then { fail "break tests suppressed" }
|
||||
|
||||
gdb_test_no_output "set stop-on-solib-events 1" \
|
||||
"set stop-on-solib-events"
|
||||
|
||||
gdb_test "run" \
|
||||
"Stopped due to shared library event.*" \
|
||||
"triggered stop-on-solib-events" \
|
||||
"Start it from the beginning.*y or n. $" \
|
||||
"y"
|
||||
|
||||
gdb_test_no_output "set stop-on-solib-events 0" \
|
||||
"reset stop-on-solib-events"
|
||||
}
|
||||
|
||||
# Hardware breakpoints are unsupported on HP-UX. Verify that GDB
|
||||
# gracefully responds to requests to create them.
|
||||
#
|
||||
if [istarget "hppa*-*-hpux*"] then {
|
||||
if ![runto_main] then { fail "break tests suppressed" }
|
||||
|
||||
gdb_test "hbreak" \
|
||||
"No hardware breakpoint support in the target.*" \
|
||||
"hw breaks disallowed"
|
||||
|
||||
gdb_test "thbreak" \
|
||||
"No hardware breakpoint support in the target.*" \
|
||||
"temporary hw breaks disallowed"
|
||||
}
|
||||
|
||||
#********
|
||||
|
||||
|
||||
|
|
|
@ -390,46 +390,28 @@ gdb_test "tbreak $stop_line" \
|
|||
gdb_test continue "Continuing\\..*main \\(.*\\) at.*$srcfile:$stop_line\[\t\r\n \]+$stop_line.*print_long_arg_list \\( a, b, c, d, e, f, .struct1, .struct2, .struct3, .struct4,.*" "continue to tbreak7"
|
||||
|
||||
set stop_line [gdb_get_line_number "-step2-"]
|
||||
if { [istarget "hppa*-*-hpux*"] } {
|
||||
#
|
||||
# NOTE:(FIXME)
|
||||
# the aCC demangler cannot demangle the name of a function with >10 args.
|
||||
# so I added a .* after the name of the function, to match the
|
||||
# incredibly long mangled name
|
||||
# (getting aCC's libdemangle.a bundled w/ the system?)
|
||||
# DTS CLLbs16994 coulter 990114
|
||||
#
|
||||
# FIXME: use step for hppa* testing for now
|
||||
# guo 990621
|
||||
#
|
||||
gdb_test "step" \
|
||||
"print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);" \
|
||||
"step into print_long_arg_list"
|
||||
} else {
|
||||
|
||||
# We can't just assume that a "step" will get us into
|
||||
# print_long_arg_list here,either.
|
||||
gdb_test "tbreak print_long_arg_list" \
|
||||
"Temporary breakpoint .* file .*$srcfile, line .*" \
|
||||
"tbreak in print_long_arg_list after stepping into memcpy"
|
||||
# The short match case below handles cases where a buffer
|
||||
# overflows or something, and expect can't deal with the full
|
||||
# line. Perhaps a more elegant solution exists... -sts 1999-08-17
|
||||
if {![gdb_skip_float_test "step into print_long_arg_list"]} {
|
||||
gdb_test_multiple "continue" "step into print_long_arg_list" {
|
||||
-re ".*print_long_arg_list \\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
|
||||
pass "step into print_long_arg_list"
|
||||
}
|
||||
-re ".*print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}.*\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
|
||||
pass "step into print_long_arg_list (short match)"
|
||||
}
|
||||
# We can't just assume that a "step" will get us into
|
||||
# print_long_arg_list here,either.
|
||||
gdb_test "tbreak print_long_arg_list" \
|
||||
"Temporary breakpoint .* file .*$srcfile, line .*" \
|
||||
"tbreak in print_long_arg_list after stepping into memcpy"
|
||||
# The short match case below handles cases where a buffer
|
||||
# overflows or something, and expect can't deal with the full
|
||||
# line. Perhaps a more elegant solution exists... -sts 1999-08-17
|
||||
if {![gdb_skip_float_test "step into print_long_arg_list"]} {
|
||||
gdb_test_multiple "continue" "step into print_long_arg_list" {
|
||||
-re ".*print_long_arg_list \\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
|
||||
pass "step into print_long_arg_list"
|
||||
}
|
||||
-re ".*print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}.*\\) at .*${srcfile}:$stop_line\[\r\n\]+$stop_line\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {
|
||||
pass "step into print_long_arg_list (short match)"
|
||||
}
|
||||
} else {
|
||||
# If skipping float tests, don't expect anything in arg list.
|
||||
gdb_test "continue" \
|
||||
"print_long_arg_list \\(.*\\).*" \
|
||||
"step into print_long_arg_list"
|
||||
}
|
||||
} else {
|
||||
# If skipping float tests, don't expect anything in arg list.
|
||||
gdb_test "continue" \
|
||||
"print_long_arg_list \\(.*\\).*" \
|
||||
"step into print_long_arg_list"
|
||||
}
|
||||
|
||||
set ws "\[\n\r\t \]+"
|
||||
|
|
|
@ -165,15 +165,12 @@ proc do_function_calls {} {
|
|||
# and attempting a jump through that (a totally random address).
|
||||
setup_kfail gdb/1457 "rs6000*-*-aix*"
|
||||
setup_kfail gdb/1457 "powerpc*-*-aix*"
|
||||
setup_kfail gdb/1457 hppa*-*-hpux*
|
||||
gdb_test "p t_func_values(add,func_val2)" " = 1"
|
||||
setup_kfail gdb/1457 "rs6000*-*-aix*"
|
||||
setup_kfail gdb/1457 "powerpc*-*-aix*"
|
||||
setup_kfail gdb/1457 hppa*-*-hpux*
|
||||
gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
|
||||
setup_kfail gdb/1457 "rs6000*-*-aix*"
|
||||
setup_kfail gdb/1457 "powerpc*-*-aix*"
|
||||
setup_kfail gdb/1457 hppa*-*-hpux*
|
||||
gdb_test "p t_call_add(add,3,4)" " = 7"
|
||||
gdb_test "p t_call_add(func_val1,3,4)" " = 7"
|
||||
|
||||
|
|
|
@ -27,8 +27,7 @@ if { [is_remote target] || ![isnative] } then {
|
|||
|
||||
# Until "catch fork" is implemented on other targets...
|
||||
#
|
||||
if { ![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]
|
||||
&& ![istarget "*-*-openbsd*"] } then {
|
||||
if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -194,15 +194,8 @@ gdb_test "print/r j" " = 0x0\[\\r\\n\]+" "debug test output 2a"
|
|||
gdb_test "print j" " = 0\[\\r\\n\]+" "debug test output 3"
|
||||
|
||||
# x/0 j doesn't produce any output and terminates PA64 process when testing
|
||||
if [istarget "hppa2.0w-hp-hpux11*"] {
|
||||
xfail "'x/0 j' terminates PA64 process - skipped test point"
|
||||
} else {
|
||||
gdb_test_no_output "x/0 j"
|
||||
}
|
||||
if [istarget "hppa*-hp-hpux*"] {
|
||||
# on HP-UX you could access the first page without getting an error
|
||||
gdb_test "x/rx j" ".*(Cannot access|Error accessing) memory.*|.*0xa:\[ \t\]*\[0-9\]+.*"
|
||||
}
|
||||
gdb_test_no_output "x/0 j"
|
||||
|
||||
gdb_test "print/0 j" ".*Item count other than 1 is meaningless.*" "print/0 j"
|
||||
gdb_test "print/s sum" " = 1000" "ignored s"
|
||||
gdb_test "print/i sum" ".*Format letter.*is meaningless.*.*" "no i"
|
||||
|
|
|
@ -35,7 +35,7 @@ if { [target_info exists gdb_protocol]
|
|||
|
||||
# Until "catch exec" is implemented on other targets...
|
||||
#
|
||||
if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
|
||||
if {![istarget "*-linux*"]} then {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
# Until "catch exec" is implemented on other targets...
|
||||
#
|
||||
if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
|
||||
if { ![istarget "*-linux*"] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -193,10 +193,6 @@ proc do_exec_tests {} {
|
|||
}
|
||||
}
|
||||
|
||||
# DTS CLLbs16760
|
||||
# PA64 doesn't know about $START$ in dld.sl at this point. It should.
|
||||
# - Michael Coulter
|
||||
setup_xfail hppa2.0w-hp-hpux* CLLbs16760
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re ".*xecuting new program:.*${testfile2}.*Catchpoint .*(exec\'d .*${testfile2}).*in .*$gdb_prompt $"\
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
# Until "set follow-fork-mode" and "catch fork" are implemented on
|
||||
# other targets...
|
||||
#
|
||||
if { ![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]
|
||||
&& ![istarget "*-*-openbsd*"] } then {
|
||||
if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -21,26 +21,10 @@
|
|||
# Until "set follow-fork-mode" and "catch vfork" are implemented on
|
||||
# other targets...
|
||||
#
|
||||
if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
|
||||
if {![istarget "*-linux*"]} then {
|
||||
continue
|
||||
}
|
||||
|
||||
# Test to see if we are on an HP-UX 10.20 and if so,
|
||||
# do not run these tests as catching vfork is disabled for
|
||||
# 10.20.
|
||||
|
||||
if [istarget "hppa*-hp-hpux10.20"] then {
|
||||
return 0
|
||||
}
|
||||
|
||||
# NOTE drow/2002-12-06: I don't know what the referenced kernel problem
|
||||
# is, but it appears to be fixed in recent HP/UX versions.
|
||||
|
||||
##if [istarget "hppa2.0w-hp-hpux*"] {
|
||||
## warning "Don't run gdb.base/foll-vfork.exp until JAGaa43495 kernel problem is fixed."
|
||||
## return 0
|
||||
##}
|
||||
|
||||
standard_testfile
|
||||
|
||||
set compile_options debug
|
||||
|
@ -207,46 +191,18 @@ proc vfork_and_exec_child_follow_through_step {} {
|
|||
global gdb_prompt
|
||||
global srcfile2
|
||||
|
||||
if { [istarget "hppa*-*-hpux*"] && ![istarget "hppa*-*-hpux11.*"] } {
|
||||
# This test cannot be performed prior to HP-UX 10.30, because
|
||||
# ptrace-based debugging of a vforking program basically doesn't
|
||||
# allow the child to do things like hit a breakpoint between a
|
||||
# vfork and exec. This means that saying "set follow-fork
|
||||
# child; next" at a vfork() call won't work, because the
|
||||
# implementation of "next" sets a "step resume" breakpoint at
|
||||
# the return from the vfork(), which the child will hit on its
|
||||
# way to exec'ing.
|
||||
#
|
||||
verbose "vfork child-following next test ignored for pre-HP/UX-10.30 targets."
|
||||
return 0
|
||||
}
|
||||
|
||||
setup_gdb
|
||||
|
||||
gdb_test_no_output "set follow-fork child"
|
||||
|
||||
set test "step over vfork"
|
||||
if { [istarget "hppa*-*-hpux*"]} {
|
||||
# Since the child cannot be debugged until after it has exec'd,
|
||||
# and since there's a bp on "main" in the parent, and since the
|
||||
# bp's for the parent are recomputed in the exec'd child, the
|
||||
# step through a vfork should land us in the "main" for the
|
||||
# exec'd child, too.
|
||||
#
|
||||
set linenum [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}]
|
||||
gdb_test_multiple "next" $test {
|
||||
-re "Attaching after vfork to.*Executing new program.*Breakpoint.*vforked-prog.c:${linenum}.*$gdb_prompt " {
|
||||
pass "$test"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# The ideal support is to be able to debug the child even
|
||||
# before it execs. Thus, "next" lands on the next line after
|
||||
# the vfork.
|
||||
gdb_test_multiple "next" $test {
|
||||
-re "Attaching after .* vfork to child.*if \\(pid == 0\\).*$gdb_prompt " {
|
||||
pass "$test"
|
||||
}
|
||||
|
||||
# The ideal support is to be able to debug the child even
|
||||
# before it execs. Thus, "next" lands on the next line after
|
||||
# the vfork.
|
||||
gdb_test_multiple "next" $test {
|
||||
-re "Attaching after .* vfork to child.*if \\(pid == 0\\).*$gdb_prompt " {
|
||||
pass "$test"
|
||||
}
|
||||
}
|
||||
# The parent has been detached; allow time for any output it might
|
||||
|
|
|
@ -1013,13 +1013,6 @@ proc localvars_in_indirect_call { } {
|
|||
#
|
||||
|
||||
gdb_test_multiple "finish" "finish from indirectly called function" {
|
||||
-re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" {
|
||||
#On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than
|
||||
#hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary
|
||||
#to continue the test.
|
||||
send_gdb "step\n"
|
||||
exp_continue
|
||||
}
|
||||
-re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" {
|
||||
pass "finish from indirectly called function"
|
||||
}
|
||||
|
|
|
@ -396,27 +396,15 @@ gdb_test "print marker2(99)" \
|
|||
|
||||
# As long as we're stopped (breakpointed) in a called function,
|
||||
# verify that we can successfully backtrace & such from here.
|
||||
#
|
||||
# In this and the following test, the _sr4export check apparently is needed
|
||||
# for hppa*-*-hpux.
|
||||
#
|
||||
gdb_test_multiple "bt" "backtrace while in called function" {
|
||||
-re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" {
|
||||
pass "backtrace while in called function"
|
||||
}
|
||||
-re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" {
|
||||
pass "backtrace while in called function"
|
||||
}
|
||||
}
|
||||
gdb_test "bt" \
|
||||
"#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
|
||||
"backtrace while in called function"
|
||||
|
||||
# Return from the called function. For remote targets, it's important to do
|
||||
# this before runto_main, which otherwise may silently stop on the dummy
|
||||
# breakpoint inserted by GDB at the program's entry point.
|
||||
#
|
||||
gdb_test_multiple "finish" "finish from called function" {
|
||||
-re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" {
|
||||
pass "finish from called function"
|
||||
}
|
||||
-re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" {
|
||||
pass "finish from called function"
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ if { [is_remote target] || ![isnative] } then {
|
|||
# Until "set follow-fork-mode" and "catch fork" are implemented on
|
||||
# other targets...
|
||||
#
|
||||
if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]} then {
|
||||
if { ![istarget "*-*-linux*"] } then {
|
||||
unsupported "inferior-died.exp"
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -99,11 +99,6 @@ if ![file exists $binfile] then {
|
|||
return
|
||||
}
|
||||
-re "$gdb_prompt $" {
|
||||
# On HPUX-11.0 'send "p func1 ()"' above
|
||||
# terminates the program. A defect is pending on this
|
||||
# issue [defect #DTS CHFts24203]. Hence calling setup_xfail
|
||||
# below.
|
||||
setup_xfail "hppa*-*-*11*" CHFts24203
|
||||
fail "call function when asleep (wrong output)"
|
||||
}
|
||||
default {
|
||||
|
@ -118,7 +113,6 @@ if ![file exists $binfile] then {
|
|||
setup_xfail "vax-*-*"
|
||||
setup_xfail "alpha-*-*"
|
||||
setup_xfail "*-*-*bsd*"
|
||||
setup_xfail "*-*-hpux*"
|
||||
setup_xfail "*-*-*lynx*"
|
||||
fail "$msg (stays asleep)"
|
||||
# Send the inferior a newline to wake it up.
|
||||
|
@ -153,9 +147,6 @@ if ![file exists $binfile] then {
|
|||
# The optional leading \r\n is in case we sent a newline above
|
||||
# to wake the program, in which case the program now sends it
|
||||
# back.
|
||||
# FIXME: The pattern below leads to an expected success on HPUX-11.0
|
||||
# but the success is spurious. Need to provide the right reg.expr.
|
||||
# here.
|
||||
|
||||
set msg "echo data"
|
||||
gdb_test_multiple "" $msg {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# Until "set follow-fork-mode" and "catch fork" are implemented on
|
||||
# other targets...
|
||||
#
|
||||
if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-*-linux*"]} then {
|
||||
if { ![istarget "*-*-linux*"] } then {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -129,12 +129,6 @@ gdb_test "print pids\[0\]==0 || pids\[1\]==0 || pids\[2\]==0 || pids\[3\]==0" \
|
|||
# Now test with detach-on-fork off.
|
||||
#
|
||||
|
||||
# detach-on-fork isn't implemented on hpux.
|
||||
#
|
||||
if {![istarget "*-*-linux*"]} then {
|
||||
continue
|
||||
}
|
||||
|
||||
# Start with a fresh gdb
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
|
|
@ -81,54 +81,37 @@ if [runto inner] then {
|
|||
# doesn't know the variables exist at all.
|
||||
setup_xfail "rs6000*-*-aix*"
|
||||
setup_xfail "powerpc*-*-aix*"
|
||||
if ![test_compiler_info "gcc-*"] {
|
||||
setup_xfail "hppa*-*-hpux*"
|
||||
}
|
||||
|
||||
gdb_test "p datalocal" "= 4"
|
||||
|
||||
setup_xfail "rs6000*-*-aix*"
|
||||
setup_xfail "powerpc*-*-aix*"
|
||||
if ![test_compiler_info "gcc-*"] {
|
||||
setup_xfail "hppa*-*-hpux*"
|
||||
}
|
||||
|
||||
gdb_test "whatis datalocal" "<(data variable|variable), no debug info>"
|
||||
|
||||
setup_xfail "rs6000*-*-aix*"
|
||||
setup_xfail "powerpc*-*-aix*"
|
||||
if ![test_compiler_info "gcc-*"] {
|
||||
setup_xfail "hppa*-*-hpux*"
|
||||
}
|
||||
|
||||
gdb_test "ptype datalocal" "<(data variable|variable), no debug info>"
|
||||
gdb_test "p bssglobal" "= 0"
|
||||
gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>|int"
|
||||
gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>|int"
|
||||
|
||||
|
||||
setup_xfail "rs6000*-*-aix*"
|
||||
setup_xfail "powerpc*-*-aix*"
|
||||
if ![test_compiler_info "gcc-*"] {
|
||||
setup_xfail "hppa*-*-hpux*"
|
||||
}
|
||||
|
||||
gdb_test "p bsslocal" "= 0"
|
||||
|
||||
setup_xfail "rs6000*-*-aix*"
|
||||
setup_xfail "powerpc*-*-aix*"
|
||||
if ![test_compiler_info "gcc-*"] {
|
||||
setup_xfail "hppa*-*-hpux*"
|
||||
}
|
||||
|
||||
gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>"
|
||||
|
||||
setup_xfail "rs6000*-*-aix*"
|
||||
setup_xfail "powerpc*-*-aix*"
|
||||
if ![test_compiler_info "gcc-*"] {
|
||||
setup_xfail "hppa*-*-hpux*"
|
||||
}
|
||||
|
||||
gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>"
|
||||
|
||||
|
||||
gdb_test "backtrace 10" "#0.*inner.*#1.*middle.*#2.*top.*#3.*main.*" \
|
||||
"backtrace from inner in nodebug.exp"
|
||||
# Or if that doesn't work, at least hope for the external symbols
|
||||
|
@ -143,32 +126,12 @@ if [runto inner] then {
|
|||
setup_xfail "*-*-*" 2416
|
||||
fail "p/c array_index(\"abcdef\",2)"
|
||||
} else {
|
||||
#
|
||||
# On HP-UX, a support function (__d_plt_call) necessary to
|
||||
# implement an inferior call is normally only available when
|
||||
# the inferior was compiled with -g. Thus, we expect this
|
||||
# testpoint to fail on HP-UX.
|
||||
if { [istarget "hppa*-hpux*"] } {
|
||||
gdb_test_multiple "p/c array_index(\"abcdef\",2)" \
|
||||
"p/c array_index(\"abcdef\",2)" {
|
||||
-re ".*Suggest linking executable with -g.*$gdb_prompt $" {
|
||||
pass "p/c array_index(\"abcdef\",2)"
|
||||
}
|
||||
-re ".*Cannot find __wdb_call_dummy in.*end.o.*" {
|
||||
pass "p/c array_index(\"abcdef\",2)"
|
||||
}
|
||||
-re ".*99 'c'.*" {
|
||||
pass "p/c array_index(\"abcdef\",2)"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# We need to up this because this can be really slow on some boards.
|
||||
# (malloc() is called as part of the test).
|
||||
set prev_timeout $timeout
|
||||
set timeout 60
|
||||
gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
|
||||
set timeout $prev_timeout
|
||||
}
|
||||
# We need to up this because this can be really slow on some boards.
|
||||
# (malloc() is called as part of the test).
|
||||
set prev_timeout $timeout
|
||||
set timeout 60
|
||||
gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
|
||||
set timeout $prev_timeout
|
||||
}
|
||||
|
||||
# Now, try that we can give names of file-local symbols which happen
|
||||
|
|
|
@ -299,9 +299,6 @@ gdb_test_multiple "catch fork" $name {
|
|||
|
||||
set name "set catch vfork, never expected to trigger"
|
||||
gdb_test_multiple "catch vfork" $name {
|
||||
-re "Catch of vfork events not supported on HP-UX 10.20.*" {
|
||||
pass $name
|
||||
}
|
||||
-re "Catchpoint \[0-9\]* .vfork.*$gdb_prompt $" {
|
||||
pass $name
|
||||
}
|
||||
|
@ -456,19 +453,10 @@ gdb_test "print marker2(99)" \
|
|||
|
||||
# As long as we're stopped (breakpointed) in a called function,
|
||||
# verify that we can successfully backtrace & such from here.
|
||||
#
|
||||
# In this and the following test, the _sr4export check apparently is needed
|
||||
# for hppa*-*-hpux.
|
||||
#
|
||||
|
||||
gdb_test_multiple "bt" "backtrace while in called function" {
|
||||
-re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" {
|
||||
pass "backtrace while in called function"
|
||||
}
|
||||
-re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" {
|
||||
pass "backtrace while in called function"
|
||||
}
|
||||
}
|
||||
gdb_test "bt" \
|
||||
"#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1\[ \t\]*<function called from gdb>.*" \
|
||||
"backtrace while in called function"
|
||||
|
||||
# Return from the called function. For remote targets, it's important to do
|
||||
# this before runto_main, which otherwise may silently stop on the dummy
|
||||
|
@ -476,9 +464,6 @@ gdb_test_multiple "bt" "backtrace while in called function" {
|
|||
#
|
||||
|
||||
gdb_test_multiple "finish" "finish from called function" {
|
||||
-re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" {
|
||||
pass "finish from called function"
|
||||
}
|
||||
-re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" {
|
||||
pass "finish from called function"
|
||||
}
|
||||
|
@ -511,43 +496,6 @@ gdb_test_multiple "finish" "finish from outermost frame disallowed" {
|
|||
}
|
||||
}
|
||||
|
||||
# Verify that we can explicitly ask GDB to stop on all shared library
|
||||
# events, and that it does so.
|
||||
#
|
||||
if [istarget "hppa*-*-hpux*"] then {
|
||||
if ![runto_main] then { fail "sepdebug tests suppressed" }
|
||||
|
||||
gdb_test_no_output "set stop-on-solib-events 1" \
|
||||
"set stop-on-solib-events"
|
||||
|
||||
gdb_test "run" \
|
||||
"Stopped due to shared library event.*" \
|
||||
"triggered stop-on-solib-events" \
|
||||
"Start it from the beginning.*y or n. $" \
|
||||
"y"
|
||||
|
||||
gdb_test_no_output "set stop-on-solib-events 0" \
|
||||
"reset stop-on-solib-events"
|
||||
}
|
||||
|
||||
# Hardware breakpoints are unsupported on HP-UX. Verify that GDB
|
||||
# gracefully responds to requests to create them.
|
||||
#
|
||||
if [istarget "hppa*-*-hpux*"] then {
|
||||
if ![runto_main] then { fail "sepdebug tests suppressed" }
|
||||
|
||||
gdb_test "hbreak" \
|
||||
"No hardware breakpoint support in the target.*" \
|
||||
"hw breaks disallowed"
|
||||
|
||||
gdb_test "thbreak" \
|
||||
"No hardware breakpoint support in the target.*" \
|
||||
"temporary hw breaks disallowed"
|
||||
}
|
||||
|
||||
#********
|
||||
|
||||
|
||||
#
|
||||
# Test "next" over recursive function call.
|
||||
#
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/* This program is linked against SOM shared libraries, which the loader
|
||||
automatically loads along with the program itself).
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
extern "C" int solib_main (int);
|
||||
|
||||
static int
|
||||
solib_wrapper (int (*function)(int))
|
||||
{
|
||||
return (*function)(100);
|
||||
}
|
||||
|
||||
|
||||
int main ()
|
||||
{
|
||||
int result;
|
||||
|
||||
/* This is an indirect call to solib_main. */
|
||||
result = solib_wrapper (solib_main);
|
||||
return 0;
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
# Copyright 1997-2015 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/>. */
|
||||
|
||||
|
||||
# are we on a target board
|
||||
if ![isnative] then {
|
||||
return
|
||||
}
|
||||
|
||||
# This test is presently only valid on HP-UX, since it requires
|
||||
# that we use HP-UX-specific compiler & linker options to build
|
||||
# the testcase.
|
||||
#
|
||||
if {! [istarget "hppa*-*-*hpux*"] } {
|
||||
return
|
||||
}
|
||||
|
||||
set libfile "solib"
|
||||
set testfile "so-indr-cl"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Build the shared libraries this test case needs.
|
||||
#
|
||||
#cd ${subdir}
|
||||
#remote_exec build "$CC -g +z -c ${libfile}1.c -o ${libfile}1.o"
|
||||
|
||||
|
||||
if {$hp_cc_compiler || $hp_aCC_compiler} {
|
||||
set additional_flags "additional_flags=+z"
|
||||
} else {
|
||||
set additional_flags "additional_flags=-fpic"
|
||||
}
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${objdir}/${subdir}/${libfile}1.o" object [list debug $additional_flags]] != ""} {
|
||||
perror "Couldn't compile ${libfile}1.c"
|
||||
return -1
|
||||
}
|
||||
|
||||
if [istarget "hppa*-hp-hpux*"] then {
|
||||
remote_exec build "ld -b ${objdir}/${subdir}/${libfile}1.o -o ${objdir}/${subdir}/${libfile}1.sl"
|
||||
} else {
|
||||
set additional_flags "additional_flags=-shared"
|
||||
gdb_compile "${objdir}/${subdir}/${libfile}1.o" "${objdir}/${subdir}/${libfile}1.sl" executable [list debug $additional_flags]
|
||||
}
|
||||
|
||||
# Build the test case
|
||||
#remote_exec build "$CC -Aa -g ${srcfile} ${libfile}1.sl -o ${binfile}"
|
||||
|
||||
|
||||
if {$hp_cc_compiler} {
|
||||
set additional_flags "additional_flags=-Ae"
|
||||
} else {
|
||||
set additional_flags ""
|
||||
}
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}/${libfile}1.sl" "${binfile}" executable [list debug $additional_flags]] != ""} {
|
||||
perror "Couldn't build ${binfile}"
|
||||
return -1
|
||||
}
|
||||
|
||||
#cd ..
|
||||
|
||||
# Start with a fresh gdb
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# This program implicitly loads SOM shared libraries. We wish to test
|
||||
# whether a user can set breakpoints in a shlib before running the
|
||||
# program, where the program doesn't directly call the shlib, but
|
||||
# indirectly does via passing its address to another function.
|
||||
#
|
||||
# ??rehrauer: Currently, this doesn't work, but we do catch the case
|
||||
# and explicitly disallow it. The reason it fails appears to be that
|
||||
#
|
||||
# [1] gdb consults only the linker symbol table in this scenario, and
|
||||
# [2] For a shlib function that is only indirectly called from the
|
||||
# main a.out, there is in the linker symbol table a stub whose
|
||||
# address is negative. Possibly this is to be interpreted as
|
||||
# an index into the DLT??
|
||||
#
|
||||
send_gdb "break solib_main\n"
|
||||
gdb_expect {
|
||||
-re "Cannot break on solib_main without a running program.*$gdb_prompt $"\
|
||||
{pass "break on indirect solib call before running"}
|
||||
-re "Breakpoint.*deferred.*\\(\"solib_main\" was not found.*$gdb_prompt $"\
|
||||
{pass "break on indirect solib call before running 2"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "break on indirect solib call before running"}
|
||||
timeout {fail "(timeout) break on indirect solib call before running"}
|
||||
}
|
||||
|
||||
# However, if we do run to the program's main, we then ought to be
|
||||
# able to set a breakpoint on the indirectly called function. (Apparently,
|
||||
# once the inferior is running, gdb consults the debug info rather than
|
||||
# the linker symbol table, and is able to find the correct address.)
|
||||
#
|
||||
if ![runto_main] then { fail "indirect solib call tests suppressed" }
|
||||
|
||||
# Verify that we can step over the first shlib call.
|
||||
#
|
||||
send_gdb "break solib_main\n"
|
||||
gdb_expect {
|
||||
-re ".*\[Bb\]reakpoint \[0-9\]* at 0x\[0-9a-fA-F\]*: file.*${libfile}1.c.*$gdb_prompt $"\
|
||||
{pass "break on indirect solib call after running"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "break on indirect solib call after running"}
|
||||
timeout {fail "(timeout) break on indirect solib call after running"}
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
return 0
|
|
@ -1,60 +0,0 @@
|
|||
/* This program uses HP-UX-specific features to load and unload SOM
|
||||
shared libraries that it wasn't linked against (i.e., libraries
|
||||
that the loader doesn't automatically load along with the program
|
||||
itself).
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <dl.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
shl_t solib_handle;
|
||||
int dummy;
|
||||
int status;
|
||||
int (*solib_main) (int);
|
||||
|
||||
/* Load a shlib, with immediate binding of all symbols.
|
||||
|
||||
Note that the pathname of the loaded shlib is assumed to be relative
|
||||
to the testsuite directory (from whence the tested GDB is run), not
|
||||
from dot/.
|
||||
*/
|
||||
dummy = 1; /* Put some code between shl_ calls... */
|
||||
solib_handle = shl_load ("gdb.base/solib1.sl", BIND_IMMEDIATE, 0);
|
||||
|
||||
/* Find a function within the shlib, and call it. */
|
||||
status = shl_findsym (&solib_handle,
|
||||
"solib_main",
|
||||
TYPE_PROCEDURE,
|
||||
(long *) &solib_main);
|
||||
status = (*solib_main) (dummy);
|
||||
|
||||
/* Unload the shlib. */
|
||||
status = shl_unload (solib_handle);
|
||||
|
||||
/* Load a different shlib, with deferred binding of all symbols. */
|
||||
dummy = 2;
|
||||
solib_handle = shl_load ("gdb.base/solib2.sl", BIND_DEFERRED, 0);
|
||||
|
||||
/* Find a function within the shlib, and call it. */
|
||||
status = shl_findsym (&solib_handle,
|
||||
"solib_main",
|
||||
TYPE_PROCEDURE,
|
||||
(long *) &solib_main);
|
||||
status = (*solib_main) (dummy);
|
||||
|
||||
/* Unload the shlib. */
|
||||
status = shl_unload (solib_handle);
|
||||
|
||||
/* Reload the first shlib again, with deferred symbol binding this time. */
|
||||
dummy = 3;
|
||||
solib_handle = shl_load ("gdb.base/solib1.sl", BIND_IMMEDIATE, 0);
|
||||
|
||||
/* Unload it without trying to find any symbols in it. */
|
||||
status = shl_unload (solib_handle);
|
||||
|
||||
/* All done. */
|
||||
dummy = -1;
|
||||
return 0;
|
||||
}
|
|
@ -1,352 +0,0 @@
|
|||
# Copyright 1997-2015 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/>. */
|
||||
|
||||
|
||||
# are we on a target board
|
||||
if ![isnative] then {
|
||||
return
|
||||
}
|
||||
|
||||
# This test is presently only valid on HP-UX. It verifies GDB's
|
||||
# ability to catch loads and unloads of shared libraries.
|
||||
#
|
||||
|
||||
#setup_xfail "*-*-*"
|
||||
#clear_xfail "hppa*-*-*hpux*"
|
||||
if {![istarget "hppa*-*-hpux*"]} {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile "solib"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
# build the first test case
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested solib.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
# Build the shared libraries this test case needs.
|
||||
#
|
||||
#cd ${subdir}
|
||||
#remote_exec build "$CC -g +z -c ${testfile}1.c -o ${testfile}1.o"
|
||||
#remote_exec build "$CC -g +z -c ${testfile}2.c -o ${testfile}2.o"
|
||||
|
||||
if {$gcc_compiled == 0} {
|
||||
if [istarget "hppa*-hp-hpux*"] then {
|
||||
set additional_flags "additional_flags=+z"
|
||||
} else {
|
||||
# don't know what the compiler is...
|
||||
set additional_flags ""
|
||||
}
|
||||
} else {
|
||||
set additional_flags "additional_flags=-fpic"
|
||||
}
|
||||
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${binfile}1.o" object [list debug $additional_flags]] != ""} {
|
||||
perror "Couldn't compile ${testfile}1.c"
|
||||
#return -1
|
||||
}
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${binfile}2.o" object [list debug, $additional_flags]] != ""} {
|
||||
perror "Couldn't compile ${testfile}2.c"
|
||||
#return -1
|
||||
}
|
||||
|
||||
if [istarget "hppa*-*-hpux*"] {
|
||||
remote_exec build "ld -b ${binfile}1.o -o ${binfile}1.sl"
|
||||
remote_exec build "ld -b ${binfile}2.o -o ${binfile}2.sl"
|
||||
} else {
|
||||
set additional_flags "additional_flags=-shared"
|
||||
gdb_compile "${binfile}1.o" "${binfile}1.sl" executable [list debug $additional_flags]
|
||||
gdb_compile "${binfile}2.o" "${binfile}2.sl" executable [list debug $additional_flags]
|
||||
}
|
||||
|
||||
# Build a version where the main program is in a shared library. For
|
||||
# testing an indirect call made in a shared library.
|
||||
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}_sl.o" object [list debug $additional_flags]] != ""} {
|
||||
perror "Couldn't compile ${testfile}.c for ${binfile}_sl.o"
|
||||
#return -1
|
||||
}
|
||||
|
||||
if { [istarget "hppa*-*-hpux*"] } {
|
||||
remote_exec build "ld -b ${binfile}_sl.o -o ${binfile}_sl.sl"
|
||||
} else {
|
||||
set additional_flags "additional_flags=-shared"
|
||||
gdb_compile "${binfile}_sl.o" "${binfile}_sl.sl" executable [list debug $additional_flags]
|
||||
}
|
||||
|
||||
if { [istarget "hppa*-*-hpux*"] } {
|
||||
set additional_flags "-Wl,-u,main"
|
||||
if { [gdb_compile "${binfile}_sl.sl" "${binfile}_sl" executable [list debug $additional_flags]] != "" } {
|
||||
untested solib.exp
|
||||
return -1
|
||||
}
|
||||
} else {
|
||||
# FIXME: need to fill this part in for non-HP build
|
||||
}
|
||||
|
||||
#cd ..
|
||||
|
||||
# Start with a fresh gdb
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# This program manually loads and unloads SOM shared libraries, via calls
|
||||
# to shl_load and shl_unload.
|
||||
#
|
||||
if ![runto_main] then { fail "catch load/unload tests suppressed" }
|
||||
|
||||
# Verify that we complain if the user tells us to catch something we
|
||||
# don't understand.
|
||||
#
|
||||
send_gdb "catch a_cold\n"
|
||||
gdb_expect {
|
||||
-re "Unknown event kind specified for catch.*$gdb_prompt $"\
|
||||
{pass "bogus catch kind is disallowed"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "bogus catch kind is disallowed"}
|
||||
timeout {fail "(timeout) bogus catch kind is disallowed"}
|
||||
}
|
||||
|
||||
# Verify that we can set a generic catchpoint on shlib loads. I.e., that
|
||||
# we can catch any shlib load, without specifying the name.
|
||||
#
|
||||
send_gdb "catch load\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\]* .load <any library>.*$gdb_prompt $"\
|
||||
{pass "set generic catch load"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set generic catch load"}
|
||||
timeout {fail "(timeout) set generic catch load"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\] .loaded gdb.base/solib1.sl.*$gdb_prompt $"\
|
||||
{pass "caught generic solib load"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "caught generic solib load"}
|
||||
timeout {fail "(timeout) caught generic solib load"}
|
||||
}
|
||||
|
||||
# Set a breakpoint on the line following the shl_load call, and
|
||||
# continue.
|
||||
#
|
||||
# ??rehrauer: It appears that we can't just say "finish" from here;
|
||||
# GDB is getting confused by the dld's presense on the stack.
|
||||
#
|
||||
send_gdb "break 27\n"
|
||||
gdb_expect {
|
||||
-re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
|
||||
{pass "set break after shl_load"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set break after shl_load"}
|
||||
timeout {fail "(timeout) set break after shl_load"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Breakpoint \[0-9\]*, main .. at .*solib.c:27.*$gdb_prompt $"\
|
||||
{pass "continue after generic catch load"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "continue after generic catch load"}
|
||||
timeout {fail "(timeout) continue after generic catch load"}
|
||||
}
|
||||
|
||||
# Step over the call to shl_findsym.
|
||||
#
|
||||
# ??rehrauer: In theory, since the call to shl_load asked for
|
||||
# immediate binding of the shlib's symbols, and since the
|
||||
# shlib's symbols should have been auto-loaded, we ought to
|
||||
# be able to set a breakpoint on solib_main now. However,
|
||||
# that seems not to be the case. Dunno why for sure; perhaps
|
||||
# the breakpoint wants to be set on an import stub in the
|
||||
# main program for solib_main? There wouldn't be one, in
|
||||
# this case...
|
||||
#
|
||||
send_gdb "next\n"
|
||||
gdb_expect {
|
||||
-re "$gdb_prompt $"\
|
||||
{pass "step over shl_findsym"}
|
||||
timeout {fail "(timeout) step over shl_findsym"}
|
||||
}
|
||||
|
||||
# Verify that we can catch an unload of any library.
|
||||
#
|
||||
send_gdb "catch unload\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\]* .unload <any library>.*$gdb_prompt $"\
|
||||
{pass "set generic catch unload"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set generic catch unload"}
|
||||
timeout {fail "(timeout) set generic catch load"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\] .unloaded gdb.base/solib1.sl.*$gdb_prompt $"\
|
||||
{pass "caught generic solib unload"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "caught generic solib unload"}
|
||||
timeout {fail "(timeout) caught generic solib unload"}
|
||||
}
|
||||
|
||||
# Verify that we can catch a load of a specific library. (Delete
|
||||
# all the other catchpoints first, so that the generic catchpoints
|
||||
# we've previously set don't trigger.)
|
||||
#
|
||||
send_gdb "delete\n"
|
||||
gdb_expect {
|
||||
-re "Delete all breakpoints.*y or n.*"\
|
||||
{send_gdb "y\n"
|
||||
gdb_expect {
|
||||
-re "$gdb_prompt $"\
|
||||
{pass "delete all catchpoints"}
|
||||
timeout {fail "(timeout) delete all catchpoints"}
|
||||
}
|
||||
}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "delete all catchpoints"}
|
||||
timeout {fail "(timeout) delete all catchpoints"}
|
||||
}
|
||||
|
||||
send_gdb "catch load gdb.base/solib2.sl\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\]* .load gdb.base/solib2.sl.*$gdb_prompt $"\
|
||||
{pass "set specific catch load"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set specific catch load"}
|
||||
timeout {fail "(timeout) set specific catch load"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\] .loaded gdb.base/solib2.sl.*$gdb_prompt $"\
|
||||
{pass "caught specific solib load"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "caught specific solib load"}
|
||||
timeout {fail "(timeout) caught specific solib load"}
|
||||
}
|
||||
|
||||
# Verify that we can catch an unload of a specific library.
|
||||
#
|
||||
send_gdb "catch unload gdb.base/solib2.sl\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\]* .unload gdb.base/solib2.sl.*$gdb_prompt $"\
|
||||
{pass "set specific catch unload"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set specific catch unload"}
|
||||
timeout {fail "(timeout) set specific catch unload"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\] .unloaded gdb.base/solib2.sl.*$gdb_prompt $"\
|
||||
{pass "caught specific solib unload"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "caught specific solib unload"}
|
||||
timeout {fail "(timeout) caught specific solib unload"}
|
||||
}
|
||||
|
||||
# Verify that we can set a catchpoint on a specific library that
|
||||
# happens not to be loaded by the program. And, that this catchpoint
|
||||
# won't trigger inappropriately when other shlibs are loaded.
|
||||
#
|
||||
send_gdb "break 55\n"
|
||||
gdb_expect {
|
||||
-re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
|
||||
{pass "set break on shl_unload"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set break on shl_unload"}
|
||||
timeout {fail "(timeout) set break on shl_unload"}
|
||||
}
|
||||
|
||||
send_gdb "break 58\n"
|
||||
gdb_expect {
|
||||
-re "Breakpoint \[0-9\]* at.*$gdb_prompt $"\
|
||||
{pass "set break after shl_unload"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set break after shl_unload"}
|
||||
timeout {fail "(timeout) set break after shl_unload"}
|
||||
}
|
||||
|
||||
send_gdb "catch load foobar.sl\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\]* .load foobar.sl.*$gdb_prompt $"\
|
||||
{pass "set specific catch load for nonloaded shlib"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set specific catch load for nonloaded shlib"}
|
||||
timeout {fail "(timeout) set specific catch load for nonloaded shlib"}
|
||||
}
|
||||
|
||||
send_gdb "catch unload foobar.sl\n"
|
||||
gdb_expect {
|
||||
-re "Catchpoint \[0-9\]* .unload foobar.sl.*$gdb_prompt $"\
|
||||
{pass "set specific catch unload for nonloaded shlib"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "set specific catch unload for nonloaded shlib"}
|
||||
timeout {fail "(timeout) set specific catch unload for nonloaded shlib"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Breakpoint \[0-9\]*.*$gdb_prompt $"\
|
||||
{pass "specific catch load doesn't trigger inappropriately"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "specific catch load doesn't trigger inappropriately"}
|
||||
timeout {fail "(timeout) specific catch load doesn't trigger inappropriately"}
|
||||
}
|
||||
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Breakpoint \[0-9\]*.*$gdb_prompt $"\
|
||||
{pass "specific catch unload doesn't trigger inappropriately"}
|
||||
-re "$gdb_prompt $"\
|
||||
{fail "specific catch unload doesn't trigger inappropriately"}
|
||||
timeout {fail "(timeout) specific catch unload doesn't trigger inappropriately"}
|
||||
}
|
||||
|
||||
# ??rehrauer: There ought to be testpoints here that verify that
|
||||
# load/unload catchpoints can use conditionals, can be temporary,
|
||||
# self-disabling, etc etc.
|
||||
#
|
||||
|
||||
gdb_exit
|
||||
|
||||
#
|
||||
# Test stepping into an indirect call in a shared library.
|
||||
#
|
||||
|
||||
gdb_start
|
||||
gdb_load ${binfile}_sl
|
||||
gdb_test "break main" ".*deferred. at .main..*" "break on main"
|
||||
gdb_test "run" ".*Breakpoint.*main.*solib.c.*" "hit breakpoint at main"
|
||||
gdb_test "break 45" "Breakpoint.*solib.c, line 45.*" "break on indirect call"
|
||||
gdb_test "continue" "Continuing.*solib.c:45.*" \
|
||||
"continue to break on indirect call"
|
||||
gdb_test "step" "solib_main.*solib1.c:17.*return arg.arg.*" \
|
||||
"step into indirect call from a shared library"
|
||||
gdb_exit
|
||||
|
||||
return 0
|
|
@ -1,7 +1,3 @@
|
|||
/* This program is intended to be built as an HP-UX SOM shared
|
||||
library, for use by the solib.exp testcase. It simply returns
|
||||
the square of its integer argument.
|
||||
*/
|
||||
#if defined(__cplusplus) || defined(__STDCPP__)
|
||||
extern "C"
|
||||
#endif
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/* This program is intended to be built as an HP-UX SOM shared
|
||||
library, for use by the solib.exp testcase. It simply returns
|
||||
the cube of its integer argument.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int solib_main (int arg)
|
||||
{
|
||||
return arg*arg*arg;
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -65,7 +65,7 @@ gdb_test "step" ".*${decimal}.*myglob.*" "step into"
|
|||
# to the restoration of the global pointer (which is a caller-save).
|
||||
# Similarly on MIPS PIC targets.
|
||||
set test "step out"
|
||||
if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
|
||||
if { [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} {
|
||||
gdb_test_multiple "finish" "$test" {
|
||||
-re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" {
|
||||
pass "$test"
|
||||
|
@ -157,7 +157,7 @@ gdb_test_multiple "finish" "$test" {
|
|||
# On IA-64, we end up on callee instead of on the following line due
|
||||
# to the restoration of the global pointer.
|
||||
# Similarly on MIPS PIC targets.
|
||||
if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
|
||||
if { [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } {
|
||||
test_i "$test" "stepi" \
|
||||
".*${decimal}.*callee.*STEPI" ".*${decimal}.*callee.*NEXTI"
|
||||
} else {
|
||||
|
|
|
@ -21,19 +21,6 @@
|
|||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Under HPUX 10, the second arg of pthread_create
|
||||
is prototyped to be just a "pthread_attr_t", while under Solaris it
|
||||
is a "pthread_attr_t *". Arg! */
|
||||
|
||||
#if defined (__hpux__)
|
||||
#define PTHREAD_CREATE_ARG2(arg) arg
|
||||
#define PTHREAD_CREATE_NULL_ARG2 null_attr
|
||||
static pthread_attr_t null_attr;
|
||||
#else
|
||||
#define PTHREAD_CREATE_ARG2(arg) &arg
|
||||
#define PTHREAD_CREATE_NULL_ARG2 NULL
|
||||
#endif
|
||||
|
||||
int exit_first_thread = 0;
|
||||
|
||||
void break_at_me (int id, int i)
|
||||
|
@ -71,7 +58,7 @@ create_thread (int id)
|
|||
int *id2 = malloc (sizeof (int));
|
||||
*id2 = id;
|
||||
|
||||
if (pthread_create (&tid, PTHREAD_CREATE_NULL_ARG2, worker, (void *) id2))
|
||||
if (pthread_create (&tid, NULL, worker, (void *) id2))
|
||||
{
|
||||
perror ("pthread_create 1");
|
||||
exit (1);
|
||||
|
|
|
@ -25,19 +25,6 @@
|
|||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Under HPUX 10, the second arg of pthread_create
|
||||
is prototyped to be just a "pthread_attr_t", while under Solaris it
|
||||
is a "pthread_attr_t *". Arg! */
|
||||
|
||||
#if defined (__hpux__)
|
||||
#define PTHREAD_CREATE_ARG2(arg) arg
|
||||
#define PTHREAD_CREATE_NULL_ARG2 null_attr
|
||||
static pthread_attr_t null_attr;
|
||||
#else
|
||||
#define PTHREAD_CREATE_ARG2(arg) &arg
|
||||
#define PTHREAD_CREATE_NULL_ARG2 NULL
|
||||
#endif
|
||||
|
||||
void *
|
||||
routine (void *arg)
|
||||
{
|
||||
|
@ -64,7 +51,7 @@ create_thread (void)
|
|||
{
|
||||
pthread_t tid;
|
||||
|
||||
if (pthread_create (&tid, PTHREAD_CREATE_NULL_ARG2, routine, (void *) 0xfeedface))
|
||||
if (pthread_create (&tid, NULL, routine, (void *) 0xfeedface))
|
||||
{
|
||||
perror ("pthread_create 1");
|
||||
exit (1);
|
||||
|
|
|
@ -19,7 +19,7 @@ if { [is_remote target] || ![isnative] } then {
|
|||
|
||||
# Until "catch exec" is implemented on other targets...
|
||||
#
|
||||
if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
|
||||
if {![istarget "*-linux*"]} then {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -24,19 +24,6 @@
|
|||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Under HPUX 10, the second arg of pthread_create
|
||||
is prototyped to be just a "pthread_attr_t", while under Solaris it
|
||||
is a "pthread_attr_t *". Arg! */
|
||||
|
||||
#if defined (__hpux__)
|
||||
#define PTHREAD_CREATE_ARG2(arg) arg
|
||||
#define PTHREAD_CREATE_NULL_ARG2 null_attr
|
||||
static pthread_attr_t null_attr;
|
||||
#else
|
||||
#define PTHREAD_CREATE_ARG2(arg) &arg
|
||||
#define PTHREAD_CREATE_NULL_ARG2 NULL
|
||||
#endif
|
||||
|
||||
static int verbose = 0;
|
||||
|
||||
static void
|
||||
|
@ -140,7 +127,7 @@ main(argc, argv)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (pthread_create (&tid1, PTHREAD_CREATE_ARG2(attr), thread1, (void *) 0xfeedface))
|
||||
if (pthread_create (&tid1, &attr, thread1, (void *) 0xfeedface))
|
||||
{
|
||||
perror ("pthread_create 1");
|
||||
exit (1);
|
||||
|
@ -148,7 +135,7 @@ main(argc, argv)
|
|||
if (verbose) printf ("Made thread %ld\n", (long) tid1);
|
||||
sleep (1);
|
||||
|
||||
if (pthread_create (&tid2, PTHREAD_CREATE_NULL_ARG2, thread2, (void *) 0xdeadbeef))
|
||||
if (pthread_create (&tid2, NULL, thread2, (void *) 0xdeadbeef))
|
||||
{
|
||||
perror ("pthread_create 2");
|
||||
exit (1);
|
||||
|
|
|
@ -58,7 +58,7 @@ gdb_test_multiple "continue" "$test" {
|
|||
|
||||
set sig "SIG32"
|
||||
|
||||
# SIGRTMIN is 37 on hppa-linux and hpux
|
||||
# SIGRTMIN is 37 on hppa-linux
|
||||
if [istarget hppa*-*-*] {
|
||||
set sig "SIG37"
|
||||
}
|
||||
|
|
|
@ -380,9 +380,6 @@ proc gdb_default_target_compile {source destfile type options} {
|
|||
} elseif {[regexp ".*(osf|irix5|linux).*" $target_triplet]} {
|
||||
# OSF/1 or IRIX 5
|
||||
append add_flags " -Wl,-rpath,$tool_root_dir/libstdc++"
|
||||
} elseif {[regexp ".*hppa.*" $target_triplet]} {
|
||||
# HP-UX
|
||||
append add_flags " -Wl,-a,shared_archive"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2840,15 +2840,6 @@ gdb_caching_proc skip_btrace_pt_tests {
|
|||
return $skip_btrace_tests
|
||||
}
|
||||
|
||||
# Skip all the tests in the file if you are not on an hppa running
|
||||
# hpux target.
|
||||
|
||||
proc skip_hp_tests {} {
|
||||
eval set skip_hp [ expr ![isnative] || ![istarget "hppa*-*-hpux*"] ]
|
||||
verbose "Skip hp tests is $skip_hp"
|
||||
return $skip_hp
|
||||
}
|
||||
|
||||
# Return whether we should skip tests for showing inlined functions in
|
||||
# backtraces. Requires get_compiler_info and get_debug_format.
|
||||
|
||||
|
@ -3374,8 +3365,7 @@ proc gdb_compile {source dest type options} {
|
|||
if { $shlib_load || ($shlib_found && [is_remote target]) } {
|
||||
if { ([istarget "*-*-mingw*"]
|
||||
|| [istarget *-*-cygwin*]
|
||||
|| [istarget *-*-pe*]
|
||||
|| [istarget hppa*-*-hpux*])} {
|
||||
|| [istarget *-*-pe*]) } {
|
||||
# Do not need anything.
|
||||
} elseif { [istarget *-*-freebsd*] || [istarget *-*-openbsd*] } {
|
||||
lappend new_options "ldflags=-Wl,-rpath,${outdir}"
|
||||
|
@ -3554,14 +3544,7 @@ proc gdb_compile_shlib {sources dest options} {
|
|||
}
|
||||
}
|
||||
default {
|
||||
switch -glob [istarget] {
|
||||
"hppa*-hp-hpux*" {
|
||||
lappend obj_options "additional_flags=+z"
|
||||
}
|
||||
default {
|
||||
# don't know what the compiler is...
|
||||
}
|
||||
}
|
||||
# don't know what the compiler is...
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3575,49 +3558,46 @@ proc gdb_compile_shlib {sources dest options} {
|
|||
lappend objects ${outdir}/${sourcebase}.o
|
||||
}
|
||||
|
||||
if [istarget "hppa*-*-hpux*"] {
|
||||
remote_exec build "ld -b ${objects} -o ${dest}"
|
||||
set link_options $options
|
||||
if [test_compiler_info "xlc-*"] {
|
||||
lappend link_options "additional_flags=-qmkshrobj"
|
||||
} else {
|
||||
set link_options $options
|
||||
if [test_compiler_info "xlc-*"] {
|
||||
lappend link_options "additional_flags=-qmkshrobj"
|
||||
} else {
|
||||
lappend link_options "additional_flags=-shared"
|
||||
lappend link_options "additional_flags=-shared"
|
||||
|
||||
if { ([istarget "*-*-mingw*"]
|
||||
|| [istarget *-*-cygwin*]
|
||||
|| [istarget *-*-pe*]) } {
|
||||
if { [is_remote host] } {
|
||||
set name [file tail ${dest}]
|
||||
} else {
|
||||
set name ${dest}
|
||||
}
|
||||
lappend link_options "additional_flags=-Wl,--out-implib,${name}.a"
|
||||
} elseif [is_remote target] {
|
||||
# By default, we do not set the soname. This causes the linker
|
||||
# on ELF systems to create a DT_NEEDED entry in the executable
|
||||
# refering to the full path name of the library. This is a
|
||||
# problem in remote testing if the library is in a different
|
||||
# directory there. To fix this, we set a soname of just the
|
||||
# base filename for the library, and add an appropriate -rpath
|
||||
# to the main executable (in gdb_compile).
|
||||
set destbase [file tail $dest]
|
||||
lappend link_options "additional_flags=-Wl,-soname,$destbase"
|
||||
}
|
||||
}
|
||||
if {[gdb_compile "${objects}" "${dest}" executable $link_options] != ""} {
|
||||
return -1
|
||||
}
|
||||
if { [is_remote host]
|
||||
&& ([istarget "*-*-mingw*"]
|
||||
|| [istarget *-*-cygwin*]
|
||||
|| [istarget *-*-pe*]) } {
|
||||
set dest_tail_name [file tail ${dest}]
|
||||
remote_upload host $dest_tail_name.a ${dest}.a
|
||||
remote_file host delete $dest_tail_name.a
|
||||
if { ([istarget "*-*-mingw*"]
|
||||
|| [istarget *-*-cygwin*]
|
||||
|| [istarget *-*-pe*]) } {
|
||||
if { [is_remote host] } {
|
||||
set name [file tail ${dest}]
|
||||
} else {
|
||||
set name ${dest}
|
||||
}
|
||||
lappend link_options "additional_flags=-Wl,--out-implib,${name}.a"
|
||||
} elseif [is_remote target] {
|
||||
# By default, we do not set the soname. This causes the linker
|
||||
# on ELF systems to create a DT_NEEDED entry in the executable
|
||||
# refering to the full path name of the library. This is a
|
||||
# problem in remote testing if the library is in a different
|
||||
# directory there. To fix this, we set a soname of just the
|
||||
# base filename for the library, and add an appropriate -rpath
|
||||
# to the main executable (in gdb_compile).
|
||||
set destbase [file tail $dest]
|
||||
lappend link_options "additional_flags=-Wl,-soname,$destbase"
|
||||
}
|
||||
}
|
||||
return ""
|
||||
if {[gdb_compile "${objects}" "${dest}" executable $link_options] != ""} {
|
||||
return -1
|
||||
}
|
||||
if { [is_remote host]
|
||||
&& ([istarget "*-*-mingw*"]
|
||||
|| [istarget *-*-cygwin*]
|
||||
|| [istarget *-*-pe*]) } {
|
||||
set dest_tail_name [file tail ${dest}]
|
||||
remote_upload host $dest_tail_name.a ${dest}.a
|
||||
remote_file host delete $dest_tail_name.a
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
# This is just like gdb_compile_shlib, above, except that it tries compiling
|
||||
|
@ -4954,7 +4934,6 @@ gdb_caching_proc gdb_has_argv0 {
|
|||
|| [istarget *-wince-pe] || [istarget *-*-mingw32ce*]
|
||||
|| [istarget *-*-symbianelf*]
|
||||
|| [istarget *-*-osf*]
|
||||
|| [istarget *-*-hpux*]
|
||||
|| [istarget *-*-dicos*]
|
||||
|| [istarget *-*-nto*]
|
||||
|| [istarget *-*-*vms*]
|
||||
|
|
Loading…
Reference in New Issue