Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Avoid crash when calling warning too early
Date: Fri, 09 Nov 2018 19:41:00 -0000	[thread overview]
Message-ID: <5993d96c-afe2-99b1-af8d-56173ea73e08@redhat.com> (raw)
In-Reply-To: <20181031181820.24308-1-tom@tromey.com>

On 10/31/2018 06:18 PM, Tom Tromey wrote:
> +set save $INTERNAL_GDBFLAGS
> +set INTERNAL_GDBFLAGS "-nw -nx -data-directory $tname"
> +
> +gdb_start
> +
> +# Make sure gdb started up.
> +gdb_test "echo 23\\n" "23"

I guess this could also check that the warning was emitted?

> +
> +set INTERNAL_GDBFLAGS $save

FYI, you can use:

save_vars { INTERNAL_GDBFLAGS } {
   set INTERNAL_GDBFLAGS "-nw -nx -data-directory $tname"
   ...
}

But, note that gdb/testsuite/README says this about
INTERNAL_GDBFLAGS:

 ~~~ 
 The testsuite does not override a value provided by the user.
 ~~~

I think that the test should instead be replacing/sed'ing
the existing -data-directory option, instead of overriding
INTERNAL_GDBFLAGS completely.
That's what gdb.base/gdbinit-history.exp does.

Thanks,
Pedro Alves


  parent reply	other threads:[~2018-11-09 19:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 18:18 Tom Tromey
2018-10-31 18:44 ` Sergio Durigan Junior
2018-10-31 20:27   ` Tom Tromey
2018-10-31 20:37     ` Sergio Durigan Junior
2018-11-08 23:10       ` Tom Tromey
2018-11-09 19:41 ` Pedro Alves [this message]
2018-11-15 23:22   ` Tom Tromey
2018-11-16 13:31     ` Pedro Alves
2018-11-18 18:46       ` Tom Tromey
2018-11-19 15:27         ` Pedro Alves
2018-11-15 23:25   ` Tom Tromey

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=5993d96c-afe2-99b1-af8d-56173ea73e08@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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