File tree Expand file tree Collapse file tree 2 files changed +1
-28
lines changed
substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/pecoff/cv Expand file tree Collapse file tree 2 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -47,25 +47,7 @@ static String staticFieldNameToCodeViewName(FieldEntry fieldEntry) {
4747 return typeNameToCodeViewName (fieldEntry .ownerType ()) + "_" + fieldEntry .fieldName ();
4848 }
4949
50- static String staticFunctionNameToCodeViewName (MethodEntry methodEntry ) {
51- return typeNameToCodeViewName (methodEntry .ownerType ()) + "::" + methodEntry .methodName ();
52- }
53-
54- static String staticFunctionNameAndArgsToCodeViewName (MethodEntry methodEntry ) {
55- return functionNameAndArgsToCodeViewName (methodEntry );
56- }
57-
5850 static String functionNameToCodeViewName (MethodEntry methodEntry ) {
5951 return typeNameToCodeViewName (methodEntry .ownerType ()) + "::" + methodEntry .methodName ();
6052 }
61-
62- static String functionNameAndArgsToCodeViewName (MethodEntry methodEntry ) {
63- final String paramString ;
64- if (methodEntry .getParamCount () > 0 ) {
65- paramString = "_" + Arrays .stream (methodEntry .getParamTypes ()).map (CVNames ::typeNameToCodeViewName ).collect (Collectors .joining ("_" ));
66- } else {
67- paramString = "" ;
68- }
69- return functionNameToCodeViewName (methodEntry ) + paramString ;
70- }
7153}
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ final class CVSymbolSubsectionBuilder {
4545
4646 private final String heapName ;
4747 private final short heapRegister ;
48- private boolean noMainFound = true ;
4948
5049 CVSymbolSubsectionBuilder (CVDebugInfo cvDebugInfo ) {
5150 this .cvDebugInfo = cvDebugInfo ;
@@ -166,15 +165,7 @@ private void buildFunction(PrimaryEntry primaryEntry) {
166165 * @return user debugger friendly method name
167166 */
168167 private String getDebuggerName (Range range ) {
169- final String methodName ;
170- if (noMainFound && Modifier .isStatic (range .getMethodEntry ().getModifiers ()) && range .getMethodName ().equals ("main" )) {
171- noMainFound = false ;
172- methodName = CVNames .staticFunctionNameToCodeViewName (range .getMethodEntry ());
173- } else {
174- /* Use a more user-friendly name instead of a hash function. */
175- methodName = CVNames .staticFunctionNameAndArgsToCodeViewName (range .getMethodEntry ());
176- }
177- return methodName ;
168+ return CVNames .functionNameToCodeViewName (range .getMethodEntry ());
178169 }
179170
180171 private void addLineNumberRecords (PrimaryEntry primaryEntry ) {
You can’t perform that action at this time.
0 commit comments