This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Fix the 'default' switch case in GetCompatibleArchs()
Changes PlannedPublic

Authored by fixathon on Aug 12 2022, 11:17 AM.

Details

Summary

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..
  1. The following test is failing after #1 is corrected:

$ llvm-lit -sv llvm-project/lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
..
AssertionError: 'host' != 'remote-ios'

Additionally, @clayborg discovered mismatch in cputype between qHostInfo and qProcessInfo.
However, even if that is corrected the test appears to be failing. GetCompatibleArchs() in PlatformDarwin.cpp receives ArchSpec::kCore_invalid
Tested on M1 hardware running MacOS 12.5

Diff Detail

Event Timeline

fixathon created this revision.Aug 12 2022, 11:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 11:17 AM
fixathon edited the summary of this revision. (Show Details)Aug 12 2022, 11:19 AM
fixathon published this revision for review.Aug 12 2022, 11:20 AM

This is an unfinished draft up for discussion.

Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 11:20 AM
fixathon edited the summary of this revision. (Show Details)Aug 12 2022, 11:46 AM

However, even if that is corrected the test appears to be failing. GetCompatibleArchs() in PlatformDarwin.cpp receives ArchSpec::kCore_invalid

Can you set a breakpoint and see why an invalid core is being passed into this function? This shouldn't be happening IMHO

lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
22

I believe that Jonas stated in the other diff that this was intentional.

JDevlieghere requested changes to this revision.Aug 12 2022, 3:09 PM

As mentioned in D113155 the difference in CPU type between qHostInfo and qProcessInfo is intentional.

This revision now requires changes to proceed.Aug 12 2022, 3:09 PM
fixathon planned changes to this revision.Aug 15 2022, 9:34 AM
fixathon added inline comments.
lldb/test/API/functionalities/gdb_remote_client/TestPlatformMacOSX.py
22

I will undo. This file is included here mostly for context as I moved the discussion into this separate new diff.