Page MenuHomePhabricator

Make destructor breakpoint location test more resilient
ClosedPublic

Authored by labath on Apr 13 2016, 3:39 AM.

Details

Summary

The original breakpoint location test was failing for linux, because the compilers here tend to
merge the full-object and subobject destructors even at -O0 (as a result, we are getting only 2
breakpoint locations, and not 4 as the test expected. The fixup in r266164 substantially weakened
the test, as it now did not check whether both kinds of destructors were being found.

Because of these contraints, I have altered the logic of the test. It sets the
breakpoint by name, and then independently verifies that the breakpoint is set on the correct
demangled symbol name (which is not very meaningful since both kinds of destructors demangle to
the same name) *and* the correct symbol address (which is obtained by looking up the mangled
symbol name).

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 53528.Apr 13 2016, 3:39 AM
labath retitled this revision from to Make destructor breakpoint location test more resilient.
labath updated this object.
labath added a reviewer: clayborg.
labath added subscribers: lldb-commits, zturner, ovyalov.
clayborg accepted this revision.Apr 13 2016, 10:01 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Apr 13 2016, 10:01 AM
labath updated this revision to Diff 53694.Apr 14 2016, 5:37 AM
labath edited edge metadata.

One more tweak to make the test work on linux clang: I've needed to move the constructors out-of-line to make sure the compiler generates the expected symbols.

labath requested a review of this revision.Apr 14 2016, 5:38 AM
labath edited edge metadata.
clayborg accepted this revision.Apr 14 2016, 10:31 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Apr 14 2016, 10:31 AM
This revision was automatically updated to reflect the committed changes.