diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2/read.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 59125fd..07bc950 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-05-08 Tom Tromey <tromey@adacore.com> + + * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE + already being processed. + 2020-05-08 Tom Tromey <tom@tromey.com> * printcmd.c (struct display) <next>: Remove. diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 60b56b8..439b889 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -13102,7 +13102,16 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) for (child_die = die->child; child_die != NULL && child_die->tag; child_die = child_die->sibling) - process_die (child_die, cu); + { + /* We might already be processing this DIE. This can happen + in an unusual circumstance -- where a subroutine A + appears lexically in another subroutine B, but A actually + inlines B. The recursion is broken here, rather than in + inherit_abstract_dies, because it seems better to simply + drop concrete children here. */ + if (!child_die->in_process) + process_die (child_die, cu); + } return; case PC_BOUNDS_INVALID: return; |