brintos

brintos / llvm-project-archived public Read only

0
0
Text · 890 B · 8f1bb62 Raw
36 lines · c
1// XFAIL: target-windows2 3// Tests that LLDB correctly parses global symbols4// starting with 'O'. On some platforms (e.g., Darwin)5// C-symbols are prefixed with a '_'. The LLDB Macho-O6// parses handles Objective-C metadata symbols starting7// with '_OBJC' specially. This test ensures that we don't8// lose track of regular global symbols with a '_O' prefix9// in this.10 11// RUN: %clang_host -c -g -fno-common %s -o %t.o12// RUN: %clang_host %t.o -o %t.out13// RUN: %lldb -b -x %t.out \14// RUN:       -o "b 29" \15// RUN:       -o "run" \16// RUN:       -o "p OglobalVar" \17// RUN:       -o "p Oabc" | FileCheck %s18 19typedef struct {20  int a;21} Oabc_t;22 23Oabc_t Oabc;24int OglobalVar;25 26int main(int argc, const char *argv[]) {27  Oabc.a = 15;28  OglobalVar = 10;29  return OglobalVar + Oabc.a;30}31 32// CHECK: (lldb) p OglobalVar33// CHECK: (int) 1034// CHECK: (lldb) p Oabc35// CHECK: (Oabc_t) (a = 15)36