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: Demangling of method names and addr2line/c++filt


Ranjit Mathew writes:
 > 
 > The problem is that we need to strip out (or not) an underscore
 > *depending on the actual source* of the mangled symbol:
 > 
 >   1. dladdr - gets from the exported labels, stripping allowed.
 >   2. addr2name.awk - uses nm, therefore, same as that for dladdr.

I don't know that anyone really uses this.  I don't want to delete it
though, because it is potentiallu useful.

 >   3. addr2line - uses debug info, therefore stripping not allowed
 >      (if target prefixes underscore to method name labels).
 > 
 > Note that for dladdr and addr2name.awk it is "stripping allowed" and
 > not "strip", as what is done by default by c++filt is target-dependent
 > and likely to be the correct behaviour.
 > 
 > The final logic then simply looks like:
 > 
 >   if ( usingAddr2Line && (USER_LABEL_PREFIX[0]=='_'))
 >     /* Explicitly pass "-n" to c++filt */
 > 
 > IMHO, this looks like the safest approach.
 > 
 > If this is OK, I can work towards a patch for this.

Excellent.

Andrew.


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