You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -702,20 +700,20 @@ Windows support is still under development.
702
700
703
701
## Debugging with Isolates
704
702
705
-
Enabling the use of [isolates](https://medium.com/graalvm/isolates-and-compressed-references-more-flexible-and-efficient-memory-management-for-graalvm-a044cc50b67e), by passing command line option `-H:-SpawnIsolates` to the `native-image` builder, affects the way ordinary object pointers (oops) are encoded.
703
+
The use of [isolates](https://medium.com/graalvm/isolates-and-compressed-references-more-flexible-and-efficient-memory-management-for-graalvm-a044cc50b67e) in native image affects the way ordinary object pointers (oops) are encoded.
706
704
In turn, that means the debug info generator has to provide `gdb` with information about how to translate an encoded oop to the address in memory, where the object data is stored.
707
705
This sometimes requires care when asking `gdb` to process encoded oops vs decoded raw addresses.
708
706
709
-
When isolates are disabled, oops are essentially raw addresses pointing directly at the object contents.
707
+
If isolates were disabled, oops would essentially be raw addresses pointing directly at the object contents.
710
708
This is generally the same whether the oop is embedded in a static/instance field or is referenced from a local or parameter variable located in a register or saved to the stack.
711
709
It is not quite that simple because the bottom 3 bits of some oops may be used to hold "tags" that record certain transient properties of an object.
712
710
However, the debug info provided to `gdb` means that it will remove these tag bits before dereferencing the oop as an address.
713
711
714
-
By contrast, when isolates are enabled, oops references stored in static or instance fields are actually relative addresses, offsets from a dedicated heap base register (r14 on x86_64, r29 on AArch64), rather than direct addresses (in a few special cases the offset may also have some low tag bits set).
712
+
With the use of isolates, oops references stored in static or instance fields are actually relative addresses, offsets from a dedicated heap base register (r14 on x86_64, r29 on AArch64), rather than direct addresses (in a few special cases the offset may also have some low tag bits set).
715
713
When an "indirect" oop of this kind gets loaded during execution, it is almost always immediately converted to a "raw" address by adding the offset to the heap base register value.
716
714
So, oops which occur as the value of local or parameter vars are actually raw addresses.
717
715
718
-
> Note that on some operating systems enabling isolates causes problems with printing of objects when using a `gdb` release version 10 or earlier. It is currently recommended to disable use of isolates, by passing command line option `-H:-SpawnIsolates`, when generating debug info if your operating system includes one of these earlier releases. Alternatively, you may be able to upgrade your debugger to a later version.
716
+
> Note that on some operating systems enabling isolates causes problems with printing of objects when using a `gdb` release version 10 or earlier. It is strongly recommended to upgrade your debugger to a later version.
719
717
720
718
The DWARF info encoded into the image, when isolates are enabled, tells `gdb` to rebase indirect oops whenever it tries to dereference them to access underlying object data.
721
719
This is normally automatic and transparent, but it is visible in the underlying type model that `gdb` displays when you ask for the type of objects.
@@ -1002,4 +1000,4 @@ To make this work, the image needs to be built with `-g` (to generate debuginfo)
1002
1000
1003
1001
## Related Documentation
1004
1002
1005
-
-[Debug Native Executables with GDB](guides/debug-native-executables-with-gdb.md)
1003
+
-[Debug Native Executables with GDB](guides/debug-native-executables-with-gdb.md)
0 commit comments