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

Unified Diff: gdb/testsuite/gdb.base/code_elim.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/code-expr.exp ('k') | gdb/testsuite/gdb.base/commands.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/code_elim.exp
diff --git a/gdb/testsuite/gdb.base/code_elim.exp b/gdb/testsuite/gdb.base/code_elim.exp
index 7369a9c113dc2e80fcc6324e29cac274f2fd0e44..9779534f9cf8aa8852e97c3cb8eafaba88828a53 100644
--- a/gdb/testsuite/gdb.base/code_elim.exp
+++ b/gdb/testsuite/gdb.base/code_elim.exp
@@ -16,10 +16,6 @@
# code_elim.exp -- tests that GDB can handle executables where some data/code
# has been eliminated by the linker.
-if $tracelevel then {
- strace $tracelevel
-}
-
set testfile1 code_elim1
set testfile2 code_elim2
set srcfile1 ${testfile1}.c
@@ -99,16 +95,16 @@ proc test_eliminated_var { var } {
gdb_exit
gdb_start
-gdb_test "add-symbol-file ${binfile1} 0x100000" \
+gdb_test "symbol-file ${binfile1}" \
"Reading symbols from .*${testfile1}\\.\\.\\.done\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \
- "add-symbol-file ${testfile1} 0x100000" \
- "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
- "y"
+ "symbol-file ${testfile1}"
-test_eliminated_var my_global_symbol
-test_eliminated_var my_static_symbol
-test_eliminated_var my_global_func
-not_null_var_address main
+with_test_prefix "single psymtabs" {
+ test_eliminated_var my_global_symbol
+ test_eliminated_var my_static_symbol
+ test_eliminated_var my_global_func
+ not_null_var_address main
+}
# Same thing for symtabs
@@ -119,10 +115,12 @@ set GDBFLAGS "$GDBFLAGS --readnow $binfile1"
gdb_start
set GDBFLAGS $saved_gdbflags
-test_eliminated_var my_global_symbol
-test_eliminated_var my_static_symbol
-test_eliminated_var my_global_func
-not_null_var_address main
+with_test_prefix "single symtabs" {
+ test_eliminated_var my_global_symbol
+ test_eliminated_var my_static_symbol
+ test_eliminated_var my_global_func
+ not_null_var_address main
+}
# binfile2 contains the symbols that have been eliminated in binfile1. Check
# the eliminated symbols does not hide these valid ones.
@@ -130,43 +128,45 @@ not_null_var_address main
gdb_exit
gdb_start
-gdb_test "add-symbol-file ${binfile1} 0x100000" \
- "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile1} 0x100000" \
- "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
- "y"
-
-gdb_test "add-symbol-file ${binfile2} 0x200000" \
- "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile2} 0x200000" \
- "add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \
- "y"
-
-not_null_var_address my_global_symbol
-not_null_var_address my_static_symbol
-not_null_var_address my_global_func
-not_null_var_address main
+with_test_prefix "order1" {
+ gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \
+ "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile1} 0x100000" \
+ "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \
+ "y"
+
+ gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \
+ "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile2} 0x200000" \
+ "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \
+ "y"
+
+ not_null_var_address my_global_symbol
+ not_null_var_address my_static_symbol
+ not_null_var_address my_global_func
+ not_null_var_address main
+}
# Same thing, but loading binfile2 before binfile1.
gdb_exit
gdb_start
-gdb_test "add-symbol-file ${binfile2} 0x200000" \
- "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile2} 0x200000" \
- "add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \
- "y"
-
-gdb_test "add-symbol-file ${binfile1} 0x100000" \
- "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
- "add-symbol-file ${testfile1} 0x100000" \
- "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \
- "y"
-
-not_null_var_address my_global_symbol
-not_null_var_address my_static_symbol
-not_null_var_address my_global_func
-not_null_var_address main
-
-
+with_test_prefix "order2" {
+ gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \
+ "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile2} 0x200000" \
+ "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \
+ "y"
+
+ gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \
+ "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile1} 0x100000" \
+ "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \
+ "y"
+
+ not_null_var_address my_global_symbol
+ not_null_var_address my_static_symbol
+ not_null_var_address my_global_func
+ not_null_var_address main
+}
« no previous file with comments | « gdb/testsuite/gdb.base/code-expr.exp ('k') | gdb/testsuite/gdb.base/commands.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698