brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 3d699e2 Raw
85 lines · plain
1# RUN: rm -rf %t.dir2# RUN: mkdir %t.dir3# RUN: cd %t.dir4# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml -o %t.dir/file1.dwo5# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml -o %t.dir/file2.dwo6# RUN: yaml2obj %p/Inputs/split-dwarf5-debug-stroffsets-main.yaml      -o %t.dir/test7# RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s8 9# This test checks that source code location is shown correctly10# when split DWARF 5 is used and both DWO/executable file contains11# .debug_str_offsets/.debug_str_offsets.dwo sections.12# Used clang version 8.0.0 (trunk 347299)13#14# split-dwarf5-debug-stroffsets-file1.dwo.yaml, split-dwarf5-debug-stroffsets-file2.dwo.yaml15# and split-dwarf5-debug-stroffsets-main.yaml are reduced yaml files produces16# from the DWO files and the corresponding executable.17#18# Code:19# // decl.h20# struct struct1 {21#   ~struct1();22#   static void f();23# };24# 25# struct struct2 {26#   ~struct2();27#   static void f();28# };29# 30# int g();31#32# // file1.cpp33# #include "decls.h"34# 35# int g() {36#   return 1;37# }38# 39# struct1::~struct1() {40#   int x = g();41# }42# 43# void struct1::f() {}44# 45# float test() {46#  return 0.0f;47# }48# 49# int main() {50#   struct1::f();51#   struct2::f();52# 53#   struct1 s1;54#   struct2 s2;55# 56#   test();57# 58#   return 0;59# }60#61# // file2.cpp62#63#64# #include "decls.h"65# 66# struct2::~struct2() {67#   int x = g();68# }69# 70# void struct2::f() {}71#72#73# Invocation used was:74# clang++ file1.cpp -o file1.o -g -fno-rtti -c -gdwarf-5 -gsplit-dwarf -ffunction-sections75# clang++ file2.cpp -o file2.o -g -fno-rtti -c -gdwarf-5 -gsplit-dwarf -ffunction-sections76# clang++ file1.o file2.o -g -fno-rtti -gdwarf-5 -o test -gsplit-dwarf -ffunction-sections77 78b struct1::f79# CHECK-LABEL: b struct1::f80# CHECK: Address: {{.*}}struct1::f() + 4 at file1.cpp:11:2081 82b struct2::f83# CHECK-LABEL: b struct2::f84# CHECK: Address: {{.*}}struct2::f() + 4 at file2.cpp:7:2085