From: Nate Eldredge 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 Content-Type: text/plain; charset=us-ascii 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" writes: > > From: "Mark Stephen Krueger" > > 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 void *dummy = &_farpeekb; somewhere in your program to achieve this. -- Nate Eldredge neldredge AT hmc DOT edu