Open
Description
Describe the Issue
- follow build instructions from example https://github.com/graalvm/graalvm-demos/blob/master/native-image/build-shared-library/README.md
- but add
-g
tonative-image
to generate debug info - execute
dwarfdamp
:dwarfdump -i graalvm-demos/native-shared-library/libenvmap.so.debug | less +/\"filterEnv\"
Actual result is:
0x00000c2c: DW_TAG_subprogram
DW_AT_external (0x01)
DW_AT_name ("filterEnv")
DW_AT_linkage_name ("_ZN9LibEnvMap9filterEnvEJi37org.graalvm.nativeimage.IsolateThread43org.graalvm.nativeimage.c.type.CCharPointer")
DW_AT_type (0x219ae612287b7531)
DW_AT_artificial (0x00)
DW_AT_accessibility (DW_ACCESS_private)
DW_AT_declaration (0x01)
0x00000c41: DW_TAG_formal_parameter
DW_AT_type (0xab1c3ea4b91a5af3)
0x00000c4a: DW_TAG_formal_parameter
DW_AT_type (0xf4746327f17324ed)
0x00000c53: NULL
0x00000c54: NULL
Expected result is: DW_TAG_variable
entries for filter
, env
and others
Using the latest version of GraalVM can resolve many issues.
- I tried with the latest version of GraalVM.
GraalVM Version
openjdk 24 2025-03-18
OpenJDK Runtime Environment GraalVM CE 24+36.1 (build 24+36-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 24+36.1 (build 24+36-jvmci-b01, mixed mode, sharing)
Operating System and Version
Linux 531ed515bb73 6.10.14-linuxkit #1 SMP Sat May 17 08:28:57 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
Build Command
native-image -o libenvmap --shared -g -cp .
Expected Behavior
dwarfdump -i graalvm-demos/native-shared-library/libenvmap.so.debug | less +/\"filterEnv\"
DW_TAG_variable
entries for filter
, env
and others
Actual Behavior
dwarfdump -i graalvm-demos/native-shared-library/libenvmap.so.debug | less +/\"filterEnv\"
Actual result is:
0x00000c2c: DW_TAG_subprogram
DW_AT_external (0x01)
DW_AT_name ("filterEnv")
DW_AT_linkage_name ("_ZN9LibEnvMap9filterEnvEJi37org.graalvm.nativeimage.IsolateThread43org.graalvm.nativeimage.c.type.CCharPointer")
DW_AT_type (0x219ae612287b7531)
DW_AT_artificial (0x00)
DW_AT_accessibility (DW_ACCESS_private)
DW_AT_declaration (0x01)
0x00000c41: DW_TAG_formal_parameter
DW_AT_type (0xab1c3ea4b91a5af3)
0x00000c4a: DW_TAG_formal_parameter
DW_AT_type (0xf4746327f17324ed)
0x00000c53: NULL
0x00000c54: NULL
Steps to Reproduce
- follow instructions from https://github.com/graalvm/graalvm-demos/blob/master/native-image/build-shared-library/README.md, but add
-g
fornative-image
Additional Context
No response
Build Log Output and Error Messages
No response