delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/27/11:58:34

Date: Mon, 27 Aug 2001 18:59:35 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>
cc: djgpp-workers AT delorie DOT com
Subject: Re: UMB access with %gs selector
In-Reply-To: <4.2.0.58.20010827140550.01b558e0@ics.u-strasbg.fr>
Message-ID: <Pine.SUN.3.91.1010827185156.22538I-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 27 Aug 2001, Pierre Muller wrote:

>    Using these new features of GDB on a win95
> with a CVS compiled GDB for djgpp target, I noticed that
> the selector for Dos memory
> (selector stored in $gs at startup)

How did you see that?  Was this with "info dos ldt $gs"?

> with base 0x00000000 and limit 0x0010ffff
> is declared as a 16 bit Data register!

_dos_ds is created by our startup code (see crt1.c:setup_core_selector), 
which leaves the details to the DPMI provider.  We don't set any of the 
descriptor's bits, only its limit.

>     Doesn't this mean that the higher part of a index is not used?
> (i.e. if  $esi contain 0x10008,
> will
>     movl  %gs:(%esi),%eax
> load into %eax
> the content of linear address 0x10008 or 0x00008 ??)
> 
> Can we really access to UMB area with a 16 bit selector ?

Aren't you forgetting the address wrap and the VCPI provider's 
memory-mapping magic?

In other words, the same question is valid for accessing the UMBs from a 
16-bit real-mode program, right?

Charles, could you please comment on this?

> By the way,
> thanks Eli for having added this to GDB !

You are welcome.

Note that, for some juicy parts of these new commands, you need to link 
GDB with the CVS version of `uname' function, since GDB relies on its 
extended CPU type report for printing more detailed information.  And for 
some _really_ juicy commands ("info dos address-pte" etc.), you need to 
run under CWSDPMI and nothing else.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019