Skip to content

Commit 280d0df

Browse files
authored
[lldb] Remove test that disassembles all of Foundation (#167596)
This test attempts to disassemble every Code symbol in Foundation. There's no need to disassemble every code symbol and this certainly does not scale. In some cases, this test can take multiple minutes to run or even time out.
1 parent 7f4a3a9 commit 280d0df

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

lldb/test/API/lang/objc/foundation/TestFoundationDisassembly.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,6 @@
1212
class FoundationDisassembleTestCase(TestBase):
1313
NO_DEBUG_INFO_TESTCASE = True
1414

15-
@skipIfAsan
16-
def test_foundation_disasm(self):
17-
"""Do 'disassemble -n func' on each and every 'Code' symbol entry from the Foundation.framework."""
18-
self.build()
19-
20-
# Enable synchronous mode
21-
self.dbg.SetAsync(False)
22-
23-
# Create a target by the debugger.
24-
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
25-
self.assertTrue(target, VALID_TARGET)
26-
27-
# Now launch the process, and do not stop at entry point.
28-
process = target.LaunchSimple(None, None, self.get_process_working_directory())
29-
self.assertTrue(process, PROCESS_IS_VALID)
30-
31-
foundation_framework = None
32-
for module in target.modules:
33-
if module.file.basename == "Foundation":
34-
foundation_framework = module.file.fullpath
35-
break
36-
37-
self.assertIsNotNone(foundation_framework, "Foundation.framework path located")
38-
self.runCmd("image dump symtab '%s'" % foundation_framework)
39-
raw_output = self.res.GetOutput()
40-
# Now, grab every 'Code' symbol and feed it into the command:
41-
# 'disassemble -n func'.
42-
#
43-
# The symbol name is on the last column and trails the flag column which
44-
# looks like '0xhhhhhhhh', i.e., 8 hexadecimal digits.
45-
codeRE = re.compile(
46-
r"""
47-
\ Code\ {9} # ' Code' followed by 9 SPCs,
48-
.* # the wildcard chars,
49-
0x[0-9a-f]{8} # the flag column, and
50-
\ (.+)$ # finally the function symbol.
51-
""",
52-
re.VERBOSE,
53-
)
54-
for line in raw_output.split(os.linesep):
55-
match = codeRE.search(line)
56-
if match:
57-
func = match.group(1)
58-
self.runCmd('image lookup -s "%s"' % func)
59-
self.runCmd('disassemble --force -n "%s"' % func)
60-
6115
@skipIfAsan
6216
def test_simple_disasm(self):
6317
"""Test the lldb 'disassemble' command"""

0 commit comments

Comments
 (0)