[Q] Accessing fs:0 on x86 Linux?

Eli Zaretskii eliz@is.elta.co.il
Sat Dec 15 09:33:00 GMT 2001


> Date: Fri, 14 Dec 2001 09:36:27 +0100
> From: Pierre Muller <muller@cerbere.u-strasbg.fr>
> 
>   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
> ????

I looked into this issue when GDB 5.1 was in the last stages of
development, but eventually decided that GDB lacked some
infrastructure to add such a functionality.  You could find the
traces of that in a thread "Re: 8 bit read"; start reading here:

 http://sources.redhat.com/ml/gdb/2001-07/msg00338.html

The problem with your patches was that they only worked for a single
command, an analog of the `x' command.  What I'm looking for is a
general feature which would allow memory references using a
selector:offset pair to be used in _any_ expression you submit to GDB.
GDB cannot do that currently, and I don't think it would be right for
me to hack every GDB command out there with "#ifdef __DJGPP__" type of
code.

So I have no alternative but to reject your patches.  Sorry.

A work-around would be to write a simple function that would do the
fetching of data via a selector other than DS, and then call that
function from GDB.  Depending on your needs, you could get away with
the _farpeek* family that is already available in the DJGPP library.



More information about the Gdb mailing list