Skip to content

Commit 3d67156

Browse files
committed
Minor updates to code and comments
1 parent 2c31b44 commit 3d67156

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

lldb/source/Host/macosx/objcxx/Host.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,8 @@ static bool GetMacOSXProcessUserAndGroup(ProcessInstanceInfo &process_info) {
746746
!match_info.ProcessIDsMatch(process_info))
747747
continue;
748748

749-
// Get CPU type first so we can know to look for iOS simulator is we have
750-
// x86 or x86_64
749+
// Get CPU type first so we can know to look for iOS simulator if we have
750+
// a compatible type.
751751
if (GetMacOSXProcessCPUType(process_info)) {
752752
if (GetMacOSXProcessArgs(&match_info, process_info)) {
753753
if (match_info.Matches(process_info))

lldb/test/API/macosx/simulator/TestSimulatorPlatform.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,22 @@ def run_with(
7777
self, "break here", lldb.SBFileSpec("hello.c")
7878
)
7979
triple_re = "-".join([arch, "apple", os + vers + ".*"] + env_list)
80+
self.expect("image list -b -t", patterns=[r"a\.out " + triple_re])
8081
if expected_platform is not None:
81-
# The current platform should be expected
82+
# Verify the platform name.
8283
self.expect("platform status", patterns=[r"Platform: " + expected_platform])
83-
# Should be able to list processes on the current platform
84+
# Verify that processes on the platform can be listed.
85+
#
86+
# Note: The `Host::FindProcessesImpl()` of some of the Hosts filters out processes which are being debugged.
87+
# (e.g. code for iOS simulator linked below). So we cannot verify that `a.out` is in the process list
88+
# (because its already being debugged by this test).
89+
# https://github.com/llvm/llvm-project/blob/b5dbf8210a57b986b9802304745f4c5c108cf37b/lldb/source/Host/macosx/objcxx/Host.mm#L724
8490
self.expect(
8591
"platform process list",
8692
patterns=[
8793
r"\d+ matching processes were found on \"%s\"" % expected_platform
8894
],
8995
)
90-
self.expect("image list -b -t", patterns=[r"a\.out " + triple_re])
9196
self.check_debugserver(log, os + env, vers)
9297

9398
@skipIfAsan

0 commit comments

Comments
 (0)