This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

help with debugging issues running the gcc.dg/guality tests.

On Darwin we've got some difficulties with the guality testsuite components.

first there are a couple of changes needed to get the basic check_gualityXXX.exe to run
(a) we have to detect Darwin in the same category as unix for the redirect.
(b) we need "-save-temps" to find the debug info.
no problem

now the check runs :

e-temps -lm -o guality_check55078.exe (timeout = 300)
spawn /gcc-4-5-reg-build/gcc/xgcc -B/gcc-4-5-reg-build/gcc/ guality_check55078.c -g -O0 -save-temps -lm -o guality_check55078.exe
Setting LD_LIBRARY_PATH to :/gcc-4-5-reg-build/gcc::/gcc-4-5-reg- build/gcc
spawn [open ...]
PASS: varl is 6

OK.. but then the next check

Executing on host: /gcc-4-5-reg-build/gcc/xgcc -B/gcc-4-5-reg-build/ gcc/ /gcc-4-5-regtest/gcc/testsuite/gcc.dg/guality/example.c -O0 - g -save-temps -lm -o ./example.exe (timeout = 300)
spawn /gcc-4-5-reg-build/gcc/xgcc -B/gcc-4-5-reg-build/gcc/ /gcc-4-5- regtest/gcc/testsuite/gcc.dg/guality/example.c -O0 -g -save-temps -lm -o ./example.exe
PASS: gcc.dg/guality/example.c -O0 (test for excess errors)
Setting LD_LIBRARY_PATH to :/gcc-4-5-reg-build/gcc::/gcc-4-5-reg- build/gcc
spawn [open ...]
gdb: took too long to attach
WARNING: program timed out.


It looks like *when run under dejagnu/expect* the debugger is not terminated at the end of the test and (possibly) unavailable for the next test.

Is there any doc. (other than what's in the source) on what the mechanism is meant to do ..
.. and what we should expect to see...

NOTE: if I build and run the tests indivuidually on the command line - they work as expected and the debugger seems to terminate normally.
so it's something to do with the invocation in the dejagnu/expect framework.

any help would be most welcome ..

For reference - these are the patches so far...

Index: gcc/testsuite/gcc.dg/guality/guality.h
--- gcc/testsuite/gcc.dg/guality/guality.h      (revision 152226)
+++ gcc/testsuite/gcc.dg/guality/guality.h      (working copy)
@@ -129,12 +129,12 @@

 static const char *guality_gdb_command;
 #define GUALITY_GDB_DEFAULT "gdb"
-#if defined(__unix)
+#if defined(__unix) || defined(__MACH__)
 # define GUALITY_GDB_REDIRECT " > /dev/null 2>&1"
 #elif defined (_WIN32) || defined (MSDOS)
 # define GUALITY_GDB_REDIRECT " > nul"
 #define GUALITY_GDB_ARGS " -nx -nw --quiet" GUALITY_GDB_REDIRECT

Index: gcc/testsuite/gcc.dg/guality/guality.exp
--- gcc/testsuite/gcc.dg/guality/guality.exp    (revision 152226)
+++ gcc/testsuite/gcc.dg/guality/guality.exp    (working copy)
@@ -3,7 +3,7 @@
 load_lib gcc-dg.exp

proc check_guality {args} {
- set result [eval check_compile guality_check executable $args "- g -O0"]
+ set result [eval check_compile guality_check executable $args {"- g -O0 -save-temps"} ]
set lines [lindex $result 0]
set output [lindex $result 1]
set ret 0

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]