This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[PING] [RFC] RE: Results of macscp.exp test on cygwin


  I got no comments on this RFC,
could someone give me some feedback, please?



Pierre Muller
Pascal language support maintainer for GDB



> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pierre Muller
> Envoyé?: Friday, October 10, 2008 6:04 PM
> À?: tromey@redhat.com; gdb-patches@sourceware.org
> Objet?: [RFC] RE: Results of macscp.exp test on cygwin
> 
>   Just a small note to confirm that
> your commit did remove all FAIL for
> make check RUNTESTFLAGS="gdb.base/macscp.exp CC_FOR_TARGET=\"gcc-4
> -gdwarf-2\""
> 
> I now only get 19 KFAIL, all tagged as PRMS gdb/555.
> 
>   But as said in my first email,
> on cygwin, in order to get those good results, you need both
> to use gcc version 4 and explicit dwarf-2 debug format.
> 
>   Thanks, Tom!
> 
> 
>   Daniel, suggested to skip the test
> rather than forcing anything, but my knowledge of dejagnu
> is poor.
> 
>   I tried to write a patch.
> 
>  First , I added a check for gcc version, and skip the test if main
> version
> is >=3
> (first part of the patch below).
> 
>  Second, for the debugging format, I used the result of 'info source'
> command
> as in gdb.exp get_debug_format procedure.
> This only only works if the debuggee
> is already started, so I postponed the test after
> the runto_main command.
>   This generates 5 FAIL but when I tried to
> move the runto_main earlier in the macscp.exp
> I generated new failures for the "working case" i.e. gcc version 4.3.2.
> 
>   By the way, I discovered while doing this that for
> gcc-4 dwarf-2 is the default debugging format for cygwin target.
> Thus:
> make check RUNTESTFLAGS="gdb.base/macscp.exp CC_FOR_TARGET=gcc-4"
> also gives me "292 PASS and 19 KFAIL"
> 
>   I wanted to give an explanation of the reasons of the skipping,
> and I first inserted this into the untested procedure argument,
> but I later saw that this argument seems to always be a filename,
> this is the reason of the use of the warning function,
> but I am also not really sure that warning is the correct function
> to use in such a case...
> 
> 
> Pierre Muller
> Pascal language support maintainer for GDB
> 
> 
> gdb/testsuite ChangeLog entry:
> 
> 2008-10-10  Pierre Muller  <muller@ics.u-strasbg.fr>
> 
> 	* gdb.base/macscp.exp: Skip test if gcc version below 4
> 	or if preprocessor macro information is not available.
> 
> Index: gdb.base/macscp.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/macscp.exp,v
> retrieving revision 1.15
> diff -u -p -r1.15 macscp.exp
> --- gdb.base/macscp.exp 9 Oct 2008 16:49:47 -0000       1.15
> +++ gdb.base/macscp.exp 10 Oct 2008 16:01:04 -0000
> @@ -42,6 +42,14 @@ gdb_start
>  gdb_reinitialize_dir $srcdir/$subdir
>  gdb_load ${binfile}
> 
> +if {[info exists gcc_compiled] && ($gcc_compiled >= 4)} {
> +  # we are using gcc version 4.X.X
> +  # Lets continue the test
> +} else {
> +  warning "macscp.exp test skipped because gcc version is
> $gcc_compiled"
> +  untested macscp.exp
> +  return -1
> +}
> 
>  # Ask GDB to show the current definition of MACRO, and return a list
>  # describing the result.
> @@ -322,6 +330,52 @@ foreach func_entry $funcs {
>      gdb_test "break $func" "Breakpoint.*"
>  }
> 
> +global macro_support
> +
> +set macro_support "unknown"
> +
> +proc get_macro_support { } {
> +    global gdb_prompt
> +    global verbose
> +    global macro_support
> +
> +    send_gdb "info source\n"
> +    gdb_expect 10 {
> +       -re "Includes preprocessor macro info.\r\n.*$gdb_prompt $" {
> +           set macro_support 1
> +           verbose "Source has macro information"
> +           return 1;
> +       }
> +       -re "Does not include preprocessor macro info.\r\n.*$gdb_prompt
> $" {
> +           set macro_support 0
> +           verbose "Source has no macro information"
> +           return 1;
> +       }
> +       -re "No current source file.\r\n$gdb_prompt $" {
> +           perror "get_macro_support used when no current source file"
> +           return 0;
> +       }
> +       -re "$gdb_prompt $" {
> +           warning "couldn't check macro support (no valid response)."
> +           return 1;
> +       }
> +       timeout {
> +           warning "couldn't check macro support (timed out)."
> +           return 1;
> +       }
> +    }
> +}
> +
> +get_macro_support
> +
> +if {$macro_support != 1} {
> +  warning "macscp.exp test skipped because source has no macro
> information"
> +  untested macscp.exp
> +  return -1
> +}
> +
> +
> +
>  # Run to each of the breakpoints and check the definition (or lack
>  # thereof) of each macro.
>  for {set i 0} {$i < [llength $funcs]} {incr i} {


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