This is an archive of the discontinued LLVM Phabricator instance.

Fix debuginfo-tests with GDB on Linux
ClosedPublic

Authored by rnk on Aug 31 2017, 11:04 AM.

Details

Summary

Split asan.c into asan.c and asan-blocks.c, which will be
darwin-specific. I suspect we could make it pass on Linux by adding
cmake to build BlocksRuntime from compiler-rt, but I'm not shaving that
yak yet.

asan.c and safestack.c: GDB and LLDB appear to print aggregates
differently today. Print individual elements instead of the entire
aggregate.

dbg-arg.c: GDB doesn't appear to print leading zeros when printing
pointers.

stack-var.c: Add the optnone attribute so that LLVM won't optimize away
this no-op function call. This should be a cross-platform failure
observable on Mac, so this is surprising.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Aug 31 2017, 11:04 AM
aprantl edited edge metadata.Aug 31 2017, 11:09 AM

Looks good except for the one inline comment.

debuginfo-tests/asan-blocks.c
3 ↗(On Diff #113436)

can you have more than one REQUIRES line or do you need to comma-separate the values?

aprantl accepted this revision.Aug 31 2017, 11:10 AM

LGTM with outstanding issues addressed.

This revision is now accepted and ready to land.Aug 31 2017, 11:10 AM
rnk added a comment.Aug 31 2017, 11:16 AM

Thanks!

debuginfo-tests/asan-blocks.c
3 ↗(On Diff #113436)

Looks like I can do that.

BTW, it's probably worth shaving this yak. ASan and blocks are the two main users of complex dwarf expressions, so we really do want to get test coverage of them everwhere. I'll look into it.

This revision was automatically updated to reflect the committed changes.

Yes, looks like it is still running, it!
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/35057/consoleFull

$ pbpaste | grep debuginfo-test
PASS: Clang :: debuginfo-tests/forward-declare-class.cpp (11768 of 39401)
PASS: Clang :: debuginfo-tests/nested-struct.cpp (11769 of 39401)
XFAIL: Clang :: debuginfo-tests/static-member-2.cpp (11823 of 39401)
PASS: Clang :: debuginfo-tests/aggregate-indirect-arg.cpp (11826 of 39401)
PASS: Clang :: debuginfo-tests/sret.cpp (11827 of 39401)
PASS: Clang :: debuginfo-tests/vla.c (11828 of 39401)
PASS: Clang :: debuginfo-tests/dbg-arg.c (11829 of 39401)
PASS: Clang :: debuginfo-tests/ctor.cpp (11830 of 39401)
PASS: Clang :: debuginfo-tests/stack-var.c (11831 of 39401)
PASS: Clang :: debuginfo-tests/safestack.c (11833 of 39401)
PASS: Clang :: debuginfo-tests/asan.c (11846 of 39401)
PASS: Clang :: debuginfo-tests/asan-blocks.c (11848 of 39401)
PASS: Clang :: debuginfo-tests/static-member.cpp (11879 of 39401)
PASS: Clang :: debuginfo-tests/block_var.m (12252 of 39401)
PASS: Clang :: debuginfo-tests/foreach.m (12330 of 39401)
PASS: Clang :: debuginfo-tests/blocks.m (12844 of 39401)