Fix TestDisassembleBreakpoint broken by r328488
authorPavel Labath <labath@google.com>
Mon, 26 Mar 2018 15:17:58 +0000 (15:17 +0000)
committerPavel Labath <labath@google.com>
Mon, 26 Mar 2018 15:17:58 +0000 (15:17 +0000)
commit9a652a84b141901b6eb17a5948b0741e0febd141
tree311bb741d67b3b740441f26cecb26e60fc7a0cc2
parentd95020108c48d785b99b08cce423134a8463a95d
Fix TestDisassembleBreakpoint broken by r328488

The first issue was that the test was capturing the "before" disassembly
before launching, and the "after" after. This is a problem because some
of the disassembly will change after we know the load address (e.g. PCs
in call instructions). I fix this by capturing both disassemblies with
the process running.

The second issue was that the refactor in r328488 accidentaly changed
the meaning of the test, as it was no longer disassembling the function
which contained the breakpoint.

While inside, I also modernize the test to use
lldbutil.run_to_source_breakpoint and prevent debug-info replication.

llvm-svn: 328504
lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
lldb/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp