<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ARM64: Debug info for structure argument missing DW_AT_location"
   href="https://bugs.llvm.org/show_bug.cgi?id=40709">40709</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ARM64: Debug info for structure argument missing DW_AT_location
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>maya.madhavan@windriver.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>For the given test case, with LLVM 6.0.0, the DW_AT_location information is
generated but with LLVM 7.0.0, that is no longer the case.

$ cat small.c
extern int printf(const char *, ...);

typedef struct
    {
    char structchar1;       
    char structchar2;       
    char structchar3;       
    int structinteger1;     
    int structinteger2;     
    int structinteger3;     
    float structfloating1;  
    float structfloating2;  
    float structfloating3;  
    } mystruct;

int functionDifferentArgTest (mystruct structByValue)
    {
    printf ("in function functionDifferentArgTest, str=%llx\n", (unsigned long
long) &structByValue);

    return (16);
    }
$


With LLVM 6.0.0:

$ clang -gdwarf-3  --target=arm64  -c small.c
$ llvm-dwarfdump small.o
...
0x00000055:     DW_TAG_formal_parameter [4]
                  DW_AT_location [DW_FORM_data4]        (0x00000000)
                  DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000f5] =
"structByValue")
                  DW_AT_decl_file [DW_FORM_data1]      
("/tmp/realTest/small.c")
                  DW_AT_decl_line [DW_FORM_data1]       (16)
                  DW_AT_type [DW_FORM_ref4]     (cu + 0x006c => {0x0000006c})

...



With LLVM 7.0.0:
$ clang -gdwarf-3  --target=arm64  -c small.c
$ llvm-dwarfdump small.o
0x00000055:     DW_TAG_formal_parameter [4]
                  DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000f5] =
"structByValue")
                  DW_AT_decl_file [DW_FORM_data1]      
("/tmp/realTest/small.c")
                  DW_AT_decl_line [DW_FORM_data1]       (16)
                  DW_AT_type [DW_FORM_ref4]     (cu + 0x0068 => {0x00000068})

...</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>