OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [gdb/] [testsuite/] [gdb.hp/] [gdb.objdbg/] [objdbg04.exp] - Diff between revs 157 and 223

Only display areas with differences | Details | Blame | View Log

Rev 157 Rev 223
# Test reading debug information from in object files.
# Test reading debug information from in object files.
if { [skip_hp_tests] } { continue }
if { [skip_hp_tests] } { continue }
if { ![istarget "hppa*-*-hpux*"] } {
if { ![istarget "hppa*-*-hpux*"] } {
    verbose "HPUX test ignored for non-hppa targets."
    verbose "HPUX test ignored for non-hppa targets."
    return 0
    return 0
}
}
set testfile "test"
set testfile "test"
set srcsubdir ${srcdir}/${subdir}/objdbg04
set srcsubdir ${srcdir}/${subdir}/objdbg04
set objdbgdir ${objdir}/${subdir}/objdbg04
set objdbgdir ${objdir}/${subdir}/objdbg04
set binfile ${objdbgdir}/${testfile}
set binfile ${objdbgdir}/${testfile}
set toolssubdir ${srcdir}/${subdir}/tools
set toolssubdir ${srcdir}/${subdir}/tools
set symaddrfile ${toolssubdir}/symaddr
set symaddrfile ${toolssubdir}/symaddr
# Create and source the file that provides information about the compiler
# Create and source the file that provides information about the compiler
# used to compile the test case.
# used to compile the test case.
if [get_compiler_info ${binfile}] {
if [get_compiler_info ${binfile}] {
    return -1
    return -1
}
}
if {!$hp_aCC_compiler && !$hp_cc_compiler} {
if {!$hp_aCC_compiler && !$hp_cc_compiler} {
  return 0
  return 0
}
}
if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
    untested objdbg04.exp
    untested objdbg04.exp
    return -1
    return -1
}
}
if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
    perror "Couldn't compile x1.cc"
    perror "Couldn't compile x1.cc"
    return -1
    return -1
}
}
if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
    perror "Couldn't compile x2.cc"
    perror "Couldn't compile x2.cc"
    return -1
    return -1
}
}
if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
    perror "Couldn't compile x1.cc"
    perror "Couldn't compile x1.cc"
    return -1
    return -1
}
}
if { [gdb_compile "${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
if { [gdb_compile "${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } {
    perror "Couldn't compile x1.cc"
    perror "Couldn't compile x1.cc"
    return -1
    return -1
}
}
# Test two executables. The first has x1.cc linked first, the second
# Test two executables. The first has x1.cc linked first, the second
# has x2.cc linked first.  The difference is which COMDAT section was
# has x2.cc linked first.  The difference is which COMDAT section was
# picked.
# picked.
for {set filenum 0} {$filenum < 2} {incr filenum 1} {
for {set filenum 0} {$filenum < 2} {incr filenum 1} {
  gdb_exit
  gdb_exit
  gdb_start
  gdb_start
  gdb_reinitialize_dir ${srcsubdir}
  gdb_reinitialize_dir ${srcsubdir}
  gdb_load ${binfile}${filenum}
  gdb_load ${binfile}${filenum}
  gdb_test "ptype Adder" "type = template  (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder|)"
  gdb_test "ptype Adder" "type = template  (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder|)"
  gdb_test "ptype Adder" "type = (class |)Adder {.*private:.*int val;.*public:.*void set( |)\\(int\\);.*int get( |)\\(void\\);.*int add( |)\\(int\\);.*}"
  gdb_test "ptype Adder" "type = (class |)Adder {.*private:.*int val;.*public:.*void set( |)\\(int\\);.*int get( |)\\(void\\);.*int add( |)\\(int\\);.*}"
  gdb_test "ptype Adder" "type = template  (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder|)"
  gdb_test "ptype Adder" "type = template  (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder|)"
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.