This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Symbol Lookup w/Avtrex gcdump Tool


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]