Skip to content

Commit

Permalink
[lldb] Add armv7a and armv8a ArchSpecs (llvm#106433)
Browse files Browse the repository at this point in the history
armv7a and armv8a are common names for the application subarch for arm.

These names in particular are used in ChromeOS, Android, and a few other
known applications. In ChromeOS, we encountered a bug where armv7a arch
was not recognised and segfaulted when starting an executable on an
arm32 device.

Google Issue Tracker:
https://issuetracker.google.com/361414339
  • Loading branch information
ajordanr-google authored Aug 29, 2024
1 parent 2ad782f commit 0a00d32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lldb/include/lldb/Utility/ArchSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class ArchSpec {
eCore_arm_armv6,
eCore_arm_armv6m,
eCore_arm_armv7,
eCore_arm_armv7a,
eCore_arm_armv7l,
eCore_arm_armv7f,
eCore_arm_armv7s,
Expand All @@ -145,6 +146,7 @@ class ArchSpec {
eCore_thumbv7em,
eCore_arm_arm64,
eCore_arm_armv8,
eCore_arm_armv8a,
eCore_arm_armv8l,
eCore_arm_arm64e,
eCore_arm_arm64_32,
Expand Down
4 changes: 4 additions & 0 deletions lldb/source/Utility/ArchSpec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ static const CoreDefinition g_core_definitions[] = {
"armv6m"},
{eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7,
"armv7"},
{eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7a,
"armv7a"},
{eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7l,
"armv7l"},
{eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7f,
Expand Down Expand Up @@ -102,6 +104,8 @@ static const CoreDefinition g_core_definitions[] = {
ArchSpec::eCore_arm_arm64, "arm64"},
{eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
ArchSpec::eCore_arm_armv8, "armv8"},
{eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
ArchSpec::eCore_arm_armv8a, "armv8a"},
{eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv8l,
"armv8l"},
{eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
Expand Down

0 comments on commit 0a00d32

Please sign in to comment.