From d0d86158062db26b503c76e4df303d19499c232b Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 3 Jun 2012 17:06:04 +0000 Subject: [PATCH] gdb/testsuite/ * gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000): Simplify it to ... (symbol-file ${testfile1}): ... here. (test eliminated var my_global_symbol) (test eliminated var my_static_symbol) (test eliminated var my_global_func, get address of main): Wrap them to 'single psymtabs' and 'single symtabs' (get address of my_global_symbol, get address of my_static_symbol) (get address of my_global_func, get address of main): Wrap them to 'order1' and 'order2'. --- gdb/testsuite/ChangeLog | 13 ++++++++ gdb/testsuite/gdb.base/code_elim.exp | 48 +++++++++++++++------------- 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f7227cfa8c1..f253f41d4fc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2012-06-03 Jan Kratochvil + + * gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000): + Simplify it to ... + (symbol-file ${testfile1}): ... here. + (test eliminated var my_global_symbol) + (test eliminated var my_static_symbol) + (test eliminated var my_global_func, get address of main): Wrap them to + 'single psymtabs' and 'single symtabs' + (get address of my_global_symbol, get address of my_static_symbol) + (get address of my_global_func, get address of main): Wrap them to + 'order1' and 'order2'. + 2012-05-28 Jan Kratochvil * gdb.server/solib-list-lib.c: New file. diff --git a/gdb/testsuite/gdb.base/code_elim.exp b/gdb/testsuite/gdb.base/code_elim.exp index b8ef629a035..cd7dab6bf6c 100644 --- a/gdb/testsuite/gdb.base/code_elim.exp +++ b/gdb/testsuite/gdb.base/code_elim.exp @@ -95,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 @@ -115,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. @@ -138,10 +140,12 @@ gdb_test "add-symbol-file ${binfile2} 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" { + 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. @@ -160,9 +164,9 @@ gdb_test "add-symbol-file ${binfile1} 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" { + 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 +} -- 2.30.2