Make destructor breakpoint location test more resilient
authorPavel Labath <labath@google.com>
Fri, 15 Apr 2016 09:11:22 +0000 (09:11 +0000)
committerPavel Labath <labath@google.com>
Fri, 15 Apr 2016 09:11:22 +0000 (09:11 +0000)
commit5c17454cd6a7352c1e6b80570d3c7bfc702153f1
treeed376b95e5c272e70861d112265a5b4f35780c74
parentf7fa634887cf327ebca2a71327631ee00f0057a8
Make destructor breakpoint location test more resilient

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).

Reviewers: clayborg

Subscribers: ovyalov, zturner, lldb-commits

Differential Revision: http://reviews.llvm.org/D19052

llvm-svn: 266416
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/main.cpp