From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2312 invoked by alias); 6 Nov 2008 04:27:16 -0000 Received: (qmail 2244 invoked by uid 22791); 6 Nov 2008 04:27:16 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout6.012.net.il (HELO mtaout6.012.net.il) (84.95.2.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Nov 2008 04:26:33 +0000 Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0K9W00H009BAX300@i-mtaout6.012.net.il> for gdb-patches@sourceware.org; Thu, 06 Nov 2008 06:27:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.241.172]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K9W00I5O9PEM770@i-mtaout6.012.net.il>; Thu, 06 Nov 2008 06:27:14 +0200 (IST) Date: Thu, 06 Nov 2008 04:27:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 1/4] 'catch syscall' feature -- =?utf-8?q?=09Architecture-independent=09part?= In-reply-to: <200811052109.29724.pedro@codesourcery.com> X-012-Sender: halo1@inter.net.il To: Pedro Alves Cc: gdb-patches@sourceware.org, bauerman@br.ibm.com, sergiodj@linux.vnet.ibm.com Reply-to: Eli Zaretskii Message-id: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <1225773079.24532.52.camel@miki> <200811051933.28792.pedro@codesourcery.com> <200811052109.29724.pedro@codesourcery.com> 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: 2008-11/txt/msg00095.txt.bz2 > From: Pedro Alves > Date: Wed, 5 Nov 2008 21:09:29 +0000 > Cc: bauerman@br.ibm.com, > sergiodj@linux.vnet.ibm.com > > On Wednesday 05 November 2008 20:34:24, Eli Zaretskii wrote: > > I don't think `ReadFile', the Windows equivalent of `read', calls Int > > 2Eh to read a file.  If you know differently, please tell the details. > > I don't understand what we're arguing about. You said (or so I thought) that instead of watching the call to ReadFile, one can watch some equivalent call to Int 2Eh which ReadFile issues eventually, just like `read' does on Unix: > Eventually the libc 'read' function calls the real 'read' syscall, > just like on Windows. I'm saying that I don't think such a function of Int 2Eh exists, because I think only lower-level sector-oriented disk read commands are implemented as software interrupts, and all the higher level processing needed for reading the file are not in kernel space. > In NT the Win32 API functions are regular functions that are > implemented on top of OS services. The kernel knows nothing about the > win32 API. E.g., the ReadFile function is a wrapper around > the user land NtReadFile, which itself is what does the syscall. But NtReadFile is also a function, not an Int 2Eh syscall, right?