{"push_id":3028469546,"size":1,"distinct_size":1,"ref":"refs/heads/cherry-5","head":"521fd44cd8fe1a62bbfbebde2194afc7ce06c101","before":"19c5acf02da1bb35be297563e68c1129dc964302","commits":[{"sha":"521fd44cd8fe1a62bbfbebde2194afc7ce06c101","author":{"name":"Adrian Prantl","email":"da230f0243ee2df490cee3ca2c04c1ee8891c8ea@apple.com"},"message":"Fix (and improve) the support for C99 variable length array types.\n\nClang recently improved its DWARF support for C VLA types. The DWARF\nnow looks like this:\n\n0x00000051:         DW_TAG_variable [4]\n                     DW_AT_location( fbreg -32 )\n                     DW_AT_name( \"__vla_expr\" )\n                     DW_AT_type( {0x000000d3} ( long unsigned int ) )\n                     DW_AT_artificial( true )\n...\n0x000000da:     DW_TAG_array_type [10] *\n                 DW_AT_type( {0x000000cc} ( int ) )\n\n0x000000df:         DW_TAG_subrange_type [11]\n                     DW_AT_type( {0x000000e9} ( __ARRAY_SIZE_TYPE__ ) )\n                     DW_AT_count( {0x00000051} )\n\nWithout this patch LLDB will naively interpret the DIE offset 0x51 as\nthe static size of the array, which is clearly wrong.  This patch\nextends ValueObject::GetNumChildren to query the dynamic properties of\nincomplete array types.\n\nSee the testcase for an example:\n\n   4   int foo(int a) {\n   5   \t     int vla[a];\n   6   \t       for (int i = 0; i < a; ++i)\n   7   \t           vla[i] = i;\n   8\n-> 9            pause(); // break here\n   10  \t\treturn vla[a-1];\n   11   }\n\n(lldb) fr v vla\n(int []) vla = ([0] = 0, [1] = 1, [2] = 2, [3] = 3)\n(lldb) quit\n\nrdar://problem/21814005\n\nDifferential Revision: https://reviews.llvm.org/D53530\n\ngit-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@346165 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 8fea0d8957787360d7e5abefc7b6a94991c07f85)","distinct":true,"url":"https://api.github.com/repos/adrian-prantl/swift-lldb/commits/521fd44cd8fe1a62bbfbebde2194afc7ce06c101"}]}
{"actor":{"display_login":"adrian-prantl"}}