This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Q] Accessing fs:0 on x86 Linux?



> 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


Can I suggest playing with the @<blah> prefix operator that Michael 
Snyder recently added.

It added a framework for specifying something like ``(int @code *)0''. 
This indicates a pointer in the code space.  The intent is for the 
mechanism to be extended to support more than just code and data spaces.

An initial pass at this would have:

	(@fs*)0

One possible follow-on would be to change $fs's type to ``(uint8 @fs 
*)'' so that ``x/b $fs + 5'' did the right thing.

I should note that the current implementation is restricted to just 
@code and @data so some ground work would be needed.

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]