1
- Using the ptototype debug info feature
2
- --------------------------------------
1
+ Using the debug info feature
2
+ ----------------------------
3
3
4
4
To add debug info to a generated native image add flag
5
5
-H: GenerateDebugInfo =<N > to the native image command line (where N is
@@ -10,8 +10,8 @@ debug info). For example,
10
10
$ mx native-image -H:GenerateDebugInfo=1 Hello
11
11
12
12
The resulting image should contain code (method) debug records in a
13
- format gdb understands (VS support is still under development). At
14
- present it makes no difference which positive value is supplied as
13
+ format gdb understands (Windows support is still under development).
14
+ At present it makes no difference which positive value is supplied as
15
15
argument to the GenerateDebugInfo option.
16
16
17
17
The GenerateDebugInfo option also enables caching of sources for any
@@ -30,7 +30,7 @@ uses the current JAVA_HOME to locate the JDK src.zip when searching
30
30
for JDK runtime sources. It also uses entries in the classpath to
31
31
suggest locations for GraalVM source files and application source
32
32
files (see below for precise details of the scheme used to identify
33
- source locations). However, source layouts do vary and it may no tbe
33
+ source locations). However, source layouts do vary and it may not be
34
34
possible to find all sources. Hence, users can specify the location of
35
35
source files explicitly on the command line using option
36
36
DebugInfoSourceSearchPath:
@@ -61,7 +61,7 @@ Note that in both the examples above the DebugInfoSourceSearchPath
61
61
options are actually redundant. In the first case the classpath
62
62
entries for apps/hello/classes and apps/greeter/classes will be used
63
63
to derive the default search roots apps/hello/src and
64
- apps/greeter/src. In the second case classpath entires
64
+ apps/greeter/src. In the second case classpath entries
65
65
apps/target/hello.jar and apps/target/greeter.jar will be used to
66
66
derive the default search roots apps/target/hello-sources.jar and
67
67
apps/target/greeter-sources.jar.
@@ -90,7 +90,7 @@ achieve this by accumulating the relevant sources in a suitably
90
90
structured file cache.
91
91
92
92
The native image generator uses different strategies to locate source
93
- files for JDK runtime classes, GraalVM classses and application source
93
+ files for JDK runtime classes, GraalVM classes and application source
94
94
classes for inclusion in the local sources cache. It identifies which
95
95
strategy to use based on the package name of the class. So, for
96
96
example, packages starting with java.* or jdk.* are JDK classes;
@@ -180,7 +180,7 @@ sources are being included.
180
180
You can also add extra directories to the search path. Note that gdb
181
181
does not understand zip format file systems so any extra entries you
182
182
add must identify a directory tree containing the relevant
183
- sources. Once again. top leel entries in the directory added to the
183
+ sources. Once again. top level entries in the directory added to the
184
184
search path must correspond to the top level package for the classes
185
185
whose sources are being included.
186
186
@@ -193,13 +193,13 @@ Checking debug info on Linux
193
193
----------------------------
194
194
195
195
n.b. this is only of interest to those who want to understand how the
196
- debug info implemetation works or want to trouble shoot problems
196
+ debug info implementation works or want to trouble shoot problems
197
197
encountered during debugging that might relate to the debug info
198
198
encoding.
199
199
200
- The objdump command can be used to display the dbeug info embedded
200
+ The objdump command can be used to display the debug info embedded
201
201
into a native image. The following commands (which all assume the
202
- target binary is called hello) can be used to display all currentyl
202
+ target binary is called hello) can be used to display all currently
203
203
generated content:
204
204
205
205
$ objdump --dwarf=info hello > info
@@ -212,7 +212,7 @@ generated content:
212
212
213
213
The * info* section includes details of all compiled Java methods.
214
214
215
- The * abbrev* sectio defines the layout of records in the info section
215
+ The * abbrev* section defines the layout of records in the info section
216
216
that describe Java files (compilation units) and methods.
217
217
218
218
The * ranges* section details the start and end addresses of method
@@ -222,8 +222,8 @@ The *decodedline* section maps subsegments of method code range
222
222
segments to files and line numbers. This mapping includes entries
223
223
for files and line numbers for inlined methods.
224
224
225
- The * rawline* segment provides deatails of how the line table is
226
- generated using DWARF state machine instuctions that encode file,
225
+ The * rawline* segment provides details of how the line table is
226
+ generated using DWARF state machine instructions that encode file,
227
227
line and address transitions.
228
228
229
229
The * str* section provides a lookup table for strings referenced
@@ -244,7 +244,7 @@ Currently supported targets
244
244
245
245
The prototype is currently implemented only for gdb on Linux.
246
246
247
- - Linux/x86_64 suppoort has been tested and should work
247
+ - Linux/x86_64 support has been tested and should work
248
248
correctly.
249
249
250
250
- Linux/AArch64 support is present but has not yet been fully
0 commit comments