From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79935 invoked by alias); 30 May 2015 07:44:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 79918 invoked by uid 89); 30 May 2015 07:44:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 30 May 2015 07:44:13 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 665772BCD79; Sat, 30 May 2015 07:44:12 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-53.ams2.redhat.com [10.36.116.53]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4U7i8Ub007607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 30 May 2015 03:44:11 -0400 Date: Sat, 30 May 2015 07:44:00 -0000 From: Jan Kratochvil To: Yao Qi Cc: Andreas Schwab , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix wrong assertions Message-ID: <20150530074408.GA13208@host1.jankratochvil.net> References: <87vbg1eg08.fsf@igel.home> <20150513140106.GB3023@host1.jankratochvil.net> <86bnh3pw61.fsf@gmail.com> <20150529113101.GA15460@host1.jankratochvil.net> <86382fpki0.fsf@gmail.com> <20150529141027.GA8159@host1.jankratochvil.net> <86y4k7ny2q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86y4k7ny2q.fsf@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00734.txt.bz2 On Fri, 29 May 2015 18:33:01 +0200, Yao Qi wrote: > OK, I understand what does top/bottom mean. Since they are numeric > values, what does these number mean? CALLERS and CALLEES together with LENGTH say what data is at what indexes of CALL_SITE: struct call_site_chain { /* Initially CALLERS == CALLEES == LENGTH. For partially ambiguous result CALLERS + CALLEES < LENGTH. */ int callers, callees, length; /* Variably sized array with LENGTH elements. Later [0..CALLERS-1] contain top (GDB "prev") sites and [LENGTH-CALLEES..LENGTH-1] contain bottom (GDB "next") sites. One is interested primarily in the PC field. */ struct call_site *call_site[1]; }; > for example, if CALLERS is 3 and > CALLEES is 2, what does the chain look like? main(0x100) -> x(0x150) -> y(0x200) -> ? -> a(0x200) -> d(0x400) And if LENGTH is 7 then: call_site[0] = main(0x100) call_site[1] = x(0x150) call_site[2] = y(0x200) call_site[3] = garbage call_site[4] = garbage call_site[5] = a(0x200) call_site[6] = d(0x400) Thanks, Jan