www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/01/03:00:08

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GDB and FSDB - getting x86 specific info (page tables, ldt, gdt)
Date: 31 May 2001 23:58:24 -0700
Organization: MindSpring Enterprises
Lines: 53
Sender: nate AT mercury DOT bitbucket
Message-ID: <831yp4wusv.fsf@mercury.bitbucket>
References: <000b01c0ea24$55501dd0$e70610ac AT speakeasy DOT net> <2593-Fri01Jun2001085054+0300-eliz AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: a5.f7.db.0b
Mime-Version: 1.0
X-Server-Date: 1 Jun 2001 06:58:26 GMT
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> writes:

> > From: "Mark Stephen Krueger" <mkrueger AT nvidia DOT com>
> > Date: Thu, 31 May 2001 17:52:12 -0500
> > 
> > What is the easiest way in either gdb or fsdb to be able to view the page
> > tables?
> 
> AFAIK, you can't: accessing page tables needs to run at ring 0,
> because the instructions to do that are privileged.
> 
> > Also, can gdb display info about the LDT and GDT?
> 
> What info about these tables do you want to display?
> 
> > Can either of these debuggers dump memory using a specific selector?
> 
> Please define ``dump memory''.  GDB generally displays memory
> addresses as variables; if you mean ``dump memory'' the DEBUG.COM
> style, then it cannot do that, even for memory that is part of the
> normal DS selector addressable range.  

What about the `x' command?  That certainly can dump memory in a
format rather like debug's.

> FSDB does have a memory pane,
> though.

> As for other selectors, I don't think you can do that currently.  If
> you have specific needs, there might be a way to do something, so
> please consider telling what memory do you need to dump and why.

I suspect you can sort of cheat to dump memory in other selectors.  I
haven't tried this, but here's an idea:

set $p = start_address
while ($p < end_address)
        print/x _farpeekb(selector, $p++)
end

You might have to have _farpeekb compiled into your program for this
to work; you could insert

#include <sys/farptr.h>
void *dummy = &_farpeekb;

somewhere in your program to achieve this.


-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


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