This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Symbol reference strangeness
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Bruce Ashfield <Bruce dot Ashfield at seawaynetworks dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 6 Mar 2003 14:42:14 -0500
- Subject: Re: Symbol reference strangeness
- References: <20030306193545.GA12991@seawaynetworks.com>
On Thu, Mar 06, 2003 at 02:35:45PM -0500, Bruce Ashfield wrote:
> Hi all,
>
> I'm trying to determine what's happening with the symbols for
> a project I'm working one. I've completed a move from a gcc-3.0
> to a gcc-3.2 based toolchain and I've also upgraded to gdb-5.3.
> Ever since the switch over I've been seeing odd problems accessings
> variables and other symbols in the generated images.
>
> I've gone over the compile flags and gdb options without much
> success. I just finished trying the latest CVS snapshot of gdb
> without any more luck. I'm hoping someone can slap me and point
> me in the right direction.
>
> The most similar problems I've found to what I'm seeing on the
> mailing list archives are:
>
> http://sources.redhat.com/ml/gdb/2002-12/msg00111.html
> http://sources.redhat.com/ml/bug-gdb/2000-09/msg00012.html
>
> Which fairly closely describe what I've been seeing. So I'm
No, that's a completely different problem (and fixed now, though I
don't remember if the fix was in 5.3 or not).
> now making sure that everything is being compiled with -gdwarf-2,
> but that is only partially helping the problem, now I can see
> some variables but not others, where before loading the same
> symbol file multiple times would eventually get me at some
> variables.
>
> The following capture will best describe what I'm seeing.
>
> (gdb) p /x debugLevel
> $1 = 0xfffffff
> (gdb) p sealKernelMaxConsecutiveCt_g
> $3 = 3
> (gdb) p /x debugLevel
> Cannot access memory at address 0x40249fc0
>
> There are other ways of making this happen, but this is the
> most simple. Very strange and I'm running out of things to try,
> any suggestions would be greatly appreciated.
>
> Here are some point form technical details:
>
> compiler: 3.2.2 (powerpc cross compiler, host linux)
> gdb: 5.3 and latest March CVS snapshot
> compiling with: -gdwarf-2 in debug mode.
I'd need a testcase to be able to help much. Is that the right or
wrong address? What does p &debugLevel say? Where is it actually
located?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer