* Re: recent dejagnu changes [not found] <398C3E91.D0EDB934@cygnus.com> @ 2000-08-07 10:09 ` Jimmy Guo 2000-08-07 11:00 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo 0 siblings, 1 reply; 11+ messages in thread From: Jimmy Guo @ 2000-08-07 10:09 UTC (permalink / raw) To: Fernando Nasser; +Cc: Geoff Keating, gdb-patches I will submit a patch retaining the *dir_to_run change, and let Geoff try it in GCC testing to make sure it works. The solution to support both existing GCC and GDB test trees would be to eliminate ${test_top_dirs} entries with common path prefix after ${srcdir} (keeping the parent only). I will cook up a separate patch for this. - Jimmy On Sat, 5 Aug 2000, Fernando Nasser wrote: >Geoff Keating wrote: >> >> > Actually, the dir_to_run and cmdline_dir_to_run change is OK ... that >> > allows specification of a list of test suites, instead of one at a time. >> >We do want to retain this functionality. > >> Could you post these as a separate patch, and test them separately? >> They were committed together, and it's difficult to know which part >> of the commit belongs with which change. >> >Better than that would be if Jimmy submitted a patch commenting out (with the >explanation why) the code that he believes is the offending one. If that passes >the gcc testsuite tests we commit it. > >I wonder if there isn't a way to accomodate both the gcc tree structure and the HP one... ^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFA] dejagnu runtest.exp *dir_to_run 2000-08-07 10:09 ` recent dejagnu changes Jimmy Guo @ 2000-08-07 11:00 ` Jimmy Guo 2000-08-07 11:34 ` [RFA] dejagnu runtest.exp redundant testing Jimmy Guo 2000-08-14 11:02 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo 0 siblings, 2 replies; 11+ messages in thread From: Jimmy Guo @ 2000-08-07 11:00 UTC (permalink / raw) To: Fernando Nasser; +Cc: Geoff Keating, gdb-patches Here is the part of the changes backed out. Geoff, I'd appreciate if you can try GCC testing with this patch and report back the outcome ... I don't expect that you'd see any problem but just to play it extra safe ... - Jimmy Guo, guo@cup.hp.com 2000-08-07 Jimmy Guo <guo@cup.hp.com> Re-apply this change which needn't be backed out: * runtest.exp: Handle multiple directories in TCL variables dir_to_run and cmdline_dir_to_run. Index: runtest.exp =================================================================== RCS file: /cvs/src/src/dejagnu/runtest.exp,v retrieving revision 1.4 diff -c -r1.4 runtest.exp *** runtest.exp 2000/08/05 06:34:02 1.4 --- runtest.exp 2000/08/07 17:53:42 *************** *** 1730,1736 **** # value (for example in MULTIPASS) and the test # directory matches that directory. if {[info exists dir_to_run] && $dir_to_run != ""} { ! if ![string match "*${dir_to_run}*" $dir] { continue } } --- 1730,1745 ---- # value (for example in MULTIPASS) and the test # directory matches that directory. if {[info exists dir_to_run] && $dir_to_run != ""} { ! # JYG: dir_to_run might be a space delimited list ! # of directories. Look for match on each item. ! set found 0 ! foreach directory $dir_to_run { ! if [string match "*${directory}*" $dir] { ! set found 1 ! break ! } ! } ! if {!$found} { continue } } *************** *** 1740,1746 **** # directory matches that directory if {[info exists cmdline_dir_to_run] \ && $cmdline_dir_to_run != ""} { ! if ![string match "*${cmdline_dir_to_run}*" $dir] { continue } } --- 1749,1764 ---- # directory matches that directory if {[info exists cmdline_dir_to_run] \ && $cmdline_dir_to_run != ""} { ! # JYG: cmdline_dir_to_run might be a space delimited ! # list of directories. Look for match on each item. ! set found 0 ! foreach directory $cmdline_dir_to_run { ! if [string match "*${directory}*" $dir] { ! set found 1 ! break ! } ! } ! if {!$found} { continue } } ^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFA] dejagnu runtest.exp redundant testing 2000-08-07 11:00 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo @ 2000-08-07 11:34 ` Jimmy Guo 2000-08-11 19:17 ` (withdraw) " Jimmy Guo 2000-08-14 11:02 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo 1 sibling, 1 reply; 11+ messages in thread From: Jimmy Guo @ 2000-08-07 11:34 UTC (permalink / raw) To: Fernando Nasser; +Cc: Geoff Keating, gdb-patches Here is the runtest.exp patch which fixes the redundant testing problem without violating the assumption that any *.exp file under a ${tool}* directory tree is a valid test file. Geoff, please try it against GCC testing to see if I break something this time. Thanks! - Jimmy 2000-08-07 Jimmy Guo <guo@cup.hp.com> * runtest.exp: Eliminate from test_top_dirs entries that cause redundant testing. Entries picked up because of their ${tool} prefix under the real top dir with the ${tool} prefix have been making dejagnu run tests under these entries twice, since dejagnu treats all *.exp files under a given directory tree as test files. *** runtest.exp.orig Mon Aug 7 11:01:57 2000 --- runtest.exp Mon Aug 7 11:21:57 2000 *************** *** 1664,1669 **** --- 1664,1689 ---- set test_top_dirs [lsort [getdirs -all ${srcdir} "${tool}*"]] if { ${test_top_dirs} == "" } { set test_top_dirs ${srcdir} + } else { + # JYG: For test tree layouts with ${tool} prefix on + # both a parent and a child directory, eliminate + # the child directory entry from test_top_dirs list. + # e.g. gdb.hp/gdb.base-hp/ would result in two entries + # in the list: gdb.hp, gdb.hp/gdb.base-hp. + # If the latter not eliminated, test files under + # gdb.hp/gdb.base-hp would be run twice, since test files + # are gathered from all sub-directories underneath a + # directory. + set temp_top_dirs "" + foreach dir "${test_top_dirs}" { + if [regexp "${srcdir}/.*${tool}.*/.*${tool}" ${dir}] { + # skip this directory. + continue + } else { + lappend temp_top_dirs ${dir} + } + } + set test_top_dirs ${temp_top_dirs} } verbose "Top level testsuite dirs are ${test_top_dirs}" 2 set testlist ""; ^ permalink raw reply [flat|nested] 11+ messages in thread
* (withdraw) Re: [RFA] dejagnu runtest.exp redundant testing 2000-08-07 11:34 ` [RFA] dejagnu runtest.exp redundant testing Jimmy Guo @ 2000-08-11 19:17 ` Jimmy Guo 0 siblings, 0 replies; 11+ messages in thread From: Jimmy Guo @ 2000-08-11 19:17 UTC (permalink / raw) To: Fernando Nasser; +Cc: Geoff Keating, gdb-patches I withdraw this patch. g++ testing reviewed the problem with it -- when ${tool} contains ?*+ chars, TCL will choke on the regexp command below. I'll post a replacement patch shortly after the new round of verification on gdb and gcc / g++ testsuites. - Jimmy >2000-08-07 Jimmy Guo <guo@cup.hp.com> > > * runtest.exp: Eliminate from test_top_dirs entries that > cause redundant testing. Entries picked up because of their > ${tool} prefix under the real top dir with the ${tool} prefix > have been making dejagnu run tests under these entries twice, > since dejagnu treats all *.exp files under a given directory > tree as test files. > >*** runtest.exp.orig Mon Aug 7 11:01:57 2000 >--- runtest.exp Mon Aug 7 11:21:57 2000 >*************** >*** 1664,1669 **** >--- 1664,1689 ---- > set test_top_dirs [lsort [getdirs -all ${srcdir} "${tool}*"]] > if { ${test_top_dirs} == "" } { > set test_top_dirs ${srcdir} >+ } else { >+ # JYG: For test tree layouts with ${tool} prefix on >+ # both a parent and a child directory, eliminate >+ # the child directory entry from test_top_dirs list. >+ # e.g. gdb.hp/gdb.base-hp/ would result in two entries >+ # in the list: gdb.hp, gdb.hp/gdb.base-hp. >+ # If the latter not eliminated, test files under >+ # gdb.hp/gdb.base-hp would be run twice, since test files >+ # are gathered from all sub-directories underneath a >+ # directory. >+ set temp_top_dirs "" >+ foreach dir "${test_top_dirs}" { >+ if [regexp "${srcdir}/.*${tool}.*/.*${tool}" ${dir}] { >+ # skip this directory. >+ continue >+ } else { >+ lappend temp_top_dirs ${dir} >+ } >+ } >+ set test_top_dirs ${temp_top_dirs} > } > verbose "Top level testsuite dirs are ${test_top_dirs}" 2 > set testlist ""; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [RFA] dejagnu runtest.exp *dir_to_run 2000-08-07 11:00 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo 2000-08-07 11:34 ` [RFA] dejagnu runtest.exp redundant testing Jimmy Guo @ 2000-08-14 11:02 ` Jimmy Guo 1 sibling, 0 replies; 11+ messages in thread From: Jimmy Guo @ 2000-08-14 11:02 UTC (permalink / raw) To: Fernando Nasser; +Cc: gdb-patches I've committed this patch. - Jimmy >2000-08-07 Jimmy Guo <guo@cup.hp.com> > > Re-apply this change which needn't be backed out: > > * runtest.exp: Handle multiple directories in TCL variables > dir_to_run and cmdline_dir_to_run. > > >Index: runtest.exp >=================================================================== >RCS file: /cvs/src/src/dejagnu/runtest.exp,v >retrieving revision 1.4 >diff -c -r1.4 runtest.exp >*** runtest.exp 2000/08/05 06:34:02 1.4 >--- runtest.exp 2000/08/07 17:53:42 >*************** >*** 1730,1736 **** > # value (for example in MULTIPASS) and the test > # directory matches that directory. > if {[info exists dir_to_run] && $dir_to_run != ""} { >! if ![string match "*${dir_to_run}*" $dir] { > continue > } > } >--- 1730,1745 ---- > # value (for example in MULTIPASS) and the test > # directory matches that directory. > if {[info exists dir_to_run] && $dir_to_run != ""} { >! # JYG: dir_to_run might be a space delimited list >! # of directories. Look for match on each item. >! set found 0 >! foreach directory $dir_to_run { >! if [string match "*${directory}*" $dir] { >! set found 1 >! break >! } >! } >! if {!$found} { > continue > } > } >*************** >*** 1740,1746 **** > # directory matches that directory > if {[info exists cmdline_dir_to_run] \ > && $cmdline_dir_to_run != ""} { >! if ![string match "*${cmdline_dir_to_run}*" $dir] { > continue > } > } >--- 1749,1764 ---- > # directory matches that directory > if {[info exists cmdline_dir_to_run] \ > && $cmdline_dir_to_run != ""} { >! # JYG: cmdline_dir_to_run might be a space delimited >! # list of directories. Look for match on each item. >! set found 0 >! foreach directory $cmdline_dir_to_run { >! if [string match "*${directory}*" $dir] { >! set found 1 >! break >! } >! } >! if {!$found} { > continue > } > } > > ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <Pine.LNX.4.10.10008080958530.12236-100000@hpcll168.cup.hp.com>]
* Re: recent dejagnu changes [not found] <Pine.LNX.4.10.10008080958530.12236-100000@hpcll168.cup.hp.com> @ 2000-08-08 11:29 ` Geoff Keating 2000-08-08 12:52 ` Stan Shebs 0 siblings, 1 reply; 11+ messages in thread From: Geoff Keating @ 2000-08-08 11:29 UTC (permalink / raw) To: guo; +Cc: fnasser, gdb-patches > Date: Tue, 8 Aug 2000 10:16:06 -0700 (PDT) > From: Jimmy Guo <guo@cup.hp.com> > Cc: fnasser@cygnus.com, gdb-patches@sourceware.cygnus.com > > As part of the _approval_ process, I thought your input might be > useful, hence the invitation for it ... I test my dejagnu patches with > the GDB test tree. Given your firm response not to do so, I request > that the patches be reviewed by the maintainer (and others who might wish > to do so) ... if and when it's approved, I will commit it ... just like > you value your time, I value mine as well! I don't know how it works in GDB-land, but the GCC patch approval process requires that you include in your message how it was tested. Failure to test appropriately can cause your patch to be rejected. In this case, since we already know the patch had problems with the GCC testsuite, I would immediately reject any patch that doesn't say that it was tested with the GCC testsuite. So you can consider your patch pre-rejected. dejagnu is shared between GDB, GCC, and binutils, just as BFD is shared between binutils and GDB. For such shared code, it is extremely impolite to make a change without testing it on all the users. -- - Geoffrey Keating <geoffk@cygnus.com> From guo@cup.hp.com Tue Aug 08 12:12:00 2000 From: Jimmy Guo <guo@cup.hp.com> To: Geoff Keating <geoffk@cygnus.com> Cc: fnasser@cygnus.com, gdb-patches@sourceware.cygnus.com Subject: Re: recent dejagnu changes Date: Tue, 08 Aug 2000 12:12:00 -0000 Message-id: <Pine.LNX.4.10.10008081145170.12669-100000@hpcll168.cup.hp.com> References: <200008081827.LAA06137@localhost.cygnus.com> X-SW-Source: 2000-08/msg00155.html Content-length: 1750 It looks to me that you are just happy in the patch back-out business and waving hands post-mortem. I'd never thought asking for your input is something that big of a deal! You came in, proceeding to back out a change without any details, except for nonsences like "this will never work", or "unwise" ... while I earnestly tried to get the best out of it by working with you to understand what broke and trying to make sure it wouldn't occur again. I guess you've spent more time in this thread than simply be a bit more helpful and try the patch out ... In principle I agree with your patch approval process ... in reality would you say you've never encountered a case where it would be more difficult for you to test something under certain configuration than asking whoever raised the hand to try it out? So much for the spirit of cooperation on this silly little dejagnu change ... no hard feelings at my side if they are rejected, cause I'm happy with what I've fixed in my environment, and I know this dejagnu problem won't bite me again. - Jimmy >I don't know how it works in GDB-land, but the GCC patch approval >process requires that you include in your message how it was tested. >Failure to test appropriately can cause your patch to be rejected. In >this case, since we already know the patch had problems with the GCC >testsuite, I would immediately reject any patch that doesn't say that >it was tested with the GCC testsuite. > >So you can consider your patch pre-rejected. > >dejagnu is shared between GDB, GCC, and binutils, just as BFD is >shared between binutils and GDB. For such shared code, it is >extremely impolite to make a change without testing it on all the >users. >-- >- Geoffrey Keating <geoffk@cygnus.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: recent dejagnu changes 2000-08-08 11:29 ` recent dejagnu changes Geoff Keating @ 2000-08-08 12:52 ` Stan Shebs 2000-08-08 14:24 ` Geoff Keating 0 siblings, 1 reply; 11+ messages in thread From: Stan Shebs @ 2000-08-08 12:52 UTC (permalink / raw) To: Geoff Keating; +Cc: guo, fnasser, gdb-patches Geoff Keating wrote: > > dejagnu is shared between GDB, GCC, and binutils, just as BFD is > shared between binutils and GDB. For such shared code, it is > extremely impolite to make a change without testing it on all the > users. However, in the absence of a dejagnu maintainer, I don't think it's unreasonable of Jimmy to ask for help in validating the testing framework on packages with which he is unfamiliar. For instance, if he doesn't know what the expected behavior is supposed to be with the GCC testsuite, how is having him run the testsuite one time going to be helpful? Also, what would you suggest if, as is frequently the case, he tries to build GCC from CVS and it doesn't even build on his machine, let alone get to the point of being able to test it? Since we all have a common interest in making dejagnu work well, and no benevolent dejagnu dictator to force us to get along :-), let's try to help each other here. Stan From tromey@cygnus.com Tue Aug 08 13:14:00 2000 From: Tom Tromey <tromey@cygnus.com> To: gdb-patches@sourceware.cygnus.com Subject: Patch: Java -vs- null strings Date: Tue, 08 Aug 2000 13:14:00 -0000 Message-id: <877l9ro68c.fsf@creche.i-did-not-set--mail-host-address--so-shoot-me> X-SW-Source: 2000-08/msg00157.html Content-length: 1138 If you are debugging a Java program and try to print a String variable whose value is null you will see this: (gdb) p name $3 = Cannot access memory at address 0x8 This is lame. The appended patch fixes gdb to do this: (gdb) p p $1 = null Is this ok? 2000-08-08 Tom Tromey <tromey@cygnus.com> * jv-valprint.c (java_value_print): Only print non-null Strings. Tom Index: jv-valprint.c =================================================================== RCS file: /cvs/src/src/gdb/jv-valprint.c,v retrieving revision 1.3 diff -u -r1.3 jv-valprint.c --- jv-valprint.c 2000/07/30 01:48:26 1.3 +++ jv-valprint.c 2000/08/08 20:11:49 @@ -197,9 +197,10 @@ if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_TARGET_TYPE (type) && TYPE_NAME (TYPE_TARGET_TYPE (type)) - && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0 + && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0 && (format == 0 || format == 's') - && address != 0) + && address != 0 + && value_as_pointer (val) != 0) { value_ptr data_val; CORE_ADDR data; From nickc@redhat.com Tue Aug 08 14:22:00 2000 From: Nick Clifton <nickc@redhat.com> To: gdb-patches@sources.redhat.com Subject: RFA: Recording MIPS ABI selection in binaries Date: Tue, 08 Aug 2000 14:22:00 -0000 Message-id: <200008082122.OAA19523@elmo.cygnus.com> X-SW-Source: 2000-08/msg00158.html Content-length: 7919 Hi Guys, There is a problem with the MIPS port. There is no way for GDB to tell if a binary has been produced with the -mgp32 option. This means that attempts to debug such binaries will usually fail horribly, since GDB has the wrong idea about the size of various types and so on. This kind of problem used to be solved by setting a flag bit in the file header, but in this case the appropriate bit has already been taken by the 64 bit binaries, so I have come up with a different solution. My solution is to have GCC create an empty, uniquely named section indicating the ABI in use. GDB then detects the presence of this section and selects the ABI appropriately. If it does not find the section then it goes back to its old method of examining the flags in the ELF header. I have tested the patch and it reduces the number of GDB testsuite failures from 1280 to 450 when the -mgp32 switch is used. This patch has the advantage of being simple - no changes are needed to the assembler or linker and only mips specific code in GCC and GDB are affected - and space efficient - the sections are empty, only occupy a small amount of space in the binary, do not get loaded into memory, and get merged together when the object files are linked. But perhaps there is a better solution in creating a .note section instead, I am not sure. The problem as I see it with creating a .note section, is that the notes in the section will not be merged together when the object files are linked together. Thus the section could start taking up a non-trivial amount of space in the resultant binary. It is also more complex for GDB if it has to read in the .note section's contents and then parse them. So, I am presenting my patch below for discussion and possible approval. What do people think ? Cheers Nick gcc ChangeLog: 2000-08-08 Nick Clifton <nickc@cygnus.com> * config/mips/mips.c (mips_asm_file_start): Create a .mdebug.XXX section where XXX is the ABI in use. gdb ChangeLog: 2000-08-08 Nick Clifton <nickc@cygnus.com> * mips-tdep.c (mips_gdbarch_init): Scan for a .mdebug.XXX section and initialise the ABI from that, if found. Index: gcc/config/mips/mips.c =================================================================== RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.c,v retrieving revision 1.96 diff -p -r1.96 mips.c *** mips.c 2000/08/08 01:17:06 1.96 - --- mips.c 2000/08/08 20:55:35 *************** void *** 5907,5912 **** - --- 5907,5914 ---- mips_asm_file_start (stream) FILE *stream; { + const char * abi_string = NULL; + ASM_OUTPUT_SOURCE_FILENAME (stream, main_input_filename); /* Versions of the MIPS assembler before 2.20 generate errors if a branch *************** mips_asm_file_start (stream) *** 5916,5921 **** - --- 5918,5943 ---- if (TARGET_MIPS_AS && optimize && flag_delayed_branch) fprintf (stream, "\t.set\tnobopt\n"); + + /* Generate a special section to describe the ABI switches used to produce + the resultant binary. This used to be done by the assembler setting bits + in the ELF header's flags field, but we have run out of bits. GDB needs + this information in order to be able to correctly debug these binaries. + See the function mips_gdbarch_init() in gdb/mips-tdep.c. */ + switch (mips_abi) + { + case ABI_32: abi_string = "abi32"; break; + case ABI_N32: abi_string = "abiN32"; break; + case ABI_64: abi_string = "abi64"; break; + case ABI_O64: abi_string = "abiO64"; break; + case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break; + default: + abort (); + } + fprintf (stream, "\t.section .mdebug.%s\n", abi_string); + + /* Restore the default section. */ + fprintf (stream, "\t.section .text\n"); /* Generate the pseudo ops that System V.4 wants. */ #ifndef ABICALLS_ASM_OP Index: gdb/mips-tdep.c =================================================================== RCS file: /cvs/src//src/gdb/mips-tdep.c,v retrieving revision 1.29 diff -p -w -r1.29 mips-tdep.c *** mips-tdep.c 2000/07/30 01:48:26 1.29 - --- mips-tdep.c 2000/08/08 20:57:40 *************** mips_gdbarch_init (struct gdbarch_info i *** 3813,3828 **** {0}; struct gdbarch *gdbarch; struct gdbarch_tdep *tdep; ! int elf_flags; ! enum mips_abi mips_abi; ! /* Extract the elf_flags if available */ if (info.abfd != NULL && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour) elf_flags = elf_elfheader (info.abfd)->e_flags; else ! elf_flags = 0; /* Check ELF_FLAGS to see if it specifies the ABI being used. */ switch ((elf_flags & EF_MIPS_ABI)) { - --- 3813,3873 ---- {0}; struct gdbarch *gdbarch; struct gdbarch_tdep *tdep; ! int elf_flags = 0; ! enum mips_abi mips_abi = MIPS_ABI_UNKNOWN; ! /* Extract the elf_flags if available. */ if (info.abfd != NULL && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour) + { + asection * note; + const char * abi_sec = ".mdebug."; + elf_flags = elf_elfheader (info.abfd)->e_flags; + + /* See if there is a .mdebug.XXX section. If there is, treat its + name as ABI information. GCC may have produced this section for + us. See the function mips_asm_file_start() in gcc/config/mips/mips.c. */ + for (note = info.abfd->sections; note != NULL; note = note->next) + { + if (strncmp (note->name, abi_sec, strlen (abi_sec)) == 0) + { + struct + { + const char * abi_name; + enum mips_abi mips_abi; + } + names [] = + { + { "abi32", MIPS_ABI_O32 }, + { "abiN32", MIPS_ABI_N32 }, + { "abi64", MIPS_ABI_O64 }, + { "abiO64", MIPS_ABI_O64 }, + { "eabi32", MIPS_ABI_EABI32 }, + { "eabi64", MIPS_ABI_EABI64 }, + { NULL, MIPS_ABI_UNKNOWN } + }; + int i; + + for (i = 0; names[i].abi_name != NULL; i++) + if (strcmp (note->name + strlen (abi_sec), names[i].abi_name) == 0) + break; + + if (names[i].abi_name == NULL) + printf_filtered ("Warning: Unrecognised MIPS ABI section '%s'\n", + note->name); + else + if ( mips_abi != MIPS_ABI_UNKNOWN + && mips_abi != names[i].mips_abi) + printf_filtered ("Warning: Multiple differing MIPS ABI sections\n"); else ! mips_abi = names[i].mips_abi; ! } ! } ! } + if (mips_abi == MIPS_ABI_UNKNOWN) + { /* Check ELF_FLAGS to see if it specifies the ABI being used. */ switch ((elf_flags & EF_MIPS_ABI)) { *************** mips_gdbarch_init (struct gdbarch_info i *** 3845,3850 **** - --- 3889,3895 ---- mips_abi = MIPS_ABI_UNKNOWN; break; } + } /* Try the architecture for any hint of the corect ABI */ if (mips_abi == MIPS_ABI_UNKNOWN *************** mips_gdbarch_init (struct gdbarch_info i *** 4010,4016 **** and not all gcc targets support that currently. Therefore using this flag to detect 32-bit mode would do the wrong thing given the current gcc - it would make GDB treat these 64-bit programs ! as 32-bit programs by default. */ /* enable/disable the MIPS FPU */ if (!mips_fpu_type_auto) - --- 4055,4066 ---- and not all gcc targets support that currently. Therefore using this flag to detect 32-bit mode would do the wrong thing given the current gcc - it would make GDB treat these 64-bit programs ! as 32-bit programs by default. ! ! FIXED: nickc/2000-08-08: GCC now creates a special, empty section ! whoes name indicates the ABI that is in used. There is now code ! at the start of this funciton to detect this section and set up the ! ABI selection appropriately. */ /* enable/disable the MIPS FPU */ if (!mips_fpu_type_auto) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: recent dejagnu changes 2000-08-08 12:52 ` Stan Shebs @ 2000-08-08 14:24 ` Geoff Keating 0 siblings, 0 replies; 11+ messages in thread From: Geoff Keating @ 2000-08-08 14:24 UTC (permalink / raw) To: shebs; +Cc: gdb-patches > Date: Tue, 08 Aug 2000 12:52:32 -0700 > From: Stan Shebs <shebs@apple.com> > Since we all have a common interest in making dejagnu work well, > and no benevolent dejagnu dictator to force us to get along :-), > let's try to help each other here. Unfortunately, I've been told that all further communication with Jimmy should go through our HP person, Jim Blandy. So any help with dejagnu is going to have to come from them or be properly scheduled. In the meantime, I've switched my automated tester to manual mode for combined-tree integration, and made its heuristics more paranoid. If I find dejagnu breaks again, I'll just freeze it at the last-known-good version. Hopefully this will limit the damage. -- - Geoffrey Keating <geoffk@cygnus.com> From ac131313@cygnus.com Tue Aug 08 15:42:00 2000 From: Andrew Cagney <ac131313@cygnus.com> To: Eli Zaretskii <eliz@is.elta.co.il> Cc: robert.hoehne@gmx.net, gdb-patches@sourceware.cygnus.com Subject: Re: Problems with i386_register_convert_to_virtual Date: Tue, 08 Aug 2000 15:42:00 -0000 Message-id: <39908C0B.C9F5E165@cygnus.com> References: <200008052252.AAA22962@robby.dittmannsdorf.de> <200008060851.KAA23990@robby.dittmannsdorf.de> <200008080644.CAA02415@indy.delorie.com> X-SW-Source: 2000-08/msg00160.html Content-length: 801 Eli Zaretskii wrote: > > > From: Robert Hoehne <robert.hoehne@gmx.net> > > Date: Sun, 6 Aug 2000 10:52:41 +0200 > > > > After more searching in the GDB code and docs, I found the macro > > REGISTER_CONVERTIBLE which tells, if a register have different > > raw and virtual sizes. This macro is also used for instance in findvar.c > > to decide, if REGISTER_CONVERT_TO_VIRTUAL is called or a > > simple memcpy is done. In my Opionion either this should be documented > > in the description for REGISTER_CONVERT_TO_VIRTUAL that > > this macro should be called only, when REGISTER_CONVERTIBLE > > returns true, or that logic should be included in the convert macro. > > I agree. Does anyone have preferences as to what way of these two is > the best? I'd suggest adjusting the documentation. Andrew From ac131313@cygnus.com Tue Aug 08 16:53:00 2000 From: Andrew Cagney <ac131313@cygnus.com> To: Geoff Keating <geoffk@cygnus.com> Cc: guo@cup.hp.com, fnasser@cygnus.com, gdb-patches@sourceware.cygnus.com Subject: Re: recent dejagnu changes Date: Tue, 08 Aug 2000 16:53:00 -0000 Message-id: <39909BD0.522545A3@cygnus.com> References: <Pine.LNX.4.10.10008080958530.12236-100000@hpcll168.cup.hp.com> <200008081827.LAA06137@localhost.cygnus.com> X-SW-Source: 2000-08/msg00161.html Content-length: 792 Geoff, I don't know that pulling Jimmy's dejagnu patch was the best thing to do. In a way it is like me pulling a G++ patch just because it has (yet again :-) broken the GDB/C++ testsuites. If I did that I'd be (understandably) hounded out of town by the GCC team :-(. Instead, what one would hope would happen is \x12 that the groups try to co-operate and resolve problems as soon as they are found. If the GDB team find problems they push patches back to GCC. For DEJAGNU, checking that a change regresses none of GDB, GCC or BINUTILS would be a good thing (tm). However, as things currently stand, this not straight forward. Instead we are reliant on people, such as yourself, identifying problems and reporting them so that they can be fixed (and not reverted :-). enjoy, Andrew From ac131313@cygnus.com Tue Aug 08 17:00:00 2000 From: Andrew Cagney <ac131313@cygnus.com> To: Jimmy Guo <guo@cup.hp.com> Cc: Fernando Nasser <fnasser@cygnus.com>, Geoff Keating <geoffk@cygnus.com>, gdb-patches@sourceware.cygnus.com Subject: Re: [RFA] dejagnu runtest.exp redundant testing Date: Tue, 08 Aug 2000 17:00:00 -0000 Message-id: <39909DE1.82CB4FB8@cygnus.com> References: <Pine.LNX.4.10.10008071129160.5575-100000@hpcll168.cup.hp.com> X-SW-Source: 2000-08/msg00162.html Content-length: 943 Jimmy, As an asside, you (and others) may be interested in the attatched files. It lets you use CVSup to create a merged tree. It may be possible to build / test it - no promises though! Andrew *default date=. all delete release=toplev list=toplev compress prefix=all host=sourceware.cygnus.com compress tag=. all delete release=bfd list=bfd compress prefix=all host=sourceware.cygnus.com compress tag=. all delete release=gdb list=gdb compress prefix=all host=sourceware.cygnus.com compress tag=. all delete release=binutils list=binutils compress prefix=all host=sourceware.cygnus.com compress tag=. all delete release=gcc list=gcc compress prefix=all host=sourceware.cygnus.com compress tag=. all delete release=dejagnu list=dejagnu compress prefix=all host=sourceware.cygnus.com compress tag=. all delete release=newlib list=newlib compress prefix=all host=sourceware.cygnus.com compress tag=. From guo@cup.hp.com Tue Aug 08 17:04:00 2000 From: Jimmy Guo <guo@cup.hp.com> To: Andrew Cagney <ac131313@cygnus.com> Cc: Geoff Keating <geoffk@cygnus.com>, fnasser@cygnus.com, gdb-patches@sourceware.cygnus.com Subject: Re: recent dejagnu changes Date: Tue, 08 Aug 2000 17:04:00 -0000 Message-id: <Pine.LNX.4.10.10008081655480.13431-100000@hpcll168.cup.hp.com> References: <39909BD0.522545A3@cygnus.com> X-SW-Source: 2000-08/msg00163.html Content-length: 785 If I may, let's retire this thread ... there're assumptions and perceptions I made, both in the dejagnu design and in the working process, that caused the dejagnu regression and the following communications that's less than desirable ... and my apologies to the GCC project which wasted time tracking my changes down :) Changes to odd components like dejagnu with little documentation nor visibility (until it breaks) are dangerous. Fortunately I don't have further changes in this area ... as to the couple of patches, I'm sure we can work it through without further disturbance. It's never too much to be reminded that working on a OpenSource project requires extra prudence and patience ... which is something the HP WDB team is prepared to accept. - Jimmy Guo, guo@cup.hp.com ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <jmu2d0z0hb.fsf@envy.cygnus.com>]
* Re: recent dejagnu changes [not found] <jmu2d0z0hb.fsf@envy.cygnus.com> @ 2000-08-04 23:40 ` Jimmy Guo 0 siblings, 0 replies; 11+ messages in thread From: Jimmy Guo @ 2000-08-04 23:40 UTC (permalink / raw) To: Geoff Keating; +Cc: gdb-patches Actually, the dir_to_run and cmdline_dir_to_run change is OK ... that allows specification of a list of test suites, instead of one at a time. The problem is exactly with the one line find change in runtest.exp, and the related find proc enhancement in utils.exp. - Jimmy > >OK, here's the patch I'm about to commit: > >-- >- Geoffrey Keating <geoffk@cygnus.com> > >Index: ChangeLog >=================================================================== >RCS file: /cvs/src/src/dejagnu/ChangeLog,v >retrieving revision 1.19 >diff -p -u -u -p -r1.19 ChangeLog >--- ChangeLog 2000/08/02 22:38:52 1.19 >+++ ChangeLog 2000/08/05 06:25:30 >@@ -1,3 +1,14 @@ >+2000-08-04 Geoff Keating <geoffk@cygnus.com> >+ >+ Back out this change: >+ >+ * lib/utils.exp: Add support for a -maxdepth <n> >+ option to limit find to <n> directories deep. >+ * runtest.exp: Handle multiple directories in TCL variables >+ dir_to_run and cmdline_dir_to_run; limit *.exp find to >+ one directory level to avoid foo/bar/baz.exp getting tested >+ twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar'). >+ > 2000-08-02 Jimmy Guo <guo@hpcleara.cup.hp.com> > > * lib/target.exp (default_target_compile,default_target_assemble, >@@ -8,14 +19,14 @@ > > * lib/utils.exp: Add support for a -maxdepth <n> > option to limit find to <n> directories deep. >- >- * runtest.exp: Cleanup reference to $env(MULTIPASS) and >- $env(PASS). These were added by HP but unused since. >- Handle multiple directories in TCL variables >+ * runtest.exp: Handle multiple directories in TCL variables > dir_to_run and cmdline_dir_to_run; limit *.exp find to > one directory level to avoid foo/bar/baz.exp getting tested > twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar'). > >+ * runtest.exp: Cleanup reference to $env(MULTIPASS) and >+ $env(PASS). These were added by HP but unused since. >+ > * lib/framework.exp (pass): make compiler_conditional_xfail_data > a global, corresponding to a recent change to 'proc fail'. > >Index: runtest.exp >=================================================================== >RCS file: /cvs/src/src/dejagnu/runtest.exp,v >retrieving revision 1.3 >diff -p -u -u -p -r1.3 runtest.exp >--- runtest.exp 2000/08/02 22:35:10 1.3 >+++ runtest.exp 2000/08/05 06:25:30 >@@ -1730,16 +1730,7 @@ foreach current_target $target_list { > # value (for example in MULTIPASS) and the test > # directory matches that directory. > if {[info exists dir_to_run] && $dir_to_run != ""} { >- # JYG: dir_to_run might be a space delimited list >- # of directories. Look for match on each item. >- set found 0 >- foreach directory $dir_to_run { >- if [string match "*${directory}*" $dir] { >- set found 1 >- break >- } >- } >- if {!$found} { >+ if ![string match "*${dir_to_run}*" $dir] { > continue > } > } >@@ -1749,30 +1740,12 @@ foreach current_target $target_list { > # directory matches that directory > if {[info exists cmdline_dir_to_run] \ > && $cmdline_dir_to_run != ""} { >- # JYG: cmdline_dir_to_run might be a space delimited >- # list of directories. Look for match on each item. >- set found 0 >- foreach directory $cmdline_dir_to_run { >- if [string match "*${directory}*" $dir] { >- set found 1 >- break >- } >- } >- if {!$found} { >+ if ![string match "*${cmdline_dir_to_run}*" $dir] { > continue > } > } > >- # JYG: Limit find to one directory level to treat >- # each test directory as a base directory. >- # test_top_dirs includes all subdirectory paths, >- # e.g. for gdb.hp/gdb.base-hp/, test_top_dirs >- # has two entries: gdb.hp/, and gdb.base-hp/. >- # If we just use '[find ${dir} *.exp]', all >- # *.exp files in gdb.hp/gdb.base-hp/ would be >- # picked up twice and tested twice, which is >- # what we don't need. >- foreach test_name [lsort [find -maxdepth 1 ${dir} *.exp]] { >+ foreach test_name [lsort [find ${dir} *.exp]] { > if { ${test_name} == "" } { > continue > } >Index: lib/utils.exp >=================================================================== >RCS file: /cvs/src/src/dejagnu/lib/utils.exp,v >retrieving revision 1.2 >diff -p -u -u -p -r1.2 utils.exp >--- utils.exp 2000/08/02 22:35:10 1.2 >+++ utils.exp 2000/08/05 06:25:30 >@@ -87,34 +87,18 @@ proc getdirs { args } { > > # > # Finds all the files recursively >-# Args: >-# [-maxdepth <n>] >-# limit recursive find depth to <n> level; >-# default is to recursively find in all subdirectories >-# rootdir >-# the directory to start the search from. This is and all >-# subdirectories are searched for filenames. Directory names >-# are not included in the list, but the filenames have path >-# information. >-# pattern >-# the pattern to match. Patterns are csh style globbing rules. >-# Returns: >-# a list or a NULL. >+# rootdir - this is the directory to start the search >+# from. This is and all subdirectories are search for >+# filenames. Directory names are not included in the >+# list, but the filenames have path information. >+# pattern - this is the pattern to match. Patterns are csh style >+# globbing rules. >+# returns: a list or a NULL. > # >-proc find { args } { >- if { [lindex $args 0] == "-maxdepth" } { >- set maxdepth [lindex $args 1] >- set args [lrange $args 2 end] >- } else { >- set maxdepth 0 >- } >- set rootdir [lindex $args 0] >- set pattern [lindex $args 1] >- >+proc find { rootdir pattern } { > # first find all the directories > set dirs "$rootdir " >- set depth 1 >- while { $maxdepth == 0 || $depth < $maxdepth } { >+ while 1 { > set tmp $rootdir > set rootdir "" > if [string match "" $tmp] { >@@ -131,7 +115,6 @@ proc find { args } { > } > } > set tmp "" >- set depth [expr $depth + 1] > } > > # find all the files that match the pattern > Jimmy Guo, guo@cup.hp.com ADO eDL WDB Voice: 800-477-6111 ext. 7451 Hewlett-Packard Company (HP T-447-5229) 11000 Wolfe Road, MS 42UD Fax: 408-447-4629 Cupertino, CA 95014-0678 ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <Pine.LNX.4.10.10008042223470.26402-100000@hpcll168.cup.hp.com>]
* Re: recent dejagnu changes [not found] <Pine.LNX.4.10.10008042223470.26402-100000@hpcll168.cup.hp.com> @ 2000-08-04 23:16 ` Geoff Keating 0 siblings, 0 replies; 11+ messages in thread From: Geoff Keating @ 2000-08-04 23:16 UTC (permalink / raw) To: Jimmy Guo; +Cc: gdb-patches Jimmy Guo <guo@cup.hp.com> writes: > > date: 2000/08/02 22:35:10; author: guo; state: Exp; lines: +8 -1 ... > >is the one that breaks the GCC testsuite. As far as I can see, it can > >never be a correct change. It's not possible to change the GCC > >testsuite to match, because old versions of the testsuite need to work > >too. > > Why? We've been using it on GDB testsuite for months now. What breaks > now for GCC? I'm just curious -- backing it out in the repository is > fine, esp. if it breaks in some env ... but some details on why you > think so would be helpful ... The failure mode is that none of the c-torture tests run, with no error message. So instead of 13000 or so testruns, you get about 200. I've attached below some sample output. > >I also think that this change: > > > >* lib/target.exp (default_target_compile,default_target_assemble, > >default_link): Remove env() interface for *_FOR_TARGET TCL vars. > > > >and this change: > > > >* runtest.exp: Cleanup reference to $env(MULTIPASS) and > >$env(PASS). These were added by HP but unused since. > > > >are unwise. I don't know what might depend on this functionality. > > These were unfortunately added in by yours truly last year. If you want > to back it out it's fine as well. > > > >They also seem to be part of the same patch judging by the ChangeLog > >entry. > > Somehow emacs Ctrl-x 4 a does not create a new date stamp for separate > commits in ChangeLog .. these are actually separate. But I can see how > it could be confusing. Aah. You're supposed to write, for instance: 2000-07-20 Geoff Keating <geoffk@cygnus.com> * config/rs6000/rs6000.c (struct toc_hash_struct): Add 'key_mode' field. (rs6000_hash_constant): Hash mode too. (toc_hash_function): Allow for key_mode. (toc_hash_eq): Structures are different if key_mode differs. (output_toc): Add 'mode' parameter. Save key_mode. * config/rs6000/rs6000.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Pass 'mode' parameter. * config/rs6000/rs6000-protos.h (output_toc): Add 'mode' param. * config/rs6000/rs6000.c (output_toc): Use RS6000_OUTPUT_BASENAME for vtable references. for two separate changes that happened to be committed on the same day. I'll see if I can't limit the backing-out to just the patch that causes the problem. -- - Geoffrey Keating <geoffk@cygnus.com> ----------BAD: === gcc tests === Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for build. Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for host. Schedule of variations: powerpc-sim Running target powerpc-sim Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for target. Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/powerpc-sim.exp as board description file for target. Using /sloth/delay/tbox/objs/share/dejagnu/config/sim.exp as generic interface file for target. Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/basic-sim.exp as board description file for target. Using /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/dg.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/acker1.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dg-test.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dhry.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/gcov.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/linkage.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/matrix1.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/mg.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/msgs.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sieve.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sort2.exp ... === gcc Summary === # of expected passes 176 # of expected failures 16 # of unsupported tests 39 ----------GOOD: === gcc tests === Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for build. Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for host. Schedule of variations: powerpc-sim Running target powerpc-sim Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for target. Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/powerpc-sim.exp as board description file for target. Using /sloth/delay/tbox/objs/share/dejagnu/config/sim.exp as generic interface file for target. Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/basic-sim.exp as board description file for target. Using /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/compile/compile.exp ... FAIL: gcc.c-torture/compile/20000804-1.c, -O0 FAIL: gcc.c-torture/compile/20000804-1.c, -O1 FAIL: gcc.c-torture/compile/20000804-1.c, -O2 FAIL: gcc.c-torture/compile/20000804-1.c, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/compile/20000804-1.c, -O3 -g FAIL: gcc.c-torture/compile/20000804-1.c, -O3 -fssa FAIL: gcc.c-torture/compile/20000804-1.c, -Os Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/execute/execute.exp ... FAIL: gcc.c-torture/execute/20000225-1.c execution, -O2 FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -g FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fssa FAIL: gcc.c-torture/execute/20000225-1.c execution, -Os FAIL: gcc.c-torture/execute/20000412-2.c execution, -O2 FAIL: gcc.c-torture/execute/20000412-2.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/20000412-2.c execution, -O3 -g FAIL: gcc.c-torture/execute/20000412-2.c execution, -O3 -fssa FAIL: gcc.c-torture/execute/20000412-2.c execution, -Os XPASS: gcc.c-torture/execute/20000801-4.c execution, -O0 XPASS: gcc.c-torture/execute/20000801-4.c execution, -O1 XPASS: gcc.c-torture/execute/20000801-4.c execution, -O2 XPASS: gcc.c-torture/execute/20000801-4.c execution, -O3 -fomit-frame-pointer XPASS: gcc.c-torture/execute/20000801-4.c execution, -O3 -g XPASS: gcc.c-torture/execute/20000801-4.c execution, -O3 -fssa XPASS: gcc.c-torture/execute/20000801-4.c execution, -Os Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/execute/memcheck/memcheck.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/cpp/cpp.exp ... FAIL: gcc.dg/cpp/lexstrng.c (test for excess errors) FAIL: gcc.dg/cpp/paste2.c (test for excess errors) Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/dg.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/special/ecos.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/acker1.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dg-test.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dhry.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/gcov.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/linkage.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/matrix1.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/mg.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/msgs.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sieve.exp ... Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sort2.exp ... === gcc Summary === # of expected passes 12737 # of unexpected failures 21 # of unexpected successes 7 # of expected failures 43 # of unsupported tests 40 From geoffk@cygnus.com Fri Aug 04 23:27:00 2000 From: Geoff Keating <geoffk@cygnus.com> To: Geoff Keating <geoffk@cygnus.com> Cc: gdb-patches@sourceware.cygnus.com Subject: Re: recent dejagnu changes Date: Fri, 04 Aug 2000 23:27:00 -0000 Message-id: <jmu2d0z0hb.fsf@envy.cygnus.com> References: <Pine.LNX.4.10.10008042223470.26402-100000@hpcll168.cup.hp.com> <jmvgxgz140.fsf@envy.cygnus.com> X-SW-Source: 2000-08/msg00117.html Content-length: 5678 OK, here's the patch I'm about to commit: -- - Geoffrey Keating <geoffk@cygnus.com> Index: ChangeLog =================================================================== RCS file: /cvs/src/src/dejagnu/ChangeLog,v retrieving revision 1.19 diff -p -u -u -p -r1.19 ChangeLog --- ChangeLog 2000/08/02 22:38:52 1.19 +++ ChangeLog 2000/08/05 06:25:30 @@ -1,3 +1,14 @@ +2000-08-04 Geoff Keating <geoffk@cygnus.com> + + Back out this change: + + * lib/utils.exp: Add support for a -maxdepth <n> + option to limit find to <n> directories deep. + * runtest.exp: Handle multiple directories in TCL variables + dir_to_run and cmdline_dir_to_run; limit *.exp find to + one directory level to avoid foo/bar/baz.exp getting tested + twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar'). + 2000-08-02 Jimmy Guo <guo@hpcleara.cup.hp.com> * lib/target.exp (default_target_compile,default_target_assemble, @@ -8,14 +19,14 @@ * lib/utils.exp: Add support for a -maxdepth <n> option to limit find to <n> directories deep. - - * runtest.exp: Cleanup reference to $env(MULTIPASS) and - $env(PASS). These were added by HP but unused since. - Handle multiple directories in TCL variables + * runtest.exp: Handle multiple directories in TCL variables dir_to_run and cmdline_dir_to_run; limit *.exp find to one directory level to avoid foo/bar/baz.exp getting tested twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar'). + * runtest.exp: Cleanup reference to $env(MULTIPASS) and + $env(PASS). These were added by HP but unused since. + * lib/framework.exp (pass): make compiler_conditional_xfail_data a global, corresponding to a recent change to 'proc fail'. Index: runtest.exp =================================================================== RCS file: /cvs/src/src/dejagnu/runtest.exp,v retrieving revision 1.3 diff -p -u -u -p -r1.3 runtest.exp --- runtest.exp 2000/08/02 22:35:10 1.3 +++ runtest.exp 2000/08/05 06:25:30 @@ -1730,16 +1730,7 @@ foreach current_target $target_list { # value (for example in MULTIPASS) and the test # directory matches that directory. if {[info exists dir_to_run] && $dir_to_run != ""} { - # JYG: dir_to_run might be a space delimited list - # of directories. Look for match on each item. - set found 0 - foreach directory $dir_to_run { - if [string match "*${directory}*" $dir] { - set found 1 - break - } - } - if {!$found} { + if ![string match "*${dir_to_run}*" $dir] { continue } } @@ -1749,30 +1740,12 @@ foreach current_target $target_list { # directory matches that directory if {[info exists cmdline_dir_to_run] \ && $cmdline_dir_to_run != ""} { - # JYG: cmdline_dir_to_run might be a space delimited - # list of directories. Look for match on each item. - set found 0 - foreach directory $cmdline_dir_to_run { - if [string match "*${directory}*" $dir] { - set found 1 - break - } - } - if {!$found} { + if ![string match "*${cmdline_dir_to_run}*" $dir] { continue } } - # JYG: Limit find to one directory level to treat - # each test directory as a base directory. - # test_top_dirs includes all subdirectory paths, - # e.g. for gdb.hp/gdb.base-hp/, test_top_dirs - # has two entries: gdb.hp/, and gdb.base-hp/. - # If we just use '[find ${dir} *.exp]', all - # *.exp files in gdb.hp/gdb.base-hp/ would be - # picked up twice and tested twice, which is - # what we don't need. - foreach test_name [lsort [find -maxdepth 1 ${dir} *.exp]] { + foreach test_name [lsort [find ${dir} *.exp]] { if { ${test_name} == "" } { continue } Index: lib/utils.exp =================================================================== RCS file: /cvs/src/src/dejagnu/lib/utils.exp,v retrieving revision 1.2 diff -p -u -u -p -r1.2 utils.exp --- utils.exp 2000/08/02 22:35:10 1.2 +++ utils.exp 2000/08/05 06:25:30 @@ -87,34 +87,18 @@ proc getdirs { args } { # # Finds all the files recursively -# Args: -# [-maxdepth <n>] -# limit recursive find depth to <n> level; -# default is to recursively find in all subdirectories -# rootdir -# the directory to start the search from. This is and all -# subdirectories are searched for filenames. Directory names -# are not included in the list, but the filenames have path -# information. -# pattern -# the pattern to match. Patterns are csh style globbing rules. -# Returns: -# a list or a NULL. +# rootdir - this is the directory to start the search +# from. This is and all subdirectories are search for +# filenames. Directory names are not included in the +# list, but the filenames have path information. +# pattern - this is the pattern to match. Patterns are csh style +# globbing rules. +# returns: a list or a NULL. # -proc find { args } { - if { [lindex $args 0] == "-maxdepth" } { - set maxdepth [lindex $args 1] - set args [lrange $args 2 end] - } else { - set maxdepth 0 - } - set rootdir [lindex $args 0] - set pattern [lindex $args 1] - +proc find { rootdir pattern } { # first find all the directories set dirs "$rootdir " - set depth 1 - while { $maxdepth == 0 || $depth < $maxdepth } { + while 1 { set tmp $rootdir set rootdir "" if [string match "" $tmp] { @@ -131,7 +115,6 @@ proc find { args } { } } set tmp "" - set depth [expr $depth + 1] } # find all the files that match the pattern From guo@cup.hp.com Fri Aug 04 23:33:00 2000 From: Jimmy Guo <guo@cup.hp.com> To: Geoff Keating <geoffk@cygnus.com> Cc: gdb-patches@sourceware.cygnus.com Subject: Re: recent dejagnu changes Date: Fri, 04 Aug 2000 23:33:00 -0000 Message-id: <Pine.LNX.4.10.10008042318560.26633-100000@hpcll168.cup.hp.com> References: <jmvgxgz140.fsf@envy.cygnus.com> X-SW-Source: 2000-08/msg00118.html Content-length: 10256 I think the only changes needs to be backed out are runtest.exp w.r.t. the dir_to_run, cmdline_dir_to_run, find -maxdepth changes, and possibly utils.exp (find) enhancement (since if runtest.exp usage is backed out it is no longer needed anywhere, although it's a valid change). The problem is that I thought a dejagnu test tree contains <tool>.<something>/ as a proper suite name, anywhere. However apparently the GCC suite just requires the top level suite name be such. Yes in this case the particular patch would not find these *.exp files since the base directory will never be part of the test_top_dirs list. Unfortunately the GDB suite, specifically gdb.hp/, follows the convention that any test directory would be named with the 'gdb.' prefix, e.g. gdb.hp/gdb.base-hp/. In some ways this is correct, since at any level a dejagnu test tree would be able to have additional .exp library files to support that particular local tree in a directory not starting with the <tool> prefix, e.g. gdb.hp/lib/gdb_hp.exp, for example, would be possible (although not the case right now), and runtest would be correctly skipping such library files not intended as test files. I don't know if GCC suite can rename all its sub-test-suite directories to gcc.<something> :) But feel free to back this patch out. I can live with the change being HP local. Better yet, comment out my changes and provide some explanations on why this does not work everywhere, e.g. with GCC testing, so that this does not occur again ... - Jimmy On 4 Aug 2000, Geoff Keating wrote: > >Jimmy Guo <guo@cup.hp.com> writes: > >> > date: 2000/08/02 22:35:10; author: guo; state: Exp; lines: +8 -1 >... >> >is the one that breaks the GCC testsuite. As far as I can see, it can >> >never be a correct change. It's not possible to change the GCC >> >testsuite to match, because old versions of the testsuite need to work >> >too. >> >> Why? We've been using it on GDB testsuite for months now. What breaks >> now for GCC? I'm just curious -- backing it out in the repository is >> fine, esp. if it breaks in some env ... but some details on why you >> think so would be helpful ... > >The failure mode is that none of the c-torture tests run, with no >error message. So instead of 13000 or so testruns, you get about 200. > >I've attached below some sample output. > >> >I also think that this change: >> > >> >* lib/target.exp (default_target_compile,default_target_assemble, >> >default_link): Remove env() interface for *_FOR_TARGET TCL vars. >> > >> >and this change: >> > >> >* runtest.exp: Cleanup reference to $env(MULTIPASS) and >> >$env(PASS). These were added by HP but unused since. >> > >> >are unwise. I don't know what might depend on this functionality. >> >> These were unfortunately added in by yours truly last year. If you want >> to back it out it's fine as well. >> >> >> >They also seem to be part of the same patch judging by the ChangeLog >> >entry. >> >> Somehow emacs Ctrl-x 4 a does not create a new date stamp for separate >> commits in ChangeLog .. these are actually separate. But I can see how >> it could be confusing. > >Aah. You're supposed to write, for instance: > >2000-07-20 Geoff Keating <geoffk@cygnus.com> > > * config/rs6000/rs6000.c (struct toc_hash_struct): Add 'key_mode' > field. > (rs6000_hash_constant): Hash mode too. > (toc_hash_function): Allow for key_mode. > (toc_hash_eq): Structures are different if key_mode differs. > (output_toc): Add 'mode' parameter. Save key_mode. > * config/rs6000/rs6000.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): > Pass 'mode' parameter. > * config/rs6000/rs6000-protos.h (output_toc): Add 'mode' param. > > * config/rs6000/rs6000.c (output_toc): Use RS6000_OUTPUT_BASENAME > for vtable references. > > >for two separate changes that happened to be committed on the same day. > >I'll see if I can't limit the backing-out to just the patch that >causes the problem. > >-- >- Geoffrey Keating <geoffk@cygnus.com> > >----------BAD: > === gcc tests === > >Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for build. >Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for host. >Schedule of variations: > powerpc-sim > >Running target powerpc-sim >Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for target. >Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/powerpc-sim.exp as board description file for target. >Using /sloth/delay/tbox/objs/share/dejagnu/config/sim.exp as generic interface file for target. >Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/basic-sim.exp as board description file for target. >Using /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/dg.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/acker1.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dg-test.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dhry.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/gcov.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/linkage.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/matrix1.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/mg.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/msgs.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sieve.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sort2.exp ... > > === gcc Summary === > ># of expected passes 176 ># of expected failures 16 ># of unsupported tests 39 > >----------GOOD: > === gcc tests === > >Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for build. >Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for host. >Schedule of variations: > powerpc-sim > >Running target powerpc-sim >Using /home/s1/cygnus/dejagnu/boards/standard.exp as standard board description file for target. >Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/powerpc-sim.exp as board description file for target. >Using /sloth/delay/tbox/objs/share/dejagnu/config/sim.exp as generic interface file for target. >Using /sloth/delay/tbox/objs/share/dejagnu/baseboards/basic-sim.exp as board description file for target. >Using /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/compile/compile.exp ... >FAIL: gcc.c-torture/compile/20000804-1.c, -O0 >FAIL: gcc.c-torture/compile/20000804-1.c, -O1 >FAIL: gcc.c-torture/compile/20000804-1.c, -O2 >FAIL: gcc.c-torture/compile/20000804-1.c, -O3 -fomit-frame-pointer >FAIL: gcc.c-torture/compile/20000804-1.c, -O3 -g >FAIL: gcc.c-torture/compile/20000804-1.c, -O3 -fssa >FAIL: gcc.c-torture/compile/20000804-1.c, -Os >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/execute/execute.exp ... >FAIL: gcc.c-torture/execute/20000225-1.c execution, -O2 >FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fomit-frame-pointer >FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fomit-frame-pointer -funroll-loops >FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions >FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -g >FAIL: gcc.c-torture/execute/20000225-1.c execution, -O3 -fssa >FAIL: gcc.c-torture/execute/20000225-1.c execution, -Os >FAIL: gcc.c-torture/execute/20000412-2.c execution, -O2 >FAIL: gcc.c-torture/execute/20000412-2.c execution, -O3 -fomit-frame-pointer >FAIL: gcc.c-torture/execute/20000412-2.c execution, -O3 -g >FAIL: gcc.c-torture/execute/20000412-2.c execution, -O3 -fssa >FAIL: gcc.c-torture/execute/20000412-2.c execution, -Os >XPASS: gcc.c-torture/execute/20000801-4.c execution, -O0 >XPASS: gcc.c-torture/execute/20000801-4.c execution, -O1 >XPASS: gcc.c-torture/execute/20000801-4.c execution, -O2 >XPASS: gcc.c-torture/execute/20000801-4.c execution, -O3 -fomit-frame-pointer >XPASS: gcc.c-torture/execute/20000801-4.c execution, -O3 -g >XPASS: gcc.c-torture/execute/20000801-4.c execution, -O3 -fssa >XPASS: gcc.c-torture/execute/20000801-4.c execution, -Os >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/execute/memcheck/memcheck.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/cpp/cpp.exp ... >FAIL: gcc.dg/cpp/lexstrng.c (test for excess errors) >FAIL: gcc.dg/cpp/paste2.c (test for excess errors) >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/dg.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/noncompile/noncompile.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.dg/special/ecos.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/acker1.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dg-test.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/dhry.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/gcov.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/linkage.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/matrix1.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/mg.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/msgs.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sieve.exp ... >Running /sloth/delay/tbox/cvs-gcc/egcs/gcc/testsuite/gcc.misc-tests/sort2.exp ... > > === gcc Summary === > ># of expected passes 12737 ># of unexpected failures 21 ># of unexpected successes 7 ># of expected failures 43 ># of unsupported tests 40 ^ permalink raw reply [flat|nested] 11+ messages in thread
* recent dejagnu changes
@ 2000-08-04 20:31 Geoff Keating
0 siblings, 0 replies; 11+ messages in thread
From: Geoff Keating @ 2000-08-04 20:31 UTC (permalink / raw)
To: gdb-patches, Jimmy Guo
We've tracked it down a bit further. This change:
date: 2000/08/02 22:35:10; author: guo; state: Exp; lines: +8 -1
* runtest.exp: Handle multiple directories in TCL variables
dir_to_run and cmdline_dir_to_run; limit *.exp find to
one directory level to avoid foo/bar/baz.exp getting tested
twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar').
* lib/utils.exp (find): Add support for a -maxdepth <n>
option to limit find to <n> directories deep.
is the one that breaks the GCC testsuite. As far as I can see, it can
never be a correct change. It's not possible to change the GCC
testsuite to match, because old versions of the testsuite need to work
too.
I also think that this change:
* lib/target.exp (default_target_compile,default_target_assemble,
default_link): Remove env() interface for *_FOR_TARGET TCL vars.
and this change:
* runtest.exp: Cleanup reference to $env(MULTIPASS) and
$env(PASS). These were added by HP but unused since.
are unwise. I don't know what might depend on this functionality.
They also seem to be part of the same patch judging by the ChangeLog
entry.
So I propose to revert all of the recent changes except for those to
lib/framework.exp. I've tested this patch by running the resulting
dejagnu against the gcc and gdb testsuites, and running its own
testsuite, under powerpc-linux X powerpc-eabisim; the results were
very bad for gdb ("gdb-internal-error: legacy_register_name: called"),
but the testsuite seemed to be doing the right thing.
Any objections?
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/dejagnu-revertjimmy.patch==========
2000-08-04 Geoff Keating <geoffk@cygnus.com>
* runtest.exp: Revert last changes.
* lib/target.exp: Likewise.
* lib/utils.exp: Likewise.
Index: runtest.exp
===================================================================
RCS file: /cvs/src/src/dejagnu/runtest.exp,v
retrieving revision 1.3
retrieving revision 1.1.1.2
diff -u -p -r1.3 -r1.1.1.2
--- runtest.exp 2000/08/02 22:35:10 1.3
+++ runtest.exp 1999/12/07 04:02:17 1.1.1.2
@@ -1604,16 +1604,20 @@ foreach current_target $target_list {
if { [info exists MULTIPASS] } {
set multipass $MULTIPASS
+ } elseif {[info exists env(MULTIPASS)]} {
+ set multipass $env(MULTIPASS)
}
if { $multipass == "" } {
set multipass { "" }
}
-# If PASS is specified, we want to run only the tests specified.
-# Its value should be a number or a list of numbers that specify
-# the passes that we want to run.
+# If PASS is specified, either as a TCL variable or in environment, we
+# want to run only the tests specified. Its value should be a number
+# or a list of numbers that specify the passes that we want to run.
if [info exists PASS] {
set pass $PASS
+ } elseif [info exists env(PASS)] {
+ set pass $env(PASS)
} else {
set pass ""
}
@@ -1730,16 +1734,7 @@ foreach current_target $target_list {
# value (for example in MULTIPASS) and the test
# directory matches that directory.
if {[info exists dir_to_run] && $dir_to_run != ""} {
- # JYG: dir_to_run might be a space delimited list
- # of directories. Look for match on each item.
- set found 0
- foreach directory $dir_to_run {
- if [string match "*${directory}*" $dir] {
- set found 1
- break
- }
- }
- if {!$found} {
+ if ![string match "*${dir_to_run}*" $dir] {
continue
}
}
@@ -1749,30 +1744,12 @@ foreach current_target $target_list {
# directory matches that directory
if {[info exists cmdline_dir_to_run] \
&& $cmdline_dir_to_run != ""} {
- # JYG: cmdline_dir_to_run might be a space delimited
- # list of directories. Look for match on each item.
- set found 0
- foreach directory $cmdline_dir_to_run {
- if [string match "*${directory}*" $dir] {
- set found 1
- break
- }
- }
- if {!$found} {
+ if ![string match "*${cmdline_dir_to_run}*" $dir] {
continue
}
}
- # JYG: Limit find to one directory level to treat
- # each test directory as a base directory.
- # test_top_dirs includes all subdirectory paths,
- # e.g. for gdb.hp/gdb.base-hp/, test_top_dirs
- # has two entries: gdb.hp/, and gdb.base-hp/.
- # If we just use '[find ${dir} *.exp]', all
- # *.exp files in gdb.hp/gdb.base-hp/ would be
- # picked up twice and tested twice, which is
- # what we don't need.
- foreach test_name [lsort [find -maxdepth 1 ${dir} *.exp]] {
+ foreach test_name [lsort [find ${dir} *.exp]] {
if { ${test_name} == "" } {
continue
}
Index: lib/target.exp
===================================================================
RCS file: /cvs/src/src/dejagnu/lib/target.exp,v
retrieving revision 1.6
retrieving revision 1.5
diff -u -p -r1.6 -r1.5
--- target.exp 2000/08/02 22:38:52 1.6
+++ target.exp 2000/06/04 03:34:35 1.5
@@ -289,6 +289,7 @@ proc target_compile {source destfile typ
proc default_target_compile {source destfile type options} {
global target_triplet
global tool_root_dir
+ global env
global CFLAGS_FOR_TARGET
global compiler_flags
@@ -305,6 +306,11 @@ proc default_target_compile {source dest
if [info exists CFLAGS_FOR_TARGET] {
append add_flags " $CFLAGS_FOR_TARGET"
+# The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
+# that may not be applicable to testsuite runs. This conflict
+# needs to be resolved.
+# } elseif [info exists env(CFLAGS_FOR_TARGET)] {
+# append add_flags " $env(CFLAGS_FOR_TARGET)"
}
if [info exists target_info(host,name)] {
@@ -398,18 +404,43 @@ proc default_target_compile {source dest
if { $compiler == "" } {
set compiler $CC_FOR_TARGET
}
+# When started from a mid-level directory (eg gdb)
+# the Makefile may export a *_FOR_TARGET that isn't
+# applicable.
+# } elseif [info exists env(CC_FOR_TARGET)] {
+# if { $compiler == "" } {
+# set compiler $env(CC_FOR_TARGET)
+# }
+ } elseif { [info exists env(CC_FOR_TARGET)] && $env(CC_FOR_TARGET) != "" } {
+ if { $compiler == "" } {
+ set compiler $env(CC_FOR_TARGET)
+ }
}
if [info exists CXX_FOR_TARGET] {
if { $compiler_type == "c++" } {
set compiler $CXX_FOR_TARGET
}
+# When started from a mid-level directory (eg gdb)
+# the Makefile may export a *_FOR_TARGET that isn't
+# applicable.
+# } elseif [info exists env(CXX_FOR_TARGET)] {
+# if { $compiler_type == "c++" } {
+# set compiler $env(CXX_FOR_TARGET)
+# }
}
if [info exists F77_FOR_TARGET] {
if { $compiler_type == "f77" } {
set compiler $F77_FOR_TARGET
}
+# When started from a mid-level directory (eg gdb)
+# the Makefile may export a *_FOR_TARGET that isn't
+# applicable.
+# } elseif [info exists env(F77_FOR_TARGET)] {
+# if { $compiler_type == "f77" } {
+# set compiler $env(F77_FOR_TARGET)
+# }
}
if { $compiler == "" } {
@@ -624,11 +655,14 @@ proc target_assemble { source destfile f
}
proc default_target_assemble { source destfile flags } {
- global AS_FOR_TARGET
- global ASFLAGS_FOR_TARGET
+ global env
+ global AS_FOR_TARGET;
+ global ASFLAGS_FOR_TARGET;
if [info exists AS_FOR_TARGET] {
set AS "$AS_FOR_TARGET";
+ } elseif [info exists env(AS_FOR_TARGET)] {
+ set AS $env(AS_FOR_TARGET)
} else {
if ![board_info target exists assembler] {
set AS [find_gas];
@@ -639,6 +673,11 @@ proc default_target_assemble { source de
if [info exists ASFLAGS_FOR_TARGET] {
append flags " $ASFLAGS_FOR_TARGET";
+# The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
+# that may not be applicable to testsuite runs. This conflict
+# needs to be resolved.
+# } elseif [info exists env(ASFLAGS_FOR_TARGET)] {
+# append flags " $env(ASFLAGS_FOR_TARGET)"
}
if [is_remote host] {
@@ -672,8 +711,9 @@ proc target_link { objects destfile flag
}
proc default_link { board objects destfile flags } {
- global LD_FOR_TARGET
- global LDFLAGS_FOR_TARGET
+ global env
+ global LD_FOR_TARGET;
+ global LDFLAGS_FOR_TARGET;
# return -L's in ldflags
proc only--Ls { ldflags } {
@@ -702,6 +742,8 @@ proc default_link { board objects destfi
if [info exists LD_FOR_TARGET] {
set LD "$LD_FOR_TARGET";
+ } elseif [info exists env(LD_FOR_TARGET)] {
+ set LD $env(LD_FOR_TARGET)
} else {
if ![board_info target exists linker] {
set LD [find_ld];
@@ -712,6 +754,11 @@ proc default_link { board objects destfi
if [info exists LDFLAGS_FOR_TARGET] {
append flags " $LDFLAGS_FOR_TARGET";
+# The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
+# that may not be applicable to testsuite runs. This conflict
+# needs to be resolved.
+# } elseif [info exists env(LDFLAGS_FOR_TARGET)] {
+# append flags " $env(LDFLAGS_FOR_TARGET)"
}
# `ldflags' consists of arguments to gcc (that are then
Index: lib/utils.exp
===================================================================
RCS file: /cvs/src/src/dejagnu/lib/utils.exp,v
retrieving revision 1.2
retrieving revision 1.1.1.1
diff -u -p -r1.2 -r1.1.1.1
--- utils.exp 2000/08/02 22:35:10 1.2
+++ utils.exp 1999/11/09 01:28:42 1.1.1.1
@@ -87,34 +87,18 @@ proc getdirs { args } {
#
# Finds all the files recursively
-# Args:
-# [-maxdepth <n>]
-# limit recursive find depth to <n> level;
-# default is to recursively find in all subdirectories
-# rootdir
-# the directory to start the search from. This is and all
-# subdirectories are searched for filenames. Directory names
-# are not included in the list, but the filenames have path
-# information.
-# pattern
-# the pattern to match. Patterns are csh style globbing rules.
-# Returns:
-# a list or a NULL.
+# rootdir - this is the directory to start the search
+# from. This is and all subdirectories are search for
+# filenames. Directory names are not included in the
+# list, but the filenames have path information.
+# pattern - this is the pattern to match. Patterns are csh style
+# globbing rules.
+# returns: a list or a NULL.
#
-proc find { args } {
- if { [lindex $args 0] == "-maxdepth" } {
- set maxdepth [lindex $args 1]
- set args [lrange $args 2 end]
- } else {
- set maxdepth 0
- }
- set rootdir [lindex $args 0]
- set pattern [lindex $args 1]
-
+proc find { rootdir pattern } {
# first find all the directories
set dirs "$rootdir "
- set depth 1
- while { $maxdepth == 0 || $depth < $maxdepth } {
+ while 1 {
set tmp $rootdir
set rootdir ""
if [string match "" $tmp] {
@@ -131,7 +115,6 @@ proc find { args } {
}
}
set tmp ""
- set depth [expr $depth + 1]
}
# find all the files that match the pattern
============================================================
From guo@cup.hp.com Fri Aug 04 22:32:00 2000
From: Jimmy Guo <guo@cup.hp.com>
To: Geoff Keating <geoffk@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: recent dejagnu changes
Date: Fri, 04 Aug 2000 22:32:00 -0000
Message-id: <Pine.LNX.4.10.10008042223470.26402-100000@hpcll168.cup.hp.com>
References: <200008050329.UAA09958@localhost.cygnus.com>
X-SW-Source: 2000-08/msg00115.html
Content-length: 1819
>is the one that breaks the GCC testsuite. As far as I can see, it can
>never be a correct change. It's not possible to change the GCC
>testsuite to match, because old versions of the testsuite need to work
>too.
Why? We've been using it on GDB testsuite for months now. What breaks
now for GCC? I'm just curious -- backing it out in the repository is
fine, esp. if it breaks in some env ... but some details on why you
think so would be helpful ...
>I also think that this change:
>
>* lib/target.exp (default_target_compile,default_target_assemble,
>default_link): Remove env() interface for *_FOR_TARGET TCL vars.
>
>and this change:
>
>* runtest.exp: Cleanup reference to $env(MULTIPASS) and
>$env(PASS). These were added by HP but unused since.
>
>are unwise. I don't know what might depend on this functionality.
These were unfortunately added in by yours truly last year. If you want
to back it out it's fine as well.
>They also seem to be part of the same patch judging by the ChangeLog
>entry.
Somehow emacs Ctrl-x 4 a does not create a new date stamp for separate
commits in ChangeLog .. these are actually separate. But I can see how
it could be confusing.
>So I propose to revert all of the recent changes except for those to
>lib/framework.exp. I've tested this patch by running the resulting
>dejagnu against the gcc and gdb testsuites, and running its own
>testsuite, under powerpc-linux X powerpc-eabisim; the results were
>very bad for gdb ("gdb-internal-error: legacy_register_name: called"),
>but the testsuite seemed to be doing the right thing.
Actually the patches work OK in our environment ... but as I said feel
free to back it out if we understand how it breaks ... I submitted
these, except for the env cleanup one, intending to fix something.
- Jimmy Guo, guo@cup.hp.com
^ permalink raw reply [flat|nested] 11+ messages in threadend of thread, other threads:[~2000-08-14 11:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <398C3E91.D0EDB934@cygnus.com>
2000-08-07 10:09 ` recent dejagnu changes Jimmy Guo
2000-08-07 11:00 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo
2000-08-07 11:34 ` [RFA] dejagnu runtest.exp redundant testing Jimmy Guo
2000-08-11 19:17 ` (withdraw) " Jimmy Guo
2000-08-14 11:02 ` [RFA] dejagnu runtest.exp *dir_to_run Jimmy Guo
[not found] <Pine.LNX.4.10.10008080958530.12236-100000@hpcll168.cup.hp.com>
2000-08-08 11:29 ` recent dejagnu changes Geoff Keating
2000-08-08 12:52 ` Stan Shebs
2000-08-08 14:24 ` Geoff Keating
[not found] <jmu2d0z0hb.fsf@envy.cygnus.com>
2000-08-04 23:40 ` Jimmy Guo
[not found] <Pine.LNX.4.10.10008042223470.26402-100000@hpcll168.cup.hp.com>
2000-08-04 23:16 ` Geoff Keating
2000-08-04 20:31 Geoff Keating
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox