From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by sourceware.org (Postfix) with ESMTPS id E71C03858422 for ; Wed, 3 Aug 2022 13:08:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E71C03858422 Received: by mail-io1-xd2e.google.com with SMTP id i84so240578ioa.6 for ; Wed, 03 Aug 2022 06:08:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc; bh=Kam2xeKTrUSqm/ZdvhMT3dmhEUJerURBREqbE5PuvaY=; b=3i7y+YnMgGVzBC8xWkfevp+vAUU1SG/u1Z4iF2OTruyxqEOUFVUy705TpY5a8LSr3I D6nRPMWsMQnaNp+YruCVql6/SQFyTQafP7llLSDQHd6hya1rrjagD3PG9Kx/fQK+mwj6 ne4vGbq+l/r/IBpoNcz0oiQjq2YNFNNqwIUGS88e1FN9pwu8cR1KxxElXidHgp5MbnCX QUJi43SkMq/H5I4yffi7JVNvq3kQGAhSbRdKWKVCRdVH/AmpU5ltU0lPSlWFNsIvgmY9 KG8Y/Yvcie55Flc9JmU/+TX37u0in5qQ7LXCFXoHtx+Q05FahiLOjmxFqvAgAIXo/iJT 6Qww== X-Gm-Message-State: AJIora/ZXK6XjbOeIDRU43q+EpBsNwDFpnBHkOFobeJhicY3OhhZIKJv AHJ9jKbCqp7q9xRP9EPGQG2MAmVJWgL8Yw== X-Google-Smtp-Source: AGRyM1usIkZrDVmUQG6s2lQ6yxL4gqEMd0cKI6Zmf83UDa7jilXxyI0OWAm/s3wCu1gLVBva3yNjwQ== X-Received: by 2002:a05:6638:d54:b0:33f:8e41:a3b3 with SMTP id d20-20020a0566380d5400b0033f8e41a3b3mr10571092jak.251.1659532106941; Wed, 03 Aug 2022 06:08:26 -0700 (PDT) Received: from murgatroyd.Home (71-211-185-228.hlrn.qwest.net. [71.211.185.228]) by smtp.gmail.com with ESMTPSA id h14-20020a02b60e000000b0033ebbb649fasm7631057jam.101.2022.08.03.06.08.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 06:08:26 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 0/2] Implement target async for Windows Date: Wed, 3 Aug 2022 07:08:20 -0600 Message-Id: <20220803130822.735057-1-tromey@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2022 13:08:30 -0000 I wanted target async to work on Windows for another project. This short series is the result. This series is based on my earlier patch to make strwinerror available to all the Windows native code. That patch was useful while debugging these. The basic problem on Windows is that WaitForDebugEvent can't be mixed with WaitForMulpleObjects -- there's no way to get some kind of "debug handle" to wait on. To handle this, WaitForDebugEvent is now called in a worker thread. However, to do that, certain other Windows calls must be done in that same thread, as various debugging APIs can only be used from the thread that started the inferior. (Not all of these are documented, either.) I've tested this using the internal AdaCore test suite. Tom