From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32372 invoked by alias); 29 Dec 2007 14:26:43 -0000 Received: (qmail 32364 invoked by uid 22791); 29 Dec 2007 14:26:43 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 29 Dec 2007 14:26:36 +0000 Received: by nf-out-0910.google.com with SMTP id b11so338728nfh.48 for ; Sat, 29 Dec 2007 06:26:33 -0800 (PST) Received: by 10.78.167.12 with SMTP id p12mr12829303hue.20.1198938392655; Sat, 29 Dec 2007 06:26:32 -0800 (PST) Received: from ?78.130.87.130? ( [78.130.87.130]) by mx.google.com with ESMTPS id c4sm2804753nfi.22.2007.12.29.06.26.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Dec 2007 06:26:32 -0800 (PST) Message-ID: <47765912.5060600@portugalmail.pt> Date: Sat, 29 Dec 2007 14:33:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org, bodzio131@op.pl Subject: Re: PR/2386 [2/2]: MinGW attach to process without an exec file References: <47744F9C.8040604@portugalmail.pt> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00456.txt.bz2 Eli Zaretskii wrote: > > Sorry, I don't understand: NT functionality is not relevant to Windows > 9x, is it? So could you please say in more detail what undocumented > APIs you had in mind, and why are they necessary on modern Windows > systems? > >> I'd be very happy if someone could >> point me at better ways to get at executable from a PID on >> Windows, or at a filename from a file handle. > > Better ways than what? Perhaps I misunderstood the patch, but it > looks like you are using Process32First on Windows 9x, which is a > perfectly good way. What am I missing? > I wasn't talking about 9x, there we always have ToolHelp32 available. I meant better ways to get at the full path to the image from a pid *on NT* without using NtQueryObject (ObjectNameInfo), which I don't think we can rely on to always work, or relying on having psapi.dll available. -- Pedro Alves