diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-biarch-core.exp | 29 |
2 files changed, 26 insertions, 9 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 61756207d6b..520f606332a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-07-16 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.arch/i386-biarch-core.exp: Replace istarget + by "complete set gnutarget". Remove expectation for the "core-file" + command. + 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com> Revert the previous commit: diff --git a/gdb/testsuite/gdb.arch/i386-biarch-core.exp b/gdb/testsuite/gdb.arch/i386-biarch-core.exp index 60d049b6f91..bc82287a829 100644 --- a/gdb/testsuite/gdb.arch/i386-biarch-core.exp +++ b/gdb/testsuite/gdb.arch/i386-biarch-core.exp @@ -23,9 +23,20 @@ standard_testfile -if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then { - verbose "Skipping i386-biarch-core test." - return +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir + +set test "complete set gnutarget" +gdb_test_multiple "complete set gnutarget " $test { + -re "set gnutarget elf64-little\r\n(.*\r\n)?$gdb_prompt $" { + pass $test + } + -re "\r\n$gdb_prompt $" { + pass $test + untested ".text is readable" + return + } } set corebz2file ${srcdir}/${subdir}/${testfile}.core.bz2 @@ -43,16 +54,16 @@ if {$corestat(size) != 102400} { return -1 } -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir - # Wrongly built GDB complains by: # "..." is not a core dump: File format not recognized # As the provided test core has 64bit PRSTATUS i386 built GDB cannot parse it. # This is just a problem of the test case, real-world elf64-i386 file will have # 32bit PRSTATUS. One cannot prepare elf64-i386 core file from elf32-i386 by # objcopy as it corrupts the core file beyond all recognition. -gdb_test "core-file ${corefile}" "\r\nwarning: Unexpected size of section `\\.reg/6901' in core file\\.\r\n.*Core was generated by `\[^\r\n\]*'\\.\r\nProgram terminated with signal SIGSEGV, Segmentation fault\\.\r\n.*" "core-file" +# The output therefore does not matter much, just we should not get GDB +# internal error. +gdb_test "core-file ${corefile}" ".*" "core-file" -gdb_test "x/i $address" "\r\n\[ \t\]*$address:\[ \t\]*hlt\[ \t\]*" ".text is readable" +# Test if at least the core file segments memory has been loaded. +# https://bugzilla.redhat.com/show_bug.cgi?id=457187 +gdb_test "x/bx $address" "\r\n\[ \t\]*$address:\[ \t\]*0xf4\[ \t\]*" ".text is readable" |