61 lines · c
1// REQUIRES: lldb2// UNSUPPORTED: system-windows3//4// This test case checks debug info during register moves for an argument.5// RUN: %clang -std=gnu11 -m64 -mllvm -fast-isel=false -g %s -o %t6// RUN: %dexter --fail-lt 1.0 -w \7// RUN: --binary %t %dexter_lldb_args -- %s8//9// Radar 841241510 11struct _mtx12{13 long unsigned int ptr;14 int waiters;15 struct {16 int tag;17 int pad;18 } mtxi;19};20 21int bar(int, int);22 23int foobar(struct _mtx *mutex) {24 int r = 1;25 int l = 0; // DexLabel('l_assign')26 int j = 0;27 do {28 if (mutex->waiters) {29 r = 2;30 }31 j = bar(r, l);32 ++l;33 } while (l < j);34 return r + j;35}36 37int bar(int i, int j) {38 return i + j;39}40 41int main() {42 struct _mtx m;43 m.waiters = 0;44 return foobar(&m);45}46 47 48/*49DexExpectProgramState({50 'frames': [51 {52 'location': { 'lineno': ref('l_assign') },53 'watches': {54 '*mutex': { 'is_irretrievable': False }55 }56 }57 ]58})59*/60 61