Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: gdb/testsuite/gdb.base/sepdebug.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/sepdebug.c ('k') | gdb/testsuite/gdb.base/sepsymtab.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/sepdebug.exp
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp
index 752ff0c4aa6e31b918fd6b70ab9122f024b7c8b9..e6973fb9a6f8a663821b113a61467dea79d0aa60 100644
--- a/gdb/testsuite/gdb.base/sepdebug.exp
+++ b/gdb/testsuite/gdb.base/sepdebug.exp
@@ -26,10 +26,6 @@
# ".debug-id/ab/cdef.debug" file.
-if $tracelevel then {
- strace $tracelevel
-}
-
#
# test running programs
#
@@ -45,7 +41,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Note: the procedure gdb_gnu_strip_debug will produce an executable called
# ${binfile}, which is just like the executable ($binfile) but without
-# the debuginfo. Instead $binfile has a .gnudebuglink section which contains
+# the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
# the name of a debuginfo only file. This file will be stored in the
# gdb.base/ subdirectory.
@@ -55,17 +51,31 @@ if [gdb_gnu_strip_debug $binfile] {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+#
+# PR gdb/9538. Verify that symlinked executable still finds the separate
+# debuginfo.
+#
+set old_subdir ${subdir}
+set subdir ${subdir}/pr9538
+
+# Cleanup any stale state.
+remote_exec build "rm -rf ${subdir}"
+
+remote_exec build "mkdir ${subdir}"
+remote_exec build "ln -s ${binfile} ${subdir}"
+clean_restart ${testfile}${EXEEXT}
if { $gdb_file_cmd_debug_info != "debug" } then {
fail "No debug information found."
}
-if [target_info exists gdb_stub] {
- gdb_step_for_stub;
+# Restore subdir
+set subdir ${old_subdir}
+
+clean_restart ${testfile}${EXEEXT}
+if { $gdb_file_cmd_debug_info != "debug" } then {
+ fail "No debug information found."
}
+
#
# test simple breakpoint setting commands
#
@@ -140,17 +150,9 @@ gdb_test "break multi_line_while_conditional" \
"Breakpoint.*at.* file .*$srcfile, line $bp_location4\\." \
"breakpoint at start of multi line while conditional"
-set bp_location5 [gdb_get_line_number "set breakpoint 5 here"]
set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
-#
-# check to see what breakpoints are set
-#
-if [target_info exists gdb_stub] {
- set main_line $bp_location5
-} else {
- set main_line $bp_location6
-}
+set main_line $bp_location6
set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here"]
@@ -172,9 +174,6 @@ gdb_test "info break" \
# handle arguments.
# Huh? There doesn't *appear* to be anything that passes arguments
# below.
-if [istarget "mips-idt-*"] then {
- return
-}
#
# run until the breakpoint at main is hit. For non-stubs-using targets.
@@ -379,14 +378,7 @@ gdb_test_multiple "break $bp_location1" \
}
}
-send_gdb "commands $expect_out(1,string)\n"
-send_gdb "silent\n"
-send_gdb "end\n"
-gdb_expect {
- -re ".*$gdb_prompt $"\
- {pass "set silent break bp_location1"}
- timeout {fail "(timeout) set silent break bp_location1"}
-}
+gdb_test "commands $expect_out(1,string)\nsilent\nend" ">end" "set silent break bp_location1"
gdb_test "info break $expect_out(1,string)" \
"\[0-9\]*\[ \t\]*breakpoint.*:$bp_location1\r\n\[ \t\]*silent.*" \
@@ -416,7 +408,7 @@ gdb_test "break $bp_location12 thread foo" \
#
gdb_test "break $bp_location12 foo" \
- "Junk at end of arguments.*" \
+ "malformed linespec error: unexpected string, \"foo\".*" \
"breakpoint with trailing garbage disallowed"
# Verify that GDB responds gracefully to a "clear" command that has
@@ -657,14 +649,10 @@ test_next_with_recursion
#********
-proc test_different_dir {type test_different_dir xfail} {
+proc test_different_dir {type test_different_dir xfail} { with_test_prefix "$type" {
global srcdir subdir objdir binfile srcfile timeout gdb_prompt
- global pf_prefix
global bp_location6 decimal hex
- set old_pf_prefix $pf_prefix
- append pf_prefix " $type:"
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
@@ -672,10 +660,6 @@ proc test_different_dir {type test_different_dir xfail} {
"set separate debug location"
gdb_load ${binfile}
- if [target_info exists gdb_stub] {
- gdb_step_for_stub;
- }
-
#
# test break at function
#
@@ -758,9 +742,8 @@ proc test_different_dir {type test_different_dir xfail} {
gdb_test_no_output "set args main"
}
- set pf_prefix $old_pf_prefix
# proc test_different_dir
-}
+}}
# now move the .debug file to a different location so that we can test
« no previous file with comments | « gdb/testsuite/gdb.base/sepdebug.c ('k') | gdb/testsuite/gdb.base/sepsymtab.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698