diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-12-19 22:20:07 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-12-19 22:20:07 +0000 |
commit | f6eeced03db615a949de8d43c4e4402209a7bada (patch) | |
tree | 5edfb5fb447ebee708093bad729511bc711d15b9 /gdb/testsuite | |
parent | 8de7d199bbcce5fffad187294a57106ad82af16b (diff) | |
download | gdb-f6eeced03db615a949de8d43c4e4402209a7bada.zip gdb-f6eeced03db615a949de8d43c4e4402209a7bada.tar.gz gdb-f6eeced03db615a949de8d43c4e4402209a7bada.tar.bz2 |
gdb/
* symfile.c (reread_symbols): Move free_objfile_separate_debug,
preserve_values, sym_finish and clear_objfile_data calls before BFD
close. Move free_objfile_separate_debug as the very first call. New
comment on the ordering.
gdb/testsuite/
* gdb.base/reread.exp: If srcfile2 fails to build retry it with
-DNO_SECTIONS.
* gdb.base/reread2.c <!NO_SECTIONS>: New sections block.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/reread.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/reread2.c | 11 |
3 files changed, 19 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bca2d34..e815b07 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2011-12-19 Jan Kratochvil <jan.kratochvil@redhat.com> + * gdb.base/reread.exp: If srcfile2 fails to build retry it with + -DNO_SECTIONS. + * gdb.base/reread2.c <!NO_SECTIONS>: New sections block. + +2011-12-19 Jan Kratochvil <jan.kratochvil@redhat.com> + * gdb.cp/ptype-cv-cp.exp (ptype v_volatile_const_my_int): Make PR gcc/45997 XFAIL conditional for gcc <= 4.5. * gdb.python/py-type.exp (python print ttype.template_argument(2)): diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp index 291de54..dca25f8 100644 --- a/gdb/testsuite/gdb.base/reread.exp +++ b/gdb/testsuite/gdb.base/reread.exp @@ -38,7 +38,8 @@ set testfile2 "reread2" set srcfile2 ${testfile2}.c set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT -if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug nowarnings}] != "" } { +if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug nowarnings}] != "" + && [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug nowarnings additional_flags=-DNO_SECTIONS}] != ""} { untested reread.exp return -1 } diff --git a/gdb/testsuite/gdb.base/reread2.c b/gdb/testsuite/gdb.base/reread2.c index 181616c..f45f29e 100644 --- a/gdb/testsuite/gdb.base/reread2.c +++ b/gdb/testsuite/gdb.base/reread2.c @@ -15,3 +15,14 @@ int main() foo(); return 0; } + +/* Ensure the new file will have more sections. It may exploit code not + updating its SECTION_COUNT on reread_symbols. */ + +#ifndef NO_SECTIONS +# define VAR0(n) __attribute__ ((section ("sect" #n))) int var##n; +# define VAR1(n) VAR0 (n ## 0) VAR0(n ## 1) VAR0(n ## 2) VAR0(n ## 3) +# define VAR2(n) VAR1 (n ## 0) VAR1(n ## 1) VAR1(n ## 2) VAR1(n ## 3) +# define VAR3(n) VAR2 (n ## 0) VAR2(n ## 1) VAR2(n ## 2) VAR2(n ## 3) +VAR3 (0) +#endif |