mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
aarch64: Add debugging information
This patch enables DWARF and allows compilation with debugging information by using "gcc -g". The unwind info is disabled for the moment and will be revisited after SEH implementation for the target. gcc/ChangeLog: * config/aarch64/aarch64.cc (TARGET_ASM_UNALIGNED_HI_OP): Enable DWARF. (TARGET_ASM_UNALIGNED_SI_OP): Likewise. (TARGET_ASM_UNALIGNED_DI_OP): Likewise. * config/aarch64/cygming.h (DWARF2_DEBUGGING_INFO): Likewise. (PREFERRED_DEBUGGING_TYPE): Likewise. (DWARF2_UNWIND_INFO): Likewise. (ASM_OUTPUT_DWARF_OFFSET): Likewise.
This commit is contained in:
parent
5181d982c3
commit
9da72a62ec
@ -31131,6 +31131,15 @@ aarch64_run_selftests (void)
|
||||
#undef TARGET_ASM_ALIGNED_SI_OP
|
||||
#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
|
||||
|
||||
#if TARGET_PECOFF
|
||||
#undef TARGET_ASM_UNALIGNED_HI_OP
|
||||
#define TARGET_ASM_UNALIGNED_HI_OP TARGET_ASM_ALIGNED_HI_OP
|
||||
#undef TARGET_ASM_UNALIGNED_SI_OP
|
||||
#define TARGET_ASM_UNALIGNED_SI_OP TARGET_ASM_ALIGNED_SI_OP
|
||||
#undef TARGET_ASM_UNALIGNED_DI_OP
|
||||
#define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP
|
||||
#endif
|
||||
|
||||
#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
|
||||
#define TARGET_ASM_CAN_OUTPUT_MI_THUNK \
|
||||
hook_bool_const_tree_hwi_hwi_const_tree_true
|
||||
|
@ -21,8 +21,13 @@ along with GCC; see the file COPYING3. If not see
|
||||
#ifndef GCC_AARCH64_CYGMING_H
|
||||
#define GCC_AARCH64_CYGMING_H
|
||||
|
||||
#define DWARF2_DEBUGGING_INFO 1
|
||||
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE DINFO_TYPE_NONE
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
|
||||
#undef DWARF2_UNWIND_INFO
|
||||
#define DWARF2_UNWIND_INFO 0
|
||||
|
||||
#define FASTCALL_PREFIX '@'
|
||||
|
||||
@ -75,6 +80,38 @@ still needed for compilation. */
|
||||
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
|
||||
mingw_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
|
||||
|
||||
/* Use section relative relocations for debugging offsets. Unlike
|
||||
other targets that fake this by putting the section VMA at 0, PE
|
||||
won't allow it. */
|
||||
#define ASM_OUTPUT_DWARF_OFFSET(FILE, SIZE, LABEL, OFFSET, SECTION) \
|
||||
do { \
|
||||
switch (SIZE) \
|
||||
{ \
|
||||
case 4: \
|
||||
fputs ("\t.secrel32\t", FILE); \
|
||||
assemble_name (FILE, LABEL); \
|
||||
if ((OFFSET) != 0) \
|
||||
fprintf (FILE, "+" HOST_WIDE_INT_PRINT_DEC, \
|
||||
(HOST_WIDE_INT) (OFFSET)); \
|
||||
break; \
|
||||
case 8: \
|
||||
/* This is a hack. There is no 64-bit section relative \
|
||||
relocation. However, the COFF format also does not \
|
||||
support 64-bit file offsets; 64-bit applications are \
|
||||
limited to 32-bits of code+data in any one module. \
|
||||
Fake the 64-bit offset by zero-extending it. */ \
|
||||
fputs ("\t.secrel32\t", FILE); \
|
||||
assemble_name (FILE, LABEL); \
|
||||
if ((OFFSET) != 0) \
|
||||
fprintf (FILE, "+" HOST_WIDE_INT_PRINT_DEC, \
|
||||
(HOST_WIDE_INT) (OFFSET)); \
|
||||
fputs ("\n\t.long\t0", FILE); \
|
||||
break; \
|
||||
default: \
|
||||
gcc_unreachable (); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user