@@ -122,18 +122,18 @@ public boolean isLoadable() {
122
122
123
123
var imageClassLoader = accessImpl .getImageClassLoader ();
124
124
125
- var builderArguments = imageClassLoader .classLoaderSupport .getHostedOptionParser ().getArguments ();
126
- objectFile .newUserDefinedSection (".debug.svm.imagebuild.arguments" , makeSectionImpl .apply (builderArguments ));
127
-
128
125
var classPath = imageClassLoader .classpath ().stream ().map (Path ::toString ).collect (Collectors .toList ());
129
126
objectFile .newUserDefinedSection (".debug.svm.imagebuild.classpath" , makeSectionImpl .apply (classPath ));
130
127
var modulePath = imageClassLoader .modulepath ().stream ().map (Path ::toString ).collect (Collectors .toList ());
131
128
objectFile .newUserDefinedSection (".debug.svm.imagebuild.modulepath" , makeSectionImpl .apply (modulePath ));
132
-
133
- var sortedPropertiesList = ManagementFactory .getRuntimeMXBean ().getInputArguments ().stream ()
129
+ /* Get original arguments that got passed to the builder when it got started */
130
+ var builderArguments = imageClassLoader .classLoaderSupport .getHostedOptionParser ().getArguments ();
131
+ objectFile .newUserDefinedSection (".debug.svm.imagebuild.arguments" , makeSectionImpl .apply (builderArguments ));
132
+ /* System properties that got passed to the VM that runs the builder */
133
+ var builderProperties = ManagementFactory .getRuntimeMXBean ().getInputArguments ().stream ()
134
134
.filter (arg -> arg .startsWith ("-D" ))
135
135
.sorted ().collect (Collectors .toList ());
136
- objectFile .newUserDefinedSection (".debug.svm.imagebuild.java.properties" , makeSectionImpl .apply (sortedPropertiesList ));
136
+ objectFile .newUserDefinedSection (".debug.svm.imagebuild.java.properties" , makeSectionImpl .apply (builderProperties ));
137
137
}
138
138
}
139
139
ProgressReporter .singleton ().setDebugInfoTimer (timer );
0 commit comments