public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Iain Buclaw <ibuclaw@gdcproject.org>, gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: Re: [RFC] [gdb/testsuite] Use dwarf assembly in gdb.dlang/dlang-start.exp
Date: Mon, 20 Feb 2023 15:28:39 +0100	[thread overview]
Message-ID: <a016ebcd-3896-17ce-6cf2-6571de5dc46a@suse.de> (raw)
In-Reply-To: <1676902127.35r1n62kps.astroid@pulse.none>

On 2/20/23 15:14, Iain Buclaw wrote:
> Excerpts from Tom de Vries via Gdb-patches's message of Februar 20, 2023 2:48 pm:
>> For test-case gdb.dlang/dlang-start.exp, I run into:
>> ...
>> gdb compile failed, default_target_compile: Can't find gdc.
>> ...
>>
>> AFAICT, my distro has no support for gdc, but I'd like to have the test-case
>> running and passing, so let's rewrite the test-case using dwarf assembly
>> (though arguably, it's not a bad idea to have test-cases excercising
>> actual compilers).
>>
>> My distro does have a package providing dmd, so let's try out simple.d
>> compiled with dmd, and investigate what the start command does.
>>
> 
> I'm pretty sure I'd get testsuite failures for not having Ada or Rust
> installed either. 

Yes, most likely.

> Shouldn't the testsuite just return UNSUPPORTED when
> there's a missing dependency?
> 

That's certainly an option.  OTOH, the approach taken in this patch is 
to instead eliminate the dependency, which ensures that everybody 
running the entire testsuite will exercise this test-case.

That sort of approach is not feasible for ada which has a lot of 
test-cases, and is not needed either (for me) for ada or rust because 
compilers are readily available in packages.

>> AFAICT, gdb uses "D main" because the minimal symbol _Dmain:
>> ...
>> $ nm simple | grep 438448
>> 0000000000438448 t
>> 0000000000438448 W _Dmain
>> ...
>> is demangled into "D main":
>> ...
> 
> Yes. If I try to second guess my thinking from 2016 or so. I believe it
> was because "_Dmain" could come from any language, but having a space in
> the identifier pretty much guarantees only a D compiler generated it.

I see, interesting, thanks for sharing that.

Thanks
- Tom


  reply	other threads:[~2023-02-20 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 13:48 Tom de Vries
2023-02-20 14:14 ` Iain Buclaw
2023-02-20 14:28   ` Tom de Vries [this message]
2023-03-27 11:51 ` Tom de Vries

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=a016ebcd-3896-17ce-6cf2-6571de5dc46a@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=ibuclaw@gdcproject.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).