From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27614 invoked by alias); 14 Dec 2001 08:38:06 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26995 invoked from network); 14 Dec 2001 08:36:47 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by sources.redhat.com with SMTP; 14 Dec 2001 08:36:47 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id JAA23765; Fri, 14 Dec 2001 09:36:32 +0100 Message-Id: <4.2.0.58.20011214092106.00aca8d8@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Fri, 14 Dec 2001 00:38:00 -0000 To: Robert Baruch , gdb@sources.redhat.com From: Pierre Muller Subject: Re: [Q] Accessing fs:0 on x86 Linux? Cc: Eli Zaretskii , Christopher Faylor In-Reply-To: <3C194D28.1020105@starband.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2001-12/txt/msg00129.txt.bz2 At 01:51 14/12/2001 , Robert Baruch a écrit: >Hi all, > >I'm trying to debug something in wine on an x86 Linux box. It requires looking at what is stored in memory starting at fs:0. I've searched all over for how to do this, but I've only seen one thread that seems to indicate that it can't be done. Its not possible with the current GDB. >Can anyone confirm or deny this? But I once announced that I had a tool that is able to do this on the go32v2 target. See http://sources.redhat.com/ml/gdb/2000-q1/msg00515.html and related thread. This was never really considered for insertion into GDB CVS... Eli, there was no followup to your answer http://sources.redhat.com/ml/gdb/2000-q1/msg00535.html ???? On that target, its rather easy, as the debugger and debuggee share the same local descriptors. It should also be possible to do this on cygwin target. We would need to use GetThreadSelectorEntry win32 API function to get the linear base address of the %fs selector. This function is not called in current xwin32-nat.c code and this only works because win32 kernel does give a zero linear base address to the ordinary code and data selector (value of %cs for code , %ds, %es and %ss for data selector). Regarding wine on linux, this really depends on how wine does set the %fs selector base and size, I have no idea how this is done... Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99