From: Jamie Guinan <guinan@bluebutton.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: <andrew@zimmerman.net>, Gdb List <gdb@sources.redhat.com>
Subject: Re: gdb questions
Date: Wed, 18 Jul 2001 14:36:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0107181724470.23951-100000@gemini.home.net> (raw)
In-Reply-To: <7263-Wed18Jul2001231612+0300-eliz@is.elta.co.il>
On Wed, 18 Jul 2001, Eli Zaretskii wrote:
> > From: "Andrew Zimmerman" <andrew@zimmerman.net>
> > 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
> > symbols.
>
> If you use Gas, the GNU assembler, you can invoke it with -gstabs+ or
> -gdwarf-2 switches, and get stabs or DWARF2 debug info.
My Gas [1] only supports: -gstabs, -gdwarf, and -gdwarf2. gcc accepts
-gstabs+ and -gdwarf-2, but does not appear to pass them down to the
assembler (aside from using -Wa).
But -gstabs (and -gdwarf{,2}) do indeed work with assembly source,
$ as -gstabs foo.S -o foo.o
$ gcc foo.o -o foo
$ gdb foo
(gdb) list foo_func
...
-Jamie
[1] stock Red Hat 7.1, gas 2.10.91. I just note this because I don't know
if latest CVS Gas is any different.
> > 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
> clients.
>
--
================================================================
Jamie Guinan Blue Button Solutions, Inc.
guinan@bluebutton.com http://www.bluebutton.com/
================================================================
next prev parent reply other threads:[~2001-07-18 14:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-18 11:51 Andrew Zimmerman
2001-07-18 13:44 ` Eli Zaretskii
2001-07-18 14:03 ` Andrew Zimmerman
2001-07-18 23:27 ` Eli Zaretskii
2001-07-18 14:36 ` Jamie Guinan [this message]
2001-07-18 23:28 ` Eli Zaretskii
2001-10-01 4:20 Mickael Gicquaire
2001-10-01 7:20 ` Fernando Nasser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.33.0107181724470.23951-100000@gemini.home.net \
--to=guinan@bluebutton.com \
--cc=andrew@zimmerman.net \
--cc=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox