Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: Robert Baruch <autophile@starband.net>, gdb@sources.redhat.com
Cc: Eli Zaretskii <eliz@is.elta.co.il>, Christopher Faylor <cgf@redhat.com>
Subject: Re: [Q] Accessing fs:0 on x86 Linux?
Date: Fri, 14 Dec 2001 00:38:00 -0000	[thread overview]
Message-ID: <4.2.0.58.20011214092106.00aca8d8@ics.u-strasbg.fr> (raw)
In-Reply-To: <3C194D28.1020105@starband.net>

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


  reply	other threads:[~2001-12-14  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13 16:55 Robert Baruch
2001-12-14  0:38 ` Pierre Muller [this message]
2001-12-14  7:53   ` Robert Baruch
2001-12-15  9:33   ` Eli Zaretskii
2001-12-15 10:04     ` Andrew Cagney
2001-12-16  0:15       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.2.0.58.20011214092106.00aca8d8@ics.u-strasbg.fr \
    --to=muller@cerbere.u-strasbg.fr \
    --cc=autophile@starband.net \
    --cc=cgf@redhat.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox