This is the mail archive of the
mailing list for the GDB project.
Re: gdb questions
- To: andrew at zimmerman dot net
- Subject: Re: gdb questions
- From: "Eli Zaretskii" <eliz at is dot elta dot co dot il>
- Date: Wed, 18 Jul 2001 23:16:13 +0300
- CC: gdb at sources dot redhat dot com
- References: <003301c10fbb$078bfbc0$b42cc2d1@server>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> From: "Andrew Zimmerman" <firstname.lastname@example.org>
> Date: Wed, 18 Jul 2001 13:54:07 -0500
> 1. If gdb is used with assembly language what kind of debugging symbols are
> required? I'd like to use NASM, but it doesn't seem to be able to add
If you use Gas, the GNU assembler, you can invoke it with -gstabs+ or
-gdwarf-2 switches, and get stabs or DWARF2 debug info.
> 2. Does gdb have a way to examine the LDT (local descriptor table)? My
> application creates some additional selectors for segments that reside
> within the flat memory space allocated to the application.
Do you intend to port that code to Linux? I don't know much about the
protection scheme employed by Linux, but from what I know, I'd doubt
very much that it will allow you to futz with the LDT.
> With the Phar Lap
> Dos Extender we could easily display a list of the segments. And yes, we
> were in 32-bit protected mode, way back in 1989.
That's funny: I've just committed a few days ago a bunch of changes to
the DJGPP port of GDB which introduce commands to display LDT, GDT,
and other system-related info. You can now say "info dos ldt $cs" and
see the LDT entry for the debuggee's CS selector, including base
address, limit, and the access right bits.
But these command only work in GDB when it is compiled for native
debugging of DJGPP programs. DJGPP programs are 32-bit protected-mode
programs which can run on DOS and all versions of Windows as DPMI