http://sourceware.org/ml/gdb-patches/2012-06/msg00065.html Subject: [commit 1/2] testsuite: code_elim.exp: unique names Hi, this is just removal of non-unique test names and one small simplification. Checked in. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-06/msg00011.html ### src/gdb/testsuite/ChangeLog 2012/05/28 20:37:29 1.3209 ### src/gdb/testsuite/ChangeLog 2012/06/03 17:06:04 1.3210 ## -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. --- src/gdb/testsuite/gdb.base/code_elim.exp 2012/01/16 16:21:44 1.4 +++ src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:06:04 1.5 @@ -95,16 +95,16 @@ 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 @@ 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 @@ "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 @@ "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 +} http://sourceware.org/ml/gdb-patches/2012-06/msg00066.html Subject: [commit 2/2] testsuite: code_elim.exp: Fix false FAIL Hi, with Fedora 18 x86_64 (Rawhide) there is a false FAIl since: 2167931cf70f91206efb8b01e848a55d82a347ce is the first bad commit Author: Tom Tromey Date: Fri May 18 15:31:39 2012 +0000 http://sourceware.org/bugzilla/show_bug.cgi?id=13907 print &my_global_symbol -$1 = (int *) 0x804a004 -(gdb) PASS: gdb.base/code_elim.exp: get address of my_global_symbol +$1 = (int *) 0x804a004 +(gdb) FAIL: gdb.base/code_elim.exp: get address of my_global_symbol Nothing really changed, just GDB now prints and the testcase expects either none or suffix. This is because the two symbol files (their sections .data/.bss) have overlapped so GDB chooses randomly which symbol to display. And since Fedora 18 GCC puts there that "completed.5732" symbol. This may be because add-symbol-file FILE ADDR relocates to ADDR on the .text section and leaves other sections at their original place, which is IMO a bit unexpected; it is a FAQ people expect more ADDR to be relocation displacement (and not relative to .text and not limited to .text). But this is really outside of the scope of this testcase false FAIL. Checked in. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-06/msg00012.html ### src/gdb/testsuite/ChangeLog 2012/06/03 17:06:04 1.3210 ### src/gdb/testsuite/ChangeLog 2012/06/03 17:10:28 1.3211 ## -11,6 +11,16 @@ (get address of my_global_func, get address of main): Wrap them to 'order1' and 'order2'. + * gdb.base/code_elim.exp + (add-symbol-file ${testfile1} 0x100000) + (add-symbol-file ${testfile2} 0x200000): Wrap them to 'order1' and + 'order2'. + (order1: add-symbol-file ${testfile1} 0x100000) + (order1: add-symbol-file ${testfile2} 0x200000) + (order2: add-symbol-file ${testfile2} 0x200000) + (order2: add-symbol-file ${testfile1} 0x100000): Add -s .data and -s + .bss as appropriate. + 2012-05-28 Jan Kratochvil * gdb.server/solib-list-lib.c: New file. --- src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:06:04 1.5 +++ src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:10:28 1.6 @@ -128,19 +128,19 @@ 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" - 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 @@ -152,19 +152,19 @@ 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" - 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 http://sourceware.org/ml/gdb-cvs/2012-06/msg00047.html ### src/gdb/ChangeLog 2012/06/06 06:04:42 1.14330 ### src/gdb/ChangeLog 2012/06/06 16:57:34 1.14331 ## -1,3 +1,8 @@ +2012-06-06 Jan Kratochvil + + * configure.ac: Move development=true below AC_INIT. + * configure: Regenerate. + 2012-06-05 Stan Shebs * mi/mi-interp.c (mi_interpreter_init): Set raw_stdout from --- src/gdb/configure 2012/06/01 18:20:18 1.366 +++ src/gdb/configure 2012/06/06 16:57:36 1.367 @@ -2683,6 +2683,11 @@ +# Provide more thorough testing by -lmcheck. +# Set it to 'true' for development snapshots, 'false' for releases or +# pre-releases. +development=true + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --- src/gdb/configure.ac 2012/06/01 18:20:18 1.177 +++ src/gdb/configure.ac 2012/06/06 16:57:38 1.178 @@ -18,16 +18,16 @@ dnl Process this file with autoconf to produce a configure script. -dnl Provide more thorough testing by -lmcheck. -dnl Set it to 'true' for development snapshots, 'false' for releases or -dnl pre-releases. -development=true - AC_PREREQ(2.59)dnl AC_INIT(main.c) AC_CONFIG_HEADER(config.h:config.in) AM_MAINTAINER_MODE +# Provide more thorough testing by -lmcheck. +# Set it to 'true' for development snapshots, 'false' for releases or +# pre-releases. +development=true + AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS ACX_LARGEFILE