Skip to content

Commit

Permalink
[lldb] Treat ARM64X images as ARM64.
Browse files Browse the repository at this point in the history
With D149091, ARM64X binaries are no longer reported as ARM64. This broke
lldb tests as Windows 11 system DLLs are mostly ARM64X binaries and lldb
doesn't know how to handle them. Ideally lldb would understand a bit more
about ARM64X and handle them as AMD64 in x64 processes, but this is
enough to preserve previous behavior and fix tests.

Reviewed By: mstorsjo
Differential Revision: https://reviews.llvm.org/D156268

(cherry picked from commit 48feef2)
  • Loading branch information
cjacek authored and tru committed Jul 26, 2023
1 parent 6ce6dcf commit 397390a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ size_t ObjectFilePECOFF::GetModuleSpecifications(
specs.Append(module_spec);
break;
case MachineArm64:
case MachineArm64X:
spec.SetTriple("aarch64-pc-windows");
spec.GetTriple().setEnvironment(env);
specs.Append(module_spec);
Expand Down
1 change: 1 addition & 0 deletions lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ObjectFilePECOFF : public lldb_private::ObjectFile {
MachineArm = 0x1c0,
MachineArmNt = 0x1c4,
MachineArm64 = 0xaa64,
MachineArm64X = 0xa64e,
MachineEbc = 0xebc,
MachineX86 = 0x14c,
MachineIA64 = 0x200,
Expand Down

0 comments on commit 397390a

Please sign in to comment.