From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [PING] [RFC] RE: Results of macscp.exp test on cygwin
Date: Mon, 26 Jan 2009 09:13:00 -0000 [thread overview]
Message-ID: <004a01c97f96$637bced0$2a736c70$@u-strasbg.fr> (raw)
In-Reply-To: <001401c92af1$cf8821e0$6e9865a0$@u-strasbg.fr>
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} {
next prev parent reply other threads:[~2009-01-26 9:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 11:37 Pierre Muller
2008-10-09 16:29 ` Tom Tromey
2008-10-09 16:46 ` Pedro Alves
2008-10-09 18:14 ` Daniel Jacobowitz
2008-10-09 20:21 ` Michael Snyder
2008-10-09 22:28 ` Paul Pluzhnikov
2008-10-10 16:04 ` [RFC] " Pierre Muller
2009-01-26 9:13 ` Pierre Muller [this message]
2009-01-28 13:32 ` [RFC] Use untested for macscp.exp if no macro information generated Pierre Muller
2009-02-01 18:28 ` Daniel Jacobowitz
2009-02-03 14:36 ` [RFC-v2] " Pierre Muller
2009-02-18 22:59 ` [PING] " Pierre Muller
2009-02-19 8:20 ` Tom Tromey
2009-02-20 10:08 ` Pierre Muller
2009-05-11 11:30 ` PING : " Pierre Muller
2009-05-29 23:40 ` Tom Tromey
2009-05-30 8:04 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004a01c97f96$637bced0$2a736c70$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox