Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH,tests] Run to main before doing any tests in structs3.exp
Date: Tue, 06 Nov 2012 17:30:00 -0000	[thread overview]
Message-ID: <20121106173029.GC5103@adacore.com> (raw)
In-Reply-To: <50994431.1040405@codesourcery.com>

> On remote targets, we don't always start at the entry point. Thus,
> it is safer to get to main and do the tests from that point onwards.

Can you elaborate more? Your patch looks reasonable at first sight,
but then at the same time now introduces a new requirement that it
needs to be run on the target, whereas that was not the case before.

The testcase only prints global variables. I don't suppose there
is much of a guaranty that you could print global variables without
starting the program first, but it's been generally working. So
I am curious as to why it isn't working in your case.

> 2012-11-06  Luis Machado  <lgustavo@codesourcery.com>
> 
> 	* gdb.base/structs3.exp: Run to main before doing any tests.
> 
> Index: gdb-trunk/gdb/testsuite/gdb.base/structs3.exp
> ===================================================================
> --- gdb-trunk.orig/gdb/testsuite/gdb.base/structs3.exp	2012-11-02 17:29:00.801049370 -0200
> +++ gdb-trunk/gdb/testsuite/gdb.base/structs3.exp	2012-11-02 17:29:57.401050043 -0200
> @@ -23,6 +23,11 @@ if { [prepare_for_testing structs3.exp "
>      return -1
>  }
>  
> +if ![runto_main] {
> +    untested "could not run to main"
> +    return -1
> +}
> +
>  set vhn "\\$\[0-9\]+"
>  
>  # Check the real contents.


-- 
Joel


  reply	other threads:[~2012-11-06 17:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 17:09 Luis Machado
2012-11-06 17:30 ` Joel Brobecker [this message]
2012-11-06 18:51   ` Luis Machado
2012-11-06 19:12     ` Pedro Alves
2012-11-06 20:20       ` Luis Machado
2012-11-07  0:26     ` Joel Brobecker
2012-11-07 11:24       ` Luis Machado
2012-11-07 15:09         ` Joel Brobecker
2012-11-14 19:22           ` Luis Machado

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=20121106173029.GC5103@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    /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