Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Daniel Xu <dxu@dxuuu.xyz>, gdb-patches@sourceware.org, tom@tromey.com
Subject: Re: [PATCH] rust: Fix rust modules test
Date: Mon, 6 Jul 2020 11:32:00 +0200	[thread overview]
Message-ID: <5d899d5e-d610-402a-9cb6-d539d4f2b423@suse.de> (raw)
In-Reply-To: <20200704032741.835663-1-dxu@dxuuu.xyz>

On 7/4/20 5:27 AM, Daniel Xu wrote:
> I noticed that the modules test was failing. Some choice use of `nm`
> revealed `TWENTY_THREE` was not in the final binary. Rather than trying
> to trick the compiler/linker by using magic flags, simply `println!()`
> the global.
> 
> gdb/testsuite/

I cannot judge about the patch itself, but the FAIL was filed as
PR26121, so please add here: "PR rust/26121".

Thanks,
- Tom

>         * gdb.rust/modules.rs: Prevent linker from discarding test
>           symbol
> 
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ---
>  gdb/testsuite/gdb.rust/modules.rs | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gdb/testsuite/gdb.rust/modules.rs b/gdb/testsuite/gdb.rust/modules.rs
> index 6db082817b..dc2a469b2f 100644
> --- a/gdb/testsuite/gdb.rust/modules.rs
> +++ b/gdb/testsuite/gdb.rust/modules.rs
> @@ -93,4 +93,7 @@ pub mod mod1 {
>  
>  fn main () {
>      mod1::inner::innest::f1();
> +
> +    // Prevent linker from discarding `TWENTY_THREE`
> +    println!("{}", TWENTY_THREE);
>  }
> 


  reply	other threads:[~2020-07-06  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04  3:27 Daniel Xu
2020-07-06  9:32 ` Tom de Vries [this message]
2020-07-07  5:16   ` Daniel Xu
2020-07-04  3:59 Daniel Xu
2020-07-04  6:44 ` Daniel Xu
2020-07-11 22:14 ` 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=5d899d5e-d610-402a-9cb6-d539d4f2b423@suse.de \
    --to=tdevries@suse.de \
    --cc=dxu@dxuuu.xyz \
    --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