OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-old/gdb-6.8/gdb/testsuite/gdb.hp/gdb.objdbg
    from Rev 816 to Rev 827
    Reverse comparison

Rev 816 → Rev 827

/configure File deleted
configure Property changes : Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: Makefile.in =================================================================== --- Makefile.in (revision 816) +++ Makefile.in (nonexistent) @@ -1,28 +0,0 @@ -VPATH = @srcdir@ -srcdir = @srcdir@ - -EXECUTABLES = objdbg01/test0 objdbg01/test1 objdbg02/test \ - objdbg03/test objdbg04/test0 objdbg04/test1 - -all: - @echo "Nothing to be done for all..." - -info: -install-info: -dvi: -install: -uninstall: force -installcheck: -check: - -clean mostlyclean: - -rm -f *~ objdbg*/*.o objdbg*/*.ci - -rm -f core $(EXECUTABLES) - -distclean maintainer-clean realclean: clean - -rm -f Makefile config.status config.log - -rm -f *-init.exp - -rm -fr *.log summary detail *.plog *.sum *.psum site.* - -Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in - $(SHELL) ./config.status --recheck Index: tools/symaddr =================================================================== --- tools/symaddr (revision 816) +++ tools/symaddr (nonexistent) @@ -1,8 +0,0 @@ -#!/bin/ksh - -# Get the address of a symbol in Hex. -# $1 = object/executable file name -# $2 = symbol name -${srcdir}/gdb.hp/tools/odump -sym "$1" | grep "$2"$ | awk '{print $1}' - -exit 0
tools/symaddr Property changes : Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: tools/test-objdbg.cc =================================================================== --- tools/test-objdbg.cc (revision 816) +++ tools/test-objdbg.cc (nonexistent) @@ -1,4 +0,0 @@ -int main() -{ - return 0; -} Index: tools/symaddr.pa64 =================================================================== --- tools/symaddr.pa64 (revision 816) +++ tools/symaddr.pa64 (nonexistent) @@ -1,8 +0,0 @@ -#!/bin/ksh - -# Get the address of a symbol in Hex. -# $1 = object/executable file name -# $2 = symbol name -/usr/ccs/bin/elfdump -t +s .symtab "$1" | grep "$2"$ | awk '{print $6}' - -exit 0
tools/symaddr.pa64 Property changes : Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: configure.ac =================================================================== --- configure.ac (revision 816) +++ configure.ac (nonexistent) @@ -1,16 +0,0 @@ -dnl Process this file file with autoconf to produce a configure script. -dnl This file is a shell script fragment that supplies the information -dnl necessary to tailor a template configure script into the configure -dnl script appropriate for this directory. For more information, check -dnl any existing configure script. - -AC_PREREQ(2.59) -AC_INIT(objdbg01.exp) - -CC=${CC-cc} -AC_SUBST(CC) -AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..) -AC_CANONICAL_SYSTEM -AC_CONFIG_SUBDIRS(objdbg01 objdbg02 objdbg03 objdbg04) - -AC_OUTPUT(Makefile)
configure.ac Property changes : Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -Id \ No newline at end of property Index: objdbg01.exp =================================================================== --- objdbg01.exp (revision 816) +++ objdbg01.exp (nonexistent) @@ -1,223 +0,0 @@ -# Test reading debug information from in object files. - -if { [skip_hp_tests] } { continue } - -if { ![istarget "hppa*-*-hpux*"] } { - verbose "HPUX test ignored for non-hppa targets." - return 0 -} - -set testfile "test" -set srcsubdir ${srcdir}/${subdir}/objdbg01 -set toolssubdir ${srcdir}/${subdir}/tools -set objdbgdir ${objdir}/${subdir}/objdbg01 -set binfile ${objdbgdir}/${testfile} -set symaddrfile ${toolssubdir}/symaddr - -# Create and source the file that provides information about the compiler -# used to compile the test case. -if [get_compiler_info ${binfile}] { - return -1 -} - -if {!$hp_aCC_compiler && !$hp_cc_compiler} { - return 0 -} - -if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } { - untested objdbg01.exp - return -1 -} - -if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x1.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x2.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x3.cc" - return -1 -} - -if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o ${objdbgdir}/x3.o" "${binfile}0" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile ${binfile}0" - return -1 -} - -if {[gdb_compile "${objdbgdir}/x3.o ${objdbgdir}/x2.o ${objdbgdir}/x1.o" "${binfile}1" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile ${binfile}1" - return -1 -} - -# Test two executables. The first has x1.cc linked first, the second -# has x3.cc linked first. The difference is that in the first one, -# the Info instantiation from x1.cc is taken, in the second, its -# from x3.cc. - -for {set filenum 0} {$filenum < 2} {incr filenum 1} { - - # Lets test some commons - # Need to restart each to to make sure objects are not loaded - # Also cross check the address with what is actually in the - # object file (call the executable ${symaddrfile} to retrieve the - # information). - - set exec_output [lindex [remote_exec build "${symaddrfile} ${binfile}${filenum} acomm"] 1] - regsub -all "\[\r\n\]" ${exec_output} "" exec_output - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "p &acomm" "..* = \\(int \[*\]\\) 0x${exec_output}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 20." - gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:20.*20.*acomm.*=.*1.*" - gdb_test "s 1" "21.*" - gdb_test "p acomm" ".* = 1.*" - gdb_test "p &acomm" "..* = \\(int \[*\]\\) 0x${exec_output}.*" - - # Step through each line. - # Do this three times. - # First round: Test that things are okay after printing commons - # above. - # Second round: Restart gdb and make sure we can walk through - # Third round: Do NOT restrart gdb to verify that the debug information - # was not messed up by loading additional object files from - # the first run through. - for {set i 0} {$i < 3} {incr i 1} { - if $i==1 then { - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - } - if $i!=2 then { - gdb_test "b main" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 20." - } - if $i!=0 then { - gdb_test "run" \ - "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:20.*" - gdb_test "s 1" "21.*" - } - gdb_test "s 1" "Info::p .*/x3.h:11.*" - gdb_test "s 1" "PP::print .*/x2.cc:8.*" - gdb_test "s 1" ".*9.*" - gdb_test "s 1" "Info::p .*/x3.h:12.*" - gdb_test "s 1" "main .*/x1.cc:22.*" - gdb_test "s 1" "foo .*/x3.cc:5.*" - gdb_test "s 1" "Info::p .*/x3.h:11.*" - gdb_test "s 1" "PP::print .*/x2.cc:8.*" - gdb_test "s 1" ".*9.*" - gdb_test "s 1" "Info::p .*/x3.h:12.*" - gdb_test "s 1" "foo .*/x3.cc:6.*" - gdb_test "s 1" "Info::p .*/x3.h:11.*" - gdb_test "s 1" "QQ::print .*/x2.cc:13.*" - gdb_test "s 1" ".*14.*" - gdb_test "s 1" "Info::p .*/x3.h:12.*" - gdb_test "s 1" "foo .*/x3.cc:7.*" - gdb_test "s 1" "main .*/x1.cc:24.*" - gdb_test "s 1" ".*25.*" - if [istarget "hppa64-*-*"] { - gdb_test "s 1" "0x\[0-9a-f\]+ in .*" - gdb_test "c" ".*Program exited normally.*" - } else { - gdb_test "s 1" "0x\[0-9a-f\]+ in _start .*" - gdb_test "s 1" ".*Program exited normally.*" - } - } - - # Test various ptypes, and combinations of them - # Test things multiple times in each set to make sure that the debug - # information did not get messed up. - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*" - gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*" - gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*" - gdb_test "ptype QQ" "type = (class |)QQ {..*void print( |)..*}.*" - gdb_test "ptype PP" "type = (class |)PP {..*void print( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype Info" "type = template <..*> (class |)Info {..*}.*" - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype Info" "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype Info" "type = template <..*> (class |)Info {..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*" - gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*" - gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*" - gdb_test "ptype class QQ" "type = (class |)QQ {..*void print( |)..*}.*" - gdb_test "ptype class PP" "type = (class |)PP {..*void print( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype class Info" \ - "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype class Info" \ - "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype class Info" \ - "type = (class |)Info {..*void p( |)..*}.*" - - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - gdb_test "ptype class Info" \ - "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype class Info" \ - "type = (class |)Info {..*void p( |)..*}.*" - gdb_test "ptype class Info" \ - "type = (class |)Info {..*void p( |)..*}.*" -} - Index: objdbg02.exp =================================================================== --- objdbg02.exp (revision 816) +++ objdbg02.exp (nonexistent) @@ -1,86 +0,0 @@ -# Test reading debug information from in object files. - -if { [skip_hp_tests] } { continue } - -if { ![istarget "hppa*-*-hpux*"] } { - verbose "HPUX test ignored for non-hppa targets." - return 0 -} - -set testfile "test" -set srcsubdir ${srcdir}/${subdir}/objdbg02 -set objdbgdir ${objdir}/${subdir}/objdbg02 -set binfile ${objdbgdir}/${testfile} -set toolssubdir ${srcdir}/${subdir}/tools - -# Create and source the file that provides information about the compiler -# used to compile the test case. -if [get_compiler_info ${binfile}] { - return -1 -} - -if {!$hp_aCC_compiler && !$hp_cc_compiler} { - return 0 -} - -if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } { - untested objdbg02.exp - return -1 -} - -if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x1.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x2.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x3.cc" - return -1 -} - -remote_exec build "rm -f ${objdbgdir}/test.a" -set status [remote_exec build "ar cr ${objdbgdir}/test.a ${objdbgdir}/x2.o ${objdbgdir}/x3.o"] -if { [lindex $status 0] != 0 } { - perror "Couldn't compile test.a" - return -1 -} -remote_exec build "rm -f ${objdbgdir}/x2.o ${objdbgdir}/x3.o" - -if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/test.a" "$binfile" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile ${binfile}" - return -1 -} - -# Test loading debug information from an archive file - -gdb_exit -gdb_start -gdb_reinitialize_dir ${srcsubdir} -gdb_load ${binfile} - -gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 12." -gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:12.*" -gdb_test "s 1" ".*13.*" -gdb_test "s 1" "foo1 .*/x2.cc:15.*" -gdb_test "s 1" ".*16.*" -gdb_test "s 1" "foo2 .*/x2.cc:10.*" -gdb_test "s 1" ".*11.*" -gdb_test "s 1" "foo1 .*/x2.cc:17.*" -gdb_test "s 1" "main .*/x1.cc:14.*" -gdb_test "s 1" "foo3 .*/x3.cc:5.*" -gdb_test "s 1" ".*6.*" -gdb_test "s 1" "main .*/x1.cc:15.*" -gdb_test "s 1" ".*16.*" -if [istarget "hppa64-*-*"] { - gdb_test "s 1" "0x\[0-9a-f\]+ in .*START.*" - gdb_test "c" ".*Program exited normally.*" -} else { - gdb_test "s 1" "0x\[0-9a-f\]+ in _start .*" - gdb_test "s 1" ".*Program exited normally.*" -} - Index: objdbg03.exp =================================================================== --- objdbg03.exp (revision 816) +++ objdbg03.exp (nonexistent) @@ -1,165 +0,0 @@ -# Test reading debug information from in object files. - -if { [skip_hp_tests] } { continue } - -if { ![istarget "hppa*-*-hpux*"] } { - verbose "HPUX test ignored for non-hppa targets." - return 0 -} - -set testfile "test" -set srcsubdir ${srcdir}/${subdir}/objdbg03 -set objdbgdir ${objdir}/${subdir}/objdbg03 -set binfile ${objdbgdir}/${testfile} -set toolssubdir ${srcdir}/${subdir}/tools -if [istarget "hppa64-*-*"] { - set symaddrfile ${toolssubdir}/symaddr.pa64 -} else { - set symaddrfile ${toolssubdir}/symaddr -} - -# Create and source the file that provides information about the compiler -# used to compile the test case. -if [get_compiler_info ${binfile}] { - return -1 -} - -if {!$hp_aCC_compiler && !$hp_cc_compiler} { - return 0 -} - -if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } { - untested objdbg03.exp - return -1 -} - -if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x1.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x2.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x3.cc" "${objdbgdir}/x3.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x3.cc" - return -1 -} - -if { [gdb_compile "${objdbgdir}/x1.o ${objdbgdir}/x2.o ${objdbgdir}/x3.o" "${binfile}" executable "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile ${binfile}" - return -1 -} - -# -# Test some normal commons -# - -# Print the types - -gdb_exit -gdb_start -gdb_reinitialize_dir ${srcsubdir} -gdb_load ${binfile} - -gdb_test "ptype common1" "type = int" -gdb_test "ptype common2" "type = int" -gdb_test "ptype common3" "type = int" -gdb_test "ptype data1" "type = int" -gdb_test "ptype data2" "type = int" -gdb_test "ptype data3" "type = int" -gdb_test "ptype common11" "type = int" -gdb_test "ptype common10" "type = int" -gdb_test "ptype data10" "type = int" -gdb_test "ptype data11" "type = int" - -# Print the values - -gdb_exit -gdb_start -gdb_reinitialize_dir ${srcsubdir} -gdb_load ${binfile} - -gdb_test "b main" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file ..*/x1.cc, line 11." -gdb_test "run" "Starting program:.*Breakpoint \[0-9\]+, main .*/x1.cc:11.*" -gdb_test "p data1" "..* = 1" -gdb_test "p data2" "..* = 2" -gdb_test "p data3" "..* = 3" -gdb_test "p data10" "..* = 10" -gdb_test "p data11" "..* = 11" -gdb_test "n" ".*12.*" -gdb_test "p common11" "..* = 11" - -gdb_test "s 1" "foo .*/x3.cc:15.*" -gdb_test "s 4" ".*20.*" -gdb_test "p data4" "..* = 4" -gdb_test "p common4" "..* = 4" -gdb_test "n" ".*21.*" - -gdb_test "n" "main .*/x1.cc:14.*" -gdb_test "p common1" "..* = 1" -gdb_test "p common2" "..* = 2" -gdb_test "p common3" "..* = 3" - -# Verify that addresses match those in the executable - -gdb_exit -gdb_start -gdb_reinitialize_dir ${srcsubdir} -gdb_load ${binfile} - -set exec_output_data1 [lindex [remote_exec build "${symaddrfile} ${binfile} data1"] 1] -regsub -all "\[\r\n\]" ${exec_output_data1} "" exec_output_data1 - -set exec_output_data2 [lindex [remote_exec build "${symaddrfile} ${binfile} data2"] 1] -regsub -all "\[\r\n\]" ${exec_output_data2} "" exec_output_data2 - -set exec_output_data3 [lindex [remote_exec build "${symaddrfile} ${binfile} data3"] 1] -regsub -all "\[\r\n\]" ${exec_output_data3} "" exec_output_data3 - -set exec_output_data10 [lindex [remote_exec build "${symaddrfile} ${binfile} data10"] 1] -regsub -all "\[\r\n\]" ${exec_output_data10} "" exec_output_data10 - -set exec_output_data11 [lindex [remote_exec build "${symaddrfile} ${binfile} data11"] 1] -regsub -all "\[\r\n\]" ${exec_output_data11} "" exec_output_data11 - -set exec_output_common1 [lindex [remote_exec build "${symaddrfile} ${binfile} common1"] 1] -regsub -all "\[\r\n\]" ${exec_output_common1} "" exec_output_common1 - -set exec_output_common2 [lindex [remote_exec build "${symaddrfile} ${binfile} common2"] 1] -regsub -all "\[\r\n\]" ${exec_output_common2} "" exec_output_common2 - -set exec_output_common3 [lindex [remote_exec build "${symaddrfile} ${binfile} common3"] 1] -regsub -all "\[\r\n\]" ${exec_output_common3} "" exec_output_common3 - -set exec_output_common10 [lindex [remote_exec build "${symaddrfile} ${binfile} common10"] 1] -regsub -all "\[\r\n\]" ${exec_output_common10} "" exec_output_common10 - -set exec_output_common11 [lindex [remote_exec build "${symaddrfile} ${binfile} common11"] 1] -regsub -all "\[\r\n\]" ${exec_output_common11} "" exec_output_common11 - -if [istarget "hppa64-*-*"] { - gdb_test "p &data1" "..* = \\(int \[*\]\\) ${exec_output_data1}" - gdb_test "p &data2" "..* = \\(int \[*\]\\) ${exec_output_data2}" - gdb_test "p &data3" "..* = \\(int \[*\]\\) ${exec_output_data3}" - gdb_test "p &data10" "..* = \\(int \[*\]\\) ${exec_output_data10}" - gdb_test "p &data11" "..* = \\(int \[*\]\\) ${exec_output_data11}" - gdb_test "p &common1" "..* = \\(int \[*\]\\) ${exec_output_common1}" - gdb_test "p &common2" "..* = \\(int \[*\]\\) ${exec_output_common2}" - gdb_test "p &common3" "..* = \\(int \[*\]\\) ${exec_output_common3}" - gdb_test "p &common10" "..* = \\(int \[*\]\\) ${exec_output_common10}" - gdb_test "p &common11" "..* = \\(int \[*\]\\) ${exec_output_common11}" -} else { - gdb_test "p &data1" "..* = \\(int \[*\]\\) 0x${exec_output_data1}" - gdb_test "p &data2" "..* = \\(int \[*\]\\) 0x${exec_output_data2}" - gdb_test "p &data3" "..* = \\(int \[*\]\\) 0x${exec_output_data3}" - gdb_test "p &data10" "..* = \\(int \[*\]\\) 0x${exec_output_data10}" - gdb_test "p &data11" "..* = \\(int \[*\]\\) 0x${exec_output_data11}" - gdb_test "p &common1" "..* = \\(int \[*\]\\) 0x${exec_output_common1}" - gdb_test "p &common2" "..* = \\(int \[*\]\\) 0x${exec_output_common2}" - gdb_test "p &common3" "..* = \\(int \[*\]\\) 0x${exec_output_common3}" - gdb_test "p &common10" "..* = \\(int \[*\]\\) 0x${exec_output_common10}" - gdb_test "p &common11" "..* = \\(int \[*\]\\) 0x${exec_output_common11}" -} Index: objdbg04.exp =================================================================== --- objdbg04.exp (revision 816) +++ objdbg04.exp (nonexistent) @@ -1,66 +0,0 @@ -# Test reading debug information from in object files. - -if { [skip_hp_tests] } { continue } - -if { ![istarget "hppa*-*-hpux*"] } { - verbose "HPUX test ignored for non-hppa targets." - return 0 -} - -set testfile "test" -set srcsubdir ${srcdir}/${subdir}/objdbg04 -set objdbgdir ${objdir}/${subdir}/objdbg04 -set binfile ${objdbgdir}/${testfile} -set toolssubdir ${srcdir}/${subdir}/tools -set symaddrfile ${toolssubdir}/symaddr - -# Create and source the file that provides information about the compiler -# used to compile the test case. -if [get_compiler_info ${binfile}] { - return -1 -} - -if {!$hp_aCC_compiler && !$hp_cc_compiler} { - return 0 -} - -if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } { - untested objdbg04.exp - return -1 -} - -if { [gdb_compile "${srcsubdir}/x1.cc" "${objdbgdir}/x1.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x1.cc" - return -1 -} - -if { [gdb_compile "${srcsubdir}/x2.cc" "${objdbgdir}/x2.o" object "debug c++ {additional_flags=-I${srcsubdir} +objdebug}"] != "" } { - perror "Couldn't compile x2.cc" - return -1 -} - -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" - return -1 -} - -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" - return -1 -} - -# Test two executables. The first has x1.cc linked first, the second -# has x2.cc linked first. The difference is which COMDAT section was -# picked. - -for {set filenum 0} {$filenum < 2} {incr filenum 1} { - gdb_exit - gdb_start - gdb_reinitialize_dir ${srcsubdir} - gdb_load ${binfile}${filenum} - - 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 = template (class |)Adder {..*T val.*;.*}(.*template instantiations:.*Adder|)" - -} Index: objdbg01/x3.h =================================================================== --- objdbg01/x3.h (revision 816) +++ objdbg01/x3.h (nonexistent) @@ -1,22 +0,0 @@ - -template -class Info { -public: - void p(T *x); -}; - -template -void Info::p(T *x) -{ - x->print(); -} - -class PP { -public: - void print(); -}; - -class QQ { -public: - void print(); -};
objdbg01/x3.h Property changes : Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -Id \ No newline at end of property Index: objdbg01/x1.cc =================================================================== --- objdbg01/x1.cc (revision 816) +++ objdbg01/x1.cc (nonexistent) @@ -1,25 +0,0 @@ -#include -#include "x3.h" - -extern void foo(); - -extern int acomm; - -int main3() -{ - return 1; -} - -int main2() -{ - return 0; -} - -int main() -{ - acomm = 1; - (new Info)->p(new PP); - foo(); - - return 0; -} Index: objdbg01/x2.cc =================================================================== --- objdbg01/x2.cc (revision 816) +++ objdbg01/x2.cc (nonexistent) @@ -1,14 +0,0 @@ -#include "x3.h" -#include - -int acomm; - -void PP::print() -{ - printf("In PP::print()\n"); -} - -void QQ::print() -{ - printf("In QQ::print()\n"); -} Index: objdbg01/x3.cc =================================================================== --- objdbg01/x3.cc (revision 816) +++ objdbg01/x3.cc (nonexistent) @@ -1,7 +0,0 @@ -#include "x3.h" - -void foo() -{ - (new Info)->p(new PP); - (new Info)->p(new QQ); -} Index: objdbg02/x1.cc =================================================================== --- objdbg02/x1.cc (revision 816) +++ objdbg02/x1.cc (nonexistent) @@ -1,16 +0,0 @@ -#include - -extern void foo1(); -extern void foo3(); - -struct foo_type; - -int main() -{ - struct foo_type *x; - - printf("In main.\n"); - foo1(); - foo3(); - return 0; -} Index: objdbg02/x2.cc =================================================================== --- objdbg02/x2.cc (revision 816) +++ objdbg02/x2.cc (nonexistent) @@ -1,17 +0,0 @@ -#include - -struct foo_type { - int t1; - int t2; -}; - -static void foo2() -{ - printf("In foo2.\n"); -} - -void foo1() -{ - printf("In foo1.\n"); - foo2(); -} Index: objdbg02/x3.cc =================================================================== --- objdbg02/x3.cc (revision 816) +++ objdbg02/x3.cc (nonexistent) @@ -1,6 +0,0 @@ -#include - -void foo3() -{ - printf("In foo3.\n"); -} Index: objdbg03/x1.cc =================================================================== --- objdbg03/x1.cc (revision 816) +++ objdbg03/x1.cc (nonexistent) @@ -1,15 +0,0 @@ -#include - -extern int foo(); -extern int common3; -extern int data3; -extern int common11; -extern int data11; - -int main() -{ - common11 = 11; - printf("In main: %d %d %d\n", data3, common3, foo(), common11, data11); - - return 0; -} Index: objdbg03/x2.cc =================================================================== --- objdbg03/x2.cc (revision 816) +++ objdbg03/x2.cc (nonexistent) @@ -1,7 +0,0 @@ -#include - -int common10; -int common11; - -int data10 = 10; -int data11 = 11; Index: objdbg03/x3.cc =================================================================== --- objdbg03/x3.cc (revision 816) +++ objdbg03/x3.cc (nonexistent) @@ -1,21 +0,0 @@ -#include - -int common1; -int common2; -int common3; -static int common4; - -int data1 = 1; -int data2 = 2; -int data3 = 3; -static int data4 = 4; - -int foo() -{ - common1 = 1; - common2 = 2; - common3 = 3; - common4 = 4; - - return data1 + data2 + data3 + data4 + common1 + common2 + common3 + common4; -} Index: objdbg04/x1.cc =================================================================== --- objdbg04/x1.cc (revision 816) +++ objdbg04/x1.cc (nonexistent) @@ -1,15 +0,0 @@ -#include -#include "x.h" - -template class Adder; - -int main() -{ - Adder add; - - add.set(3); - add.add(3); - printf("In main: %d\n", add.get()); - - return 0; -} Index: objdbg04/x.h =================================================================== --- objdbg04/x.h (revision 816) +++ objdbg04/x.h (nonexistent) @@ -1,30 +0,0 @@ -template -class Adder { -public: - void set(T); - T get(); - T add(T); - -private: - T val; -}; - -template -void Adder::set(T new_val) -{ - val = new_val; -} - -template -T Adder::get() -{ - return val; -} - -template -T Adder::add(T new_val) -{ - val += new_val; - return val; -} -
objdbg04/x.h Property changes : Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -Id \ No newline at end of property Index: objdbg04/x2.cc =================================================================== --- objdbg04/x2.cc (revision 816) +++ objdbg04/x2.cc (nonexistent) @@ -1,3 +0,0 @@ -#include "x.h" - -template class Adder;

powered by: WebSVN 2.1.0

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