From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: GDB and FSDB - getting x86 specific info (page tables, ldt, gdt) Date: 01 Jun 2001 12:20:47 -0700 Organization: MindSpring Enterprises Lines: 51 Sender: nate AT mercury DOT bitbucket Message-ID: <83y9rcc8hc.fsf@mercury.bitbucket> References: <000b01c0ea24$55501dd0$e70610ac AT speakeasy DOT net> <2593-Fri01Jun2001085054+0300-eliz AT is DOT elta DOT co DOT il> <831yp4wusv DOT fsf AT mercury DOT bitbucket> <3405-Fri01Jun2001112310+0300-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: a5.f7.cd.67 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Server-Date: 1 Jun 2001 19:21:32 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: Nate Eldredge > > Newsgroups: comp.os.msdos.djgpp > > Date: 31 May 2001 23:58:24 -0700 > > > > > > 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. > > Not without some tricky use of GDB advanced features, such as > ``artifical arrays''. Huh? A command like x/32x 0xaddress doesn't seem especially tricky or advanced to me. Well, maybe it will help the poster anyway. ... > > 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 > > I don't think this will work: _far* functions expand into inline > assembly, so GDB will think they don't exist in the executable. But out-of-line versions exist in the library, and the code snippet I posted should force them to be compiled in. > Anyway, whether or not this is appropriate for accessing memory > through other selectors depends on the intended usage. Without the > details from the OP, I cannot tell. True. It was just a thought. -- Nate Eldredge neldredge AT hmc DOT edu