This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix wrong assertions


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]