From: Daniel Jacobowitz <drow@false.org>
To: Paul Koning <pkoning@equallogic.com>
Cc: gdb@sources.redhat.com
Subject: Re: Getting gdb to find definitions
Date: Wed, 30 Jun 2004 16:39:00 -0000 [thread overview]
Message-ID: <20040630163331.GA22175@nevyn.them.org> (raw)
In-Reply-To: <16609.36282.383014.108683@gargle.gargle.HOWL>
On Tue, Jun 29, 2004 at 11:41:46AM -0400, Paul Koning wrote:
> There's a problem I'm seeing increasingly often with GDB 6.1 --
> especially now that our compilers are switching to Dwarf-2 format. It
> seems that gdb doesn't load definitions of types until you reference
> some variable that causes it to load the symbols for a particular
> source file -- or something like that.
>
> For example, I might do this:
>
> (gdb) file netbsd.gdb
> Reading symbols from netbsd.gdb...done.
> (gdb) ptype struct user
> No struct type named user.
> (gdb) p curproc
> $1 = (struct proc *) 0x8282e9e0
> (gdb) ptype struct user
> type = struct user {
> struct pcb u_pcb;
> struct pstats u_stats;
> }
>
> This is causing a lot of confusion among users, and it breaks various
> scripts.
>
> I would argue that gdb should read the definitions of types when they
> are mentioned (as it does with the definitions of variables). Either
> that, or it shouldn't default to delayed loading, if it causes
> malfunctions like this.
GDB is supposed to do this. If you've found a case where it doesn't
work, please do provide a testcase.
> Is there a fix for this? Alternatively, is there a way to at least
> change the default symbol loading rule?
-readnow.
--
Daniel Jacobowitz
prev parent reply other threads:[~2004-06-30 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-29 17:39 Paul Koning
2004-06-30 16:39 ` Daniel Jacobowitz [this message]
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=20040630163331.GA22175@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=pkoning@equallogic.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