+2021-05-07 Tom de Vries <tdevries@suse.de>
+
+ PR symtab/26327
+ * dwarf2/read.c (struct dwarf2_cu): Remove ancestor.
+ (dwarf2_cu::get_builder): Remove ancestor-related code.
+ (new_symbol): Remove code supporting pre-4.1 gcc that show arguments
+ of inlined functions as locals.
+ (follow_die_offset, follow_die_sig_1): Remove setting of ancestor.
+
2021-05-07 Andrew Burgess <andrew.burgess@embecosm.com>
* guile/guile-internal.h (gdbscm_safe_source_script): Change
do not emit two required attributes (@samp{DW_AT_call_file} and
@samp{DW_AT_call_line}); @value{GDBN} does not display inlined
function calls with earlier versions of @value{NGCC}. It instead
-displays the arguments and local variables of inlined functions as
-local variables in the caller.
+displays local variables of inlined functions as local variables in
+the caller.
The body of an inlined function is directly included at its call site;
unlike a non-inlined function, there are no instructions devoted to
struct partial_die_info *find_partial_die (sect_offset sect_off);
- /* If this CU was inherited by another CU (via specification,
- abstract_origin, etc), this is the ancestor CU. */
- dwarf2_cu *ancestor;
-
/* Get the buildsym_compunit for this CU. */
buildsym_compunit *get_builder ()
{
if (m_builder != nullptr)
return m_builder.get ();
- /* Otherwise, search ancestors for a valid builder. */
- if (ancestor != nullptr)
- return ancestor->get_builder ();
-
return nullptr;
}
};
break;
case DW_TAG_formal_parameter:
{
- /* If we are inside a function, mark this as an argument. If
- not, we might be looking at an argument to an inlined function
- when we do not have enough information to show inlined frames;
- pretend it's a local variable in that case so that the user can
- still see it. */
- struct context_stack *curr
- = cu->get_builder ()->get_current_context_stack ();
- if (curr != nullptr && curr->name != nullptr)
- SYMBOL_IS_ARGUMENT (sym) = 1;
+ SYMBOL_IS_ARGUMENT (sym) = 1;
attr = dwarf2_attr (die, DW_AT_location, cu);
if (attr != nullptr)
{
*ref_cu = target_cu;
temp_die.sect_off = sect_off;
- if (target_cu != cu)
- target_cu->ancestor = cu;
-
return (struct die_info *) htab_find_with_hash (target_cu->die_hash,
&temp_die,
to_underlying (sect_off));
struct dwarf2_cu **ref_cu)
{
struct die_info temp_die;
- struct dwarf2_cu *sig_cu, *cu = *ref_cu;
+ struct dwarf2_cu *sig_cu;
struct die_info *die;
dwarf2_per_objfile *per_objfile = (*ref_cu)->per_objfile;
}
*ref_cu = sig_cu;
- if (sig_cu != cu)
- sig_cu->ancestor = cu;
return die;
}