From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Phil Muldoon <pmuldoon@redhat.com>, Tom Tromey <tromey@redhat.com>
Subject: Re: [patch] Implement post_event for Python scripts.
Date: Wed, 18 Aug 2010 13:46:00 -0000 [thread overview]
Message-ID: <201008181445.52900.pedro@codesourcery.com> (raw)
In-Reply-To: <4C45F0B0.5000903@redhat.com>
On Tuesday 20 July 2010 19:53:36, Phil Muldoon wrote:
> 2010-08-11 Tom Tromey <tromey@redhat.com>
> Phil Muldoon <pmuldoon@redhat.com>
>
> * python/python.c (gdbpy_run_events): New function.
> (gdbpy_post_event): Likewise.
> (gdbpy_initialize_events): Likewise.
> (_initialize_python): Call gdbpy_initialize_events.
It was brought to my attention that this unfortunatly breaks
Windows builds:
cc1: warnings being treated as errors
/scratch/sandra/trunk45/obj/gdb-src-2010.09-999999-arm-none-eabi-i686-mingw32/gdb/python/python.c:
In function 'gdbpy_initialize_events':
/scratch/sandra/trunk45/obj/gdb-src-2010.09-999999-arm-none-eabi-i686-mingw32/gdb/python/python.c:675:
error: implicit declaration of function 'pipe'
This is:
> if (!pipe (gdbpy_event_fds))
> {
> gdbpy_event_list_end = &gdbpy_event_list;
> add_file_handler (gdbpy_event_fds[0], gdbpy_run_events, NULL);
> }
`pipe' doesn't exist on Windows. There's a _pipe function, but it has a
different interface (takes two remote arguments). See
<http://sourceware.org/ml/gdb-patches/2008-10/msg00418.html>
and look for "gdb_pipe".
The expedient way to fix this I guess would be to resurrect gdb_pipe
from that patch, so that we have a consistent way across hosts
to create a pipe.
I do agree that using pipes on common code to wake up the event loop
is tackling at the wrong level (we should have an abstracted way to
do this, using pipes on posix hosts, events on Windows, etc.), but,
I'm happy with a simpler way for now.
I'm also not sure whether ...
> /* We use a file handler, and not an async handler, so that we can
> wake up the main thread even when it is blocked in poll(). */
> static int gdbpy_event_fds[2];
... mingw-htep.c:gdb_select will be smart enough to apply the
proper select for that file descriptor, or if we need to bring
the whole patch in.
What do you think about this?
--
Pedro Alves
next prev parent reply other threads:[~2010-08-18 13:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 18:53 Phil Muldoon
2010-07-20 19:08 ` Tom Tromey
2010-07-27 16:30 ` Joel Brobecker
2010-07-28 14:18 ` Phil Muldoon
2010-07-28 17:31 ` Joel Brobecker
2010-07-30 21:43 ` Tom Tromey
2010-08-03 14:26 ` Phil Muldoon
2010-08-03 17:00 ` Eli Zaretskii
2010-08-11 18:35 ` Tom Tromey
2010-08-11 19:05 ` Joel Brobecker
2010-08-11 21:08 ` Phil Muldoon
2010-07-28 17:49 ` Eli Zaretskii
2010-08-18 13:46 ` Pedro Alves [this message]
2010-08-18 14:36 ` Daniel Jacobowitz
2010-08-18 17:39 ` Pedro Alves
2010-08-18 18:13 ` Tom Tromey
2010-08-20 0:35 ` 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=201008181445.52900.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.com \
--cc=tromey@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