From: Michael Chastain <mec.gnu@mindspring.com>
To: me@cgf.cx, gdb-patches@sources.redhat.com
Subject: Re: [RFC] Suggested ways to remove the need for xm-go32.h
Date: Thu, 23 Sep 2004 06:30:00 -0000 [thread overview]
Message-ID: <41526D73.nailWK21NVX4@mindspring.com> (raw)
In-Reply-To: <20040923050534.GA11936@trixie.casa.cgf.cx>
Christopher Faylor <me@cgf.cx> wrote:
> MichaelC has indicated which systems support "rb". Is there any way to
> somehow figure out if this is supported for the whole list of supported
> targets?
That brings up a tough philosophical issue. Well, okay, part of it
is tough because it implies more work for me.
There isn't a list of supported hosts or supported targets.
The software itself has "list of hosts and targets that somebody, at
some time in the past, contributed at least some work towards."
The gdb-testers@ group records "somebody tested something and reported
results in some way". That's where the "more work for me" comes in:
devising some standard meta-information for a test run (like a little
XML file, that's what I use in my test bed), and then augmenting the
test suite to generate gdb-test-run.xml on every run, and then having
people mail that in, and then begging more people to report their
results, and then writing "Terf II" to keep track of it all.
The release criteria for gdb is "break main ; run works on unspecified
platforms".
> Or can we try going without the wrapper function and move
> to a wrapper function when someone complains?
For the second question, from a support point of view, I want something
that (a) works on a lot of systems and (b) when it doesn't work on some
system, it's an obvious 1-line patch to work around the problem. So I
don't like "no wrapper function but then change the code when someone
shows up with a weird system".
To avoid the wrapper function, perhaps probe for the modes at
run time:
static const char * read_mode = NULL;
void set_read_mode ()
{
FILE * fp = NULL;
if (read_mode == NULL)
{
if ((fp = fopen ("/dev/null", "rb")) != NULL)
read_mode = "rb";
else if ((fp = fopen ("/dev/null", "r")) != NULL)
read_mode = "r";
else
some sort of error;
}
if (fp != NULL)
{
if (fclose(fp) != 0 )
error;
}
}
Personally I like wrappers for ease of porting. It doesn't bug me to
see gdb_fopen + fopen on the call stack.
I don't think that "rb" versus "r" can be autoconf'ed. The gdb
configure script would need to execute a host program to figure out
whether "rb" is supported or not, and that won't work if build != host.
Or maybe I'm wrong about that and there's some way to do it.
Michael
next prev parent reply other threads:[~2004-09-23 6:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-18 13:21 Eli Zaretskii
2004-09-19 11:44 ` Mark Kettenis
2004-09-20 3:33 ` Eli Zaretskii
2004-09-22 20:21 ` Michael Chastain
2004-09-23 4:51 ` Eli Zaretskii
2004-09-23 6:02 ` Michael Chastain
2004-09-23 8:14 ` Corinna Vinschen
2004-09-23 5:03 ` Christopher Faylor
2004-09-23 6:30 ` Michael Chastain [this message]
2004-09-23 8:02 ` Corinna Vinschen
2004-09-24 10:51 ` Eli Zaretskii
2004-09-24 14:35 ` Andrew Cagney
2004-09-23 13:56 ` Christopher Faylor
2004-09-23 17:20 ` Michael Chastain
2004-09-23 17:24 ` Christopher Faylor
2004-09-23 15:18 ` Joel Brobecker
2004-09-23 17:57 ` Daniel Jacobowitz
2004-09-24 15:05 ` Andrew Cagney
2004-09-25 16:43 ` Eli Zaretskii
2004-09-26 18:38 ` Mark Kettenis
2004-09-27 2:29 ` Daniel Jacobowitz
2004-09-23 20:58 ` Mark Kettenis
2004-09-23 21:14 ` Christopher Faylor
2004-09-24 10:48 ` Eli Zaretskii
2004-09-24 12:23 ` Corinna Vinschen
2004-09-24 13:39 ` Andreas Schwab
2004-09-24 19:51 ` Christopher Faylor
2004-09-24 21:16 ` Christopher Faylor
2004-09-24 21:32 ` Andreas Schwab
2004-09-24 13:40 ` Eli Zaretskii
2004-09-24 16:49 ` Ian Lance Taylor
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=41526D73.nailWK21NVX4@mindspring.com \
--to=mec.gnu@mindspring.com \
--cc=gdb-patches@sources.redhat.com \
--cc=me@cgf.cx \
/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