Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Getting gdb to find definitions
@ 2004-06-29 17:39 Paul Koning
  2004-06-30 16:39 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Koning @ 2004-06-29 17:39 UTC (permalink / raw)
  To: gdb

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.

Is there a fix for this?  Alternatively, is there a way to at least
change the default symbol loading rule?

       paul


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-06-30 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-29 17:39 Getting gdb to find definitions Paul Koning
2004-06-30 16:39 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox