This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix wrong assertions
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, Andreas Schwab <schwab at linux-m68k dot org>, gdb-patches at sourceware dot org
- Date: Mon, 01 Jun 2015 12:35:02 +0100
- Subject: Re: [PATCH] Fix wrong assertions
- Authentication-results: sourceware.org; auth=none
- References: <87vbg1eg08 dot fsf at igel dot home> <20150513140106 dot GB3023 at host1 dot jankratochvil dot net> <86bnh3pw61 dot fsf at gmail dot com> <20150529113101 dot GA15460 at host1 dot jankratochvil dot net> <86382fpki0 dot fsf at gmail dot com> <20150529141027 dot GA8159 at host1 dot jankratochvil dot net>
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 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);
I am not a native English speaker, but I can't parse the comment. How
about "CALLERS + CALLEES equal to LENGTH in the case of self tail-call"?
Otherwise, the patch is OK to me.
--
Yao (éå)