From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3095 invoked by alias); 17 Dec 2013 10:09:29 -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 3085 invoked by uid 89); 17 Dec 2013 10:09:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 ESMTP; Tue, 17 Dec 2013 10:09:25 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBHA9MSR022904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Dec 2013 05:09:22 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rBHA9Coo024991; Tue, 17 Dec 2013 05:09:21 -0500 Message-ID: <52B022C8.3090504@redhat.com> Date: Tue, 17 Dec 2013 10:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] "tfind" across unavailable-stack frames. References: <1366214779.30939.1@abidh-ubunto1104> <516F11B9.8030202@redhat.com> <52AB48B6.6040206@redhat.com> <52ABF8D7.1050805@codesourcery.com> <52AF27F7.2060500@redhat.com> <52B01328.8030707@codesourcery.com> In-Reply-To: <52B01328.8030707@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00616.txt.bz2 On 12/17/2013 09:02 AM, Yao Qi wrote: > On 12/17/2013 12:19 AM, Pedro Alves wrote: >>>> What does the last sentence mean in the comments? >>>> >> The same comment is in frame_id_build. Re. what is means, see struct frame_id: >> >> /* The frame's special address. This shall be constant through out the >> lifetime of the frame. This is used for architectures that may have >> frames that do not change the stack but are still distinct and have >> some form of distinct identifier (e.g. the ia64 which uses a 2nd >> stack for registers). This field is treated as unordered - i.e. will >> not be used in frame ordering comparisons. >> >> This field is valid only if special_addr_p is true. Otherwise, this >> frame is considered to have a wildcard special address, i.e. one that >> ^^^^^^^^^^^^^ >> matches every address value in frame comparisons. */ >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> CORE_ADDR special_addr; > > The last sentence, especially "wildcard" stuff, is still confusing to > me. Go through the usage of "special_addr", looks "special_addr" is > used only if "special_addr_p" is true. Comment "This field is valid > only if special_addr_p is true" is clear and sufficient. It is clear, but it is not as precise or sufficient. A wild card means that given these frame ids: fid1: {code_p,stack_p,special_p} fid2: {!code_p,stack_p,!special_p} fid3: {code_p,stack_p,special_p} fid4: {code_p,stack_p,!special_p} {fid1, fid2} with same stack addresses, and {fid3, fid4} with same code and stack addresses, both: frame_id_eq(fid1, fid2) frame_id_eq(fid3, fid4) return true. > I don't see > any extra information the last sentence "Otherwise, xxxxx" delivered > except confusion. The extra information indicates that e.g., frame_id_eq(fid3, fid4) above returns true, not false, as one might at first expect. Whether this whole wildcarding business is a good idea, is another story. -- Pedro Alves