From: "Stuart Brooks" <stuartb@cat.co.za>
To: "Stuart Brooks" <stuartb@cat.co.za>,
"Nathan J. Williams" <nathanw@wasabisystems.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: gdb 5.3nb1 crashing when accessing elements in static libs
Date: Tue, 05 Apr 2005 07:51:00 -0000 [thread overview]
Message-ID: <108401c539b4$2430c680$5e22a8c0@STU95> (raw)
In-Reply-To: <0fb501c539a1$e53857c0$5e22a8c0@STU95>
> > I'm assuming this is i386? You're going to be in some pain with C++
on
> > this combination; netbsd/i386 2.0 sets gcc to use the stabs
debugging
> > format by default instead of dwarf-2, because of a bug in 3.3's
dwarf
> > generation (netbsd PR #25094; equivalent to GCC bug #16788) [I'm not
> > at all sure that this is the right tradeoff for that bug].
>
> Yes, this is i386 :( What would you recommend I do? I suppose I could
> install a later version of gcc (seems 3.4.0 has this fixed) but I
would
> imagine that that will need a full system rebuild depending on the
> compatibility between 3.3.3 and 3.4.0. Or is there some easier
solution,
> maybe setting g++ to use dwarf-2 and accepting that the offset for
long
> long structs will be incorrect (is this a train smash?)?
Compiling everything with -gdwarf-2 gives me the ability to access
symbols in classes compiled in static libraries which is great (I
couldn't do this before). An interesting thing though is that all global
variables seem to be viewed/treated as ints.
eg.
// global variables
MyClass* g_myclass_p; // initialized later
MyClass g_myclass;
int* g_int_p=(int*)2000;
int g_int=1234;
will give (in gdb printouts):
g_myclass_p = 13423223
g_myclass = 0
g_int_p = 2000
g_int = 1234
Again, this is a new one for me. Does anyone know if this is somehow
related? Thanks for the help so far, I really appreciate it!
- Stuart
prev parent reply other threads:[~2005-04-05 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-04 9:54 Stuart Brooks
2005-04-04 13:39 ` Daniel Jacobowitz
2005-04-04 17:09 ` Nathan J. Williams
2005-04-05 5:40 ` Stuart Brooks
2005-04-05 7:51 ` Stuart Brooks [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='108401c539b4$2430c680$5e22a8c0@STU95' \
--to=stuartb@cat.co.za \
--cc=gdb@sources.redhat.com \
--cc=nathanw@wasabisystems.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