This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Symbol Lookup w/Avtrex gcdump Tool
- From: David Daney <ddaney at avtrex dot com>
- To: "Craig A. Vanderborgh" <craigv at voxware dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 16 Feb 2006 08:09:48 -0800
- Subject: Re: Symbol Lookup w/Avtrex gcdump Tool
- References: <43F4216E.4000006@voxware.com>
Craig A. Vanderborgh wrote:
Hello Everyone:
I am using David Daney's fabulous "Gcdump" tool once more, to try to
track down some memory management problems in our application.
However, I'm flummoxed by a problem that I have not ever been able to
solve. The "dump" part of the tool appears to be working correctly.
But the "analysis" portion seems to be able to find names for libgcj
symbols, but NO APPLICATION SYMBOL NAMES.
There is a bug in the analyser. It assumes that all objects are
relocated by their base address as shown from /proc/self/maps.
For shared libraries this is a valid assumption for the executable it is
not. The executable is already relocated.
One hacky work around is to find the dump file that contains the copy of
/proc/self/maps and add a line to the beginning of that section
something like this:
-------------------8<--------------------------
Analyze isn’t getting symbols for pvrapp (or other apps) because it is
incorrectly translating addresses from the “mipsel-linux-nm” output to
the actual address space used.
Pvrapp seems to actually get loaded at 0, but analyse tries to determine
the actual address space used by looking at “/proc/<pid>/maps” (shown
below) and picking the lowest address for a given module. The first
line below I added by editing 001-dump.txt by hand. Without it,
analyze thinks 400000 is the base.
So, the quick way to fix the problem is to find your executable and try
adding a base address of 0 similar to the line in yellow below. Of
course, substitute the actual executable name for pvrapp.
---------- Begin address map ----------
00000000-00000001 r-xp 00000000 03:01 82024 /avtrex/bin/pvrapp
00400000-00b96000 r-xp 00000000 03:01 82024 /avtrex/bin/pvrapp
00bd5000-00d94000 rw-p 00795000 03:01 82024 /avtrex/bin/pvrapp