
Summary: TestExprsChar.py Char is unsigned char by default in PowerPC. TestDisassembleBreakpoint.py Modify disassemble testcase to consider multiple architectures. TestThreadJump.py Jumping directly to the return line on PowerPC architecture dos not means returning the value that is seen on the code. The last test fails, because it needs the execution of some assembly in the beginning of the function. Avoiding this test for this architecture. TestEhFrameUnwind.py Implement func for ppc64le test case. TestWatchLocation.py TestStepOverWatchpoint.py PowerPC currently supports only one H/W watchpoint. TestDisassembleRawData.py Add PowerPC opcode and instruction for disassemble testcase. Reviewers: labath Reviewed By: labath Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc Differential Revision: https://reviews.llvm.org/D44472 Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br>. llvm-svn: 328488
56 lines
1.7 KiB
Python
56 lines
1.7 KiB
Python
"""
|
|
Test some lldb command abbreviations.
|
|
"""
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
import os
|
|
import time
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class DisassemblyTestCase(TestBase):
|
|
|
|
mydir = TestBase.compute_mydir(__file__)
|
|
|
|
@expectedFailureAll(
|
|
oslist=["windows"],
|
|
bugnumber="function names print fully demangled instead of name-only")
|
|
def test(self):
|
|
self.build()
|
|
exe = self.getBuildArtifact("a.out")
|
|
self.expect("file " + exe,
|
|
patterns=["Current executable set to .*a.out.*"])
|
|
|
|
self.runCmd("dis -n main")
|
|
disassembly_before_break = self.res.GetOutput().splitlines()
|
|
|
|
match_object = lldbutil.run_break_set_command(self, "br s -n sum")
|
|
lldbutil.check_breakpoint_result(
|
|
self,
|
|
match_object,
|
|
symbol_name='sum',
|
|
symbol_match_exact=False,
|
|
num_locations=1)
|
|
|
|
self.expect("run",
|
|
patterns=["Process .* launched: "])
|
|
|
|
self.runCmd("dis -n main")
|
|
disassembly_after_break = self.res.GetOutput().splitlines()
|
|
|
|
# make sure all assembly instructions are the same as the original
|
|
# instructions before inserting breakpoints.
|
|
self.assertEqual(len(disassembly_before_break),
|
|
len(disassembly_after_break))
|
|
|
|
for dis_inst_before, dis_inst_after in \
|
|
zip(disassembly_before_break, disassembly_after_break):
|
|
inst_before = dis_inst_before.split(':')[-1]
|
|
inst_after = dis_inst_after.split(':')[-1]
|
|
self.assertEqual(inst_before, inst_after)
|