From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Cc: ktietz70@googlemail.com
Subject: Re: [patch]: Fix build for GO32 and WIN32 targets
Date: Fri, 22 Jan 2010 14:08:00 -0000 [thread overview]
Message-ID: <201001221408.41191.pedro@codesourcery.com> (raw)
In-Reply-To: <83sk9y7fux.fsf@gnu.org>
On Friday 22 January 2010 07:34:14, Eli Zaretskii wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Thu, 21 Jan 2010 22:18:44 +0000
> > Cc: gdb-patches@sourceware.org, ktietz70@googlemail.com
> >
> > I've answered your question of why don't other targets hit the same
> > problem. If there's something to should be done to implement some
> > missing bits for djgpp or mingw, that's a completely separate
> > change.
>
> I never said that I objected to this change (I don't), I just wanted
> to understand it, regardless.
>
Before Kai's patch, the code looked like
static
check_syscall ()
{
...
}
new_tty ()
{
#if !defined(__GO32__) && !defined(_WIN32)
check_syscall ();
#endif
}
So, check_syscall was never called in a djgpp or win32 build of
gdb. This was fine up recently, when we introduced
the -Wunused-function warning, because it now warns on
djgpp and win32 that check_syscall is never used. With -Werror, that
warning becomes an error, so the build is broken. The fix is obvious,
wrap check_syscall in `#if !defined(__GO32__) && !defined(_WIN32)' too.
That's precisely, and only, what Kai's patch did.
You seem to be asking why are all the calls to
check_syscall compiled out on djgpp and win32. If you actually
try looking at the code, and who is calling it, you'll see that
this is code that runs in the context of the inferior process,
not gdb, in the fork_inferior dance, when creating a new
inferior. These targets don't use fork_inferior to create a
process. The code is ifdefed out presumably because
it wouldn't compile on those systems.
--
Pedro Alves
next prev parent reply other threads:[~2010-01-22 14:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 14:12 Kai Tietz
2010-01-21 14:15 ` Pedro Alves
2010-01-21 14:26 ` Kai Tietz
2010-01-21 18:00 ` Eli Zaretskii
2010-01-21 21:24 ` Pedro Alves
2010-01-21 22:05 ` Eli Zaretskii
2010-01-21 22:18 ` Pedro Alves
2010-01-22 7:36 ` Eli Zaretskii
2010-01-22 14:08 ` Pedro Alves [this message]
2010-01-22 17:09 ` Eli Zaretskii
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=201001221408.41191.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=ktietz70@googlemail.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