[all-commits] [llvm/llvm-project] f9f331: Replace ArchSpec::PiecewiseCompare() with Triple::...

Adrian Prantl via All-commits all-commits at lists.llvm.org
Mon Feb 26 09:57:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9f331652d4f0aff9ece3570abe8c686cdfefff4
      https://github.com/llvm/llvm-project/commit/f9f331652d4f0aff9ece3570abe8c686cdfefff4
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

  Changed paths:
    M lldb/include/lldb/Utility/ArchSpec.h
    M lldb/source/Target/Target.cpp
    M lldb/source/Utility/ArchSpec.cpp
    A lldb/test/API/macosx/arm64e-attach/Makefile
    A lldb/test/API/macosx/arm64e-attach/TestArm64eAttach.py
    A lldb/test/API/macosx/arm64e-attach/main.c

  Log Message:
  -----------
  Replace ArchSpec::PiecewiseCompare() with Triple::operator==()

Looking ast the definition of both functions this is *almost* an NFC
change, except that Triple also looks at the SubArch (important) and
ObjectFormat (less so).

This fixes a bug that only manifests with how Xcode uses the SBAPI to
attach to a process by name: it guesses the architecture based on the
system. If the system is arm64 and the Process is arm64e Target fails
to update the triple because it deemed the two to be equivalent.

rdar://123338218


  Commit: 01450dd1c69d1edb0d01159352a56c99988839f4
      https://github.com/llvm/llvm-project/commit/01450dd1c69d1edb0d01159352a56c99988839f4
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

  Changed paths:
    M lldb/source/Target/Target.cpp
    M lldb/test/API/macosx/arm64e-attach/Makefile
    M lldb/test/API/macosx/arm64e-attach/TestArm64eAttach.py
    M lldb/tools/debugserver/source/DNB.cpp
    M lldb/tools/debugserver/source/DNB.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    M lldb/tools/debugserver/source/RNBRemote.cpp

  Log Message:
  -----------
  Change debugserver to report the cpu(sub)type of process, not the host.

This way debugserver can correctly report qProcessInfo for arm64
processes on arm64e-capable hosts.

Patch implemented with help from Jason Molenda!


Compare: https://github.com/llvm/llvm-project/compare/b876596a76cd...01450dd1c69d

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list