File tree Expand file tree Collapse file tree 2 files changed +2
-32
lines changed
substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/pecoff/cv Expand file tree Collapse file tree 2 files changed +2
-32
lines changed Original file line number Diff line number Diff line change 3030import com .oracle .objectfile .debugentry .MethodEntry ;
3131import com .oracle .objectfile .debugentry .TypeEntry ;
3232
33- import java .util .Arrays ;
34- import java .util .stream .Collectors ;
35-
3633final class CVNames {
3734
3835 static String typeNameToCodeViewName (String typeName ) {
@@ -47,25 +44,7 @@ static String staticFieldNameToCodeViewName(FieldEntry fieldEntry) {
4744 return typeNameToCodeViewName (fieldEntry .ownerType ()) + "_" + fieldEntry .fieldName ();
4845 }
4946
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-
5847 static String functionNameToCodeViewName (MethodEntry methodEntry ) {
5948 return typeNameToCodeViewName (methodEntry .ownerType ()) + "::" + methodEntry .methodName ();
6049 }
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- }
7150}
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 ;
@@ -165,16 +164,8 @@ private void buildFunction(PrimaryEntry primaryEntry) {
165164 * @param range Range contained in the method of interest
166165 * @return user debugger friendly method name
167166 */
168- 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 ;
167+ private static String getDebuggerName (Range range ) {
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