Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, 	Joel Brobecker <brobecker@adacore.com>
Subject: Re: [PATCH 1/2] gdb.ada/minsyms.exp: Don't hardcode the variable's address
Date: Tue, 21 Nov 2017 16:24:00 -0000	[thread overview]
Message-ID: <8760a3oazu.fsf@redhat.com> (raw)
In-Reply-To: <1511280661-14725-2-git-send-email-palves@redhat.com> (Pedro	Alves's message of "Tue, 21 Nov 2017 16:11:00 +0000")

On Tuesday, November 21 2017, Pedro Alves wrote:

> This new testcase has a test that fails like this here:
>
>   $1 = (<data variable, no debug info> *) 0x60208c <some_minsym>
>   (gdb) FAIL: gdb.ada/minsyms.exp: print &some_minsym
>
> The problem is that the testcase hardcodes an expected address for the
> "some_minsym" variable, which obviously isn't stable.
>
> Fix that by expecting $hex instead.

No Ada expert here, but I'd say this is borderline obvious and should go
in :-).

Thanks,

> gdb/testsuite/ChangeLog:
> 2017-11-21  Pedro Alves  <palves@redhat.com>
>
> 	* gdb.ada/minsyms.exp: Accept any address for 'some_minsym'.
> ---
>  gdb/testsuite/gdb.ada/minsyms.exp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/testsuite/gdb.ada/minsyms.exp b/gdb/testsuite/gdb.ada/minsyms.exp
> index 2c91125..9878f9f 100644
> --- a/gdb/testsuite/gdb.ada/minsyms.exp
> +++ b/gdb/testsuite/gdb.ada/minsyms.exp
> @@ -35,7 +35,7 @@ gdb_test "print integer(some_minsym)" \
>           " = 1234"
>  
>  gdb_test "print &some_minsym" \
> -         " = \\(access <data variable, no debug info>\\) 0x62c2f8 <some_minsym>"
> +         " = \\(access <data variable, no debug info>\\) $hex <some_minsym>"
>  
>  gdb_test "print /x integer(&some_minsym)" \
>           " = $hex"
> -- 
> 2.5.5

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


  reply	other threads:[~2017-11-21 16:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 16:11 [PATCH 0/2] Fix a couple gdb.ada/minsyms.exp problems Pedro Alves
2017-11-21 16:11 ` [PATCH 2/2] Don't lose language determined from the "main" name (fix gdb.ada/minsyms.exp) Pedro Alves
2017-11-21 16:23   ` Sergio Durigan Junior
2017-11-21 16:42     ` Pedro Alves
2017-11-21 16:53       ` Sergio Durigan Junior
2017-11-21 16:56       ` Pedro Alves
2017-11-21 17:05         ` Pedro Alves
2017-11-21 17:15         ` Sergio Durigan Junior
2017-11-21 17:22           ` Pedro Alves
2017-11-21 16:11 ` [PATCH 1/2] gdb.ada/minsyms.exp: Don't hardcode the variable's address Pedro Alves
2017-11-21 16:24   ` Sergio Durigan Junior [this message]
2017-11-21 16:50   ` Joel Brobecker
2017-11-21 17:08     ` Pedro Alves

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=8760a3oazu.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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