DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50JK99ZW1867162 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 50JK99ZW1867162 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=gNqc6DZL X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D8B83858420 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1737317348; bh=7GwcsaSHGZKyyo6Q15elwXvQaSDow/v6FMqRxiLef34=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gNqc6DZLpW5Jro66/N7bOuilx+l2hNfado0lEbS/3Ujde57IHUve91e9dUaAcNtlW hGa/HRoXfHIJ20WAEy5knrw2iGhrPc+ZvraEgBnQLVFfX7m6LnjxtrxBpVpnr4emle Y3Mx3CBpa5+He8LzBF/dTYs30w2fsVaZD7SZcYKg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1FAC3858402 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A1FAC3858402 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737317284; cv=none; b=CkAkjWZaXVbyf9+QdqX+oJV7Nfx3Ex+qB9E9ePD8QkKbzL5TYfR4pFKZvWxJRkOfMhMBy40p2SPuWEjKg6qXBu7MLuFteKRhzkMoJKAOAJFkNqumHerQ0kaqwgD9FMOe0V/5C155+H7eJLJvWleYxNR0VSL4Pq5pjPNNhd3ri1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737317284; c=relaxed/simple; bh=uA+vcJn1YMrnS8FN99OA+UxUxmrkGsfFC7jOiGAM0jQ=; h=MIME-Version:Date:From:To:Subject:Message-ID; b=bViDoyP9dpQoGcciAudZRmHRIPmJS4mPbzdQhTdXrCeUAfk4040vDUnF9rhLgsSx/zIlfULqsmlckx8Hs1BYdFsh2PvuSf05mQWK/5yvHc2t8ckKBQGYLozn4J4val9dOepl6ICZ1XMD1cKueMt9YXuZsxtoQc5/RQPh5d3GNvc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1FAC3858402 MIME-Version: 1.0 Date: Sun, 19 Jan 2025 12:07:17 -0800 To: Cygwin Subject: Bug? GetCommandLineW() missing arguments in 64 bit Cygwin. User-Agent: Roundcube Webmail/1.4.15 Message-ID: <47aec32d20aa430fee8631836ca0530a@kylheku.com> X-Sender: kaz AT kylheku DOT com X-MagicMail-OS: Unknown X-MagicMail-UUID: 16dd1fec-d6a1-11ef-b435-005056953255 X-MagicMail-Authenticated: fuck DOT telus AT novus DOT ca X-MagicMail-SourceIP: 104.37.63.7 X-MagicMail-RegexMatch: 1 X-MagicMail-EnvelopeFrom: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Kaz Kylheku via Cygwin Reply-To: Kaz Kylheku Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi All, In a (admittedly not current) version of 64 bit Cygwin, I'm observing a funny behavior: The GetCommandLineW function returns a command line which consists of the executable name only; the arguments are missing. This issue goes away when the program is run under GDB; the arguments prepared by GDB do then appear in the command line. The issue is not seen under 32 bits. The repro program uses WinMain; I've not compared whether using main makes a difference: #include #include #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { int argc, i; LPWSTR cmdline = GetCommandLineW(); wprintf(L"cmdline = %ls\n", cmdline); return 0; } -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple