aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2023-01-25 23:54:37 +0000
committerMark Harmstone <mark@harmstone.com>2023-01-27 04:03:15 +0000
commitc194b6ac4874d7a7eefdf4bd13376c3fc5f3eb7b (patch)
tree749f87a60970a05f639af5dd42a81ff657966842
parentc95d486d35f87b4e32941f20bed56f57ebd58d8b (diff)
downloadgdb-c194b6ac4874d7a7eefdf4bd13376c3fc5f3eb7b.zip
gdb-c194b6ac4874d7a7eefdf4bd13376c3fc5f3eb7b.tar.gz
gdb-c194b6ac4874d7a7eefdf4bd13376c3fc5f3eb7b.tar.bz2
gas: Add CodeView constant for aarch64
Adds the correct constant to the S_COMPILE3 CodeView record when assembling aarch64-w64-mingw32 with the -gcodeview flag.
-rw-r--r--gas/codeview.c19
-rw-r--r--gas/codeview.h1
2 files changed, 14 insertions, 6 deletions
diff --git a/gas/codeview.c b/gas/codeview.c
index 2d96d44..0d5f828 100644
--- a/gas/codeview.c
+++ b/gas/codeview.c
@@ -286,13 +286,20 @@ write_lines_info (void)
static uint16_t
target_processor (void)
{
- if (stdoutput->arch_info->arch != bfd_arch_i386)
- return 0;
+ switch (stdoutput->arch_info->arch)
+ {
+ case bfd_arch_i386:
+ if (stdoutput->arch_info->mach & bfd_mach_x86_64)
+ return CV_CFL_X64;
+ else
+ return CV_CFL_80386;
- if (stdoutput->arch_info->mach & bfd_mach_x86_64)
- return CV_CFL_X64;
- else
- return CV_CFL_80386;
+ case bfd_arch_aarch64:
+ return CV_CFL_ARM64;
+
+ default:
+ return 0;
+ }
}
/* Write the CodeView symbols, describing the object name and
diff --git a/gas/codeview.h b/gas/codeview.h
index def2a39..2a3d8fc 100644
--- a/gas/codeview.h
+++ b/gas/codeview.h
@@ -38,6 +38,7 @@
#define CV_CFL_80386 0x03
#define CV_CFL_X64 0xD0
+#define CV_CFL_ARM64 0xF6
#define CHKSUM_TYPE_MD5 1