2015-05-29 Andreas Schwab Jan Kratochvil PR symtab/18392 * dwarf2-frame-tailcall.c (pretended_chain_levels): Correct assertion. * dwarf2loc.c (chain_candidate): Likewise. diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c index b412a5b..f964ab2 100644 --- a/gdb/dwarf2-frame-tailcall.c +++ b/gdb/dwarf2-frame-tailcall.c @@ -197,7 +197,7 @@ pretended_chain_levels (struct call_site_chain *chain) return chain->length; chain_levels = chain->callers + chain->callees; - gdb_assert (chain_levels < chain->length); + gdb_assert (chain_levels <= chain->length); return chain_levels; } diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 3aa8ddd..68d6cb4 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -825,9 +825,9 @@ chain_candidate (struct gdbarch *gdbarch, struct call_site_chain **resultp, /* See call_site_find_chain_1 why there is no way to reach the bottom callee PC again. In such case there must be two different code paths to reach - it, therefore some of the former determined intermediate PCs must differ - and the unambiguous chain gets shortened. */ - gdb_assert (result->callers + result->callees < result->length); + it. Still it may CALLERS+CALLEES==LENGTH in the case of optional + tail-call calling itself. */ + gdb_assert (result->callers + result->callees <= result->length); } /* Create and return call_site_chain for CALLER_PC and CALLEE_PC. All the