summaryrefslogtreecommitdiffstats
path: root/llvm/docs/SourceLevelDebugging.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/SourceLevelDebugging.rst')
-rw-r--r--llvm/docs/SourceLevelDebugging.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/docs/SourceLevelDebugging.rst b/llvm/docs/SourceLevelDebugging.rst
index e4a529d0e242..ae26268cb6d7 100644
--- a/llvm/docs/SourceLevelDebugging.rst
+++ b/llvm/docs/SourceLevelDebugging.rst
@@ -1086,6 +1086,10 @@ a Fortran front-end would generate the following descriptors:
!DILocalVariable(name: "string", arg: 1, scope: !10, file: !3, line: 4, type: !15)
!DIStringType(name: "character(*)!2", stringLength: !16, stringLengthExpression: !DIExpression(), size: 32)
+
+A fortran deferred-length character can also contain the information of raw storage of the characters in addition to the length of the string. This information is encoded in the stringLocationExpression field. Based on this information, DW_AT_data_location attribute is emitted in a DW_TAG_string_type debug info.
+
+ !DIStringType(name: "character(*)!2", stringLengthExpression: !DIExpression(), stringLocationExpression: !DIExpression(DW_OP_push_object_address, DW_OP_deref), size: 32)
and this will materialize in DWARF tags as:
@@ -1097,6 +1101,7 @@ and this will materialize in DWARF tags as:
0x00000064: DW_TAG_variable
DW_AT_location (DW_OP_fbreg +16)
DW_AT_type (0x00000083 "integer*8")
+ DW_AT_data_location (DW_OP_push_object_address, DW_OP_deref)
...
DW_AT_artificial (true)