producer_is_clang (false),
producer_is_gas_lt_2_38 (false),
producer_is_gas_2_39 (false),
+ producer_is_gas_ge_2_40 (false),
processing_has_namespace_info (false)
{
}
bool producer_is_clang : 1;
bool producer_is_gas_lt_2_38 : 1;
bool producer_is_gas_2_39 : 1;
+ bool producer_is_gas_ge_2_40 : 1;
/* When true, the file that we're processing is known to have
debugging info for C++ namespaces. GCC 3.3.x did not produce
static int ada_block_index;
static bool producer_is_gas_lt_2_38 (struct dwarf2_cu *cu);
+static bool producer_is_gas_ge_2_39 (struct dwarf2_cu *cu);
/* Size of .debug_loclists section header for 32-bit DWARF format. */
#define LOCLIST_HEADER_SIZE32 12
lowpc = per_objfile->relocate (unrel_low);
highpc = per_objfile->relocate (unrel_high);
+ if (gdbarch_bfd_arch_info (gdbarch)->arch == bfd_arch_arm
+ && producer_is_gas_ge_2_39 (cu))
+ {
+ /* Gas version 2.39 produces DWARF for a Thumb subprogram with a low_pc
+ attribute with the thumb bit set (PR gas/31115). Work around this. */
+ lowpc = gdbarch_addr_bits_remove (gdbarch, lowpc);
+ highpc = gdbarch_addr_bits_remove (gdbarch, highpc);
+ }
+
/* If we have any template arguments, then we must allocate a
different sort of symbol. */
for (child_die = die->child; child_die; child_die = child_die->sibling)
{
cu->producer_is_gas_lt_2_38 = major < 2 || (major == 2 && minor < 38);
cu->producer_is_gas_2_39 = major == 2 && minor == 39;
+ cu->producer_is_gas_ge_2_40 = major > 2 || (major == 2 && minor >= 40);
}
else
{
return cu->producer_is_gas_2_39;
}
+/* Return true if CU is produced by GAS 2.39 or later. */
+
+static bool
+producer_is_gas_ge_2_39 (struct dwarf2_cu *cu)
+{
+ if (!cu->checked_producer)
+ check_producer (cu);
+
+ return cu->producer_is_gas_2_39 || cu->producer_is_gas_ge_2_40;
+}
+
/* Return the accessibility of DIE, as given by DW_AT_accessibility.
If that attribute is not available, return the appropriate
default. */