[Lldb-commits] [PATCH] D131795: [LLDB] Fix the 'default' switch case in GetCompatibleArchs()
Slava Gurevich via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 12 11:21:00 PDT 2022
fixathon created this revision.
fixathon added reviewers: clayborg, JDevlieghere.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
fixathon edited the summary of this revision.
fixathon published this revision for review.
fixathon added a comment.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This is an unfinished draft up for discussion.
Moving the discussion of this issue that started in https://reviews.llvm.org/D113155 to here for clarity.
1. The 'default' switch case falls through to ArchSpec::Core_arm_arm64 due to the missing 'break', which seems wrong..
2. The following test is failing after #1 is corrected. Additionally, @clayborg discovered mismatch in cputype between qHostInfo and qProcessInfo.
However, even then the test appears to be failing. GetCompatibleArchs() in PlatformDarwin.cpp receives ArchSpec::kCore_invalid
Tested on M1 <https://reviews.llvm.org/M1> hardware running MacOS 12.5
$ llvm-lit -sv llvm-project/lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
..
AssertionError: 'host' != 'remote-ios'
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131795
Files:
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
Index: lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
===================================================================
--- lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
@@ -19,7 +19,7 @@
return MockGDBServerResponder.respond(self, packet)
def qHostInfo(self):
- return "cputype:16777223;cpusubtype:2;ostype:%s;vendor:apple;os_version:10.15.4;maccatalyst_version:13.4;endian:little;ptrsize:8;" % self.host_ostype
+ return "cputype:16777228;cpusubtype:2;ostype:%s;vendor:apple;os_version:10.15.4;maccatalyst_version:13.4;endian:little;ptrsize:8;" % self.host_ostype
def qProcessInfo(self):
return "pid:a860;parent-pid:d2a0;real-uid:1f5;real-gid:14;effective-uid:1f5;effective-gid:14;cputype:100000c;cpusubtype:2;ptrsize:8;ostype:ios;vendor:apple;endian:little;"
Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -498,7 +498,7 @@
static llvm::ArrayRef<const char *> GetCompatibleArchs(ArchSpec::Core core) {
switch (core) {
default:
- [[fallthrough]];
+ break;
case ArchSpec::eCore_arm_arm64e: {
static const char *g_arm64e_compatible_archs[] = {
"arm64e", "arm64", "armv7", "armv7f", "armv7k", "armv7s",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131795.452242.patch
Type: text/x-patch
Size: 1540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220812/a3215221/attachment.bin>
More information about the lldb-commits
mailing list