[llvm] ac15cd7 - Modified SourceLevelDebugging.rst to include information about memory location exp

YASHASVI KHATAVKAR via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 12:25:36 PST 2022


Author: YASHASVI KHATAVKAR
Date: 2022-02-10T15:24:51-05:00
New Revision: ac15cd7af6150cc7de4eb29526070ff48c0ae437

URL: https://github.com/llvm/llvm-project/commit/ac15cd7af6150cc7de4eb29526070ff48c0ae437
DIFF: https://github.com/llvm/llvm-project/commit/ac15cd7af6150cc7de4eb29526070ff48c0ae437.diff

LOG: Modified SourceLevelDebugging.rst to include information about memory location exp

Added: 
    

Modified: 
    llvm/docs/SourceLevelDebugging.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/SourceLevelDebugging.rst b/llvm/docs/SourceLevelDebugging.rst
index e4a529d0e242..bdc55e5bcfec 100644
--- a/llvm/docs/SourceLevelDebugging.rst
+++ b/llvm/docs/SourceLevelDebugging.rst
@@ -1087,6 +1087,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:
 
 .. code-block:: text
@@ -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)
 


        


More information about the llvm-commits mailing list