From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16906 invoked by alias); 9 Oct 2012 08:12:04 -0000 Received: (qmail 16883 invoked by uid 22791); 9 Oct 2012 08:12:00 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Oct 2012 08:11:55 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TLUuw-0007h8-Hq from Yao_Qi@mentor.com ; Tue, 09 Oct 2012 01:11:54 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 9 Oct 2012 01:11:54 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Tue, 9 Oct 2012 01:11:53 -0700 Message-ID: <5073DC44.7090703@codesourcery.com> Date: Tue, 09 Oct 2012 08:12:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 2/2] new tracepoint downloaded MI notification. References: <1348793347-12556-1-git-send-email-yao@codesourcery.com> <1348793347-12556-3-git-send-email-yao@codesourcery.com> <5065E1E9.5040204@redhat.com> <5065E292.4000606@redhat.com> <506701EC.7040703@codesourcery.com> In-Reply-To: <506701EC.7040703@codesourcery.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg00148.txt.bz2 On 09/29/2012 10:13 PM, Yao Qi wrote: > Nowadays, location number is generated by incrementing a counter during > iterating a list of bp_location of breakpoint (in > breakpoint.c:print_one_breakpoint), so I am wondering that the > bp_location object may have the different number, if the list of > bp_locations of a breakpoint is removed due to some reasons. Looks > bp_location list of breakpoint is *not* removed except in > breakpoint_program_space_exit, after examine the source code. > > For example, > > Originally we have a tracepoint of 3 locations, > > 4 tracepoint keep y > collect $eip^M > 4.1 y 0x0804859c in func4 inf 1 > 4.2 y 0xb7ffc480 in func4 inf 2 > 4.3 y 0xb7ffc488 in func4 inf 1 > > due to some reason, bp_location on address 0xb7ffc480 is removed (for > example, inferior 2 is removed), and original bp_location 4.3 becomes 4.2. > > In short, if we can make location number persistent (unchanged for a > given bp_location object), then {number, location number} is fine, > otherwise, I'd prefer {number, address}. On the other hand, if 'adding bp_location number of a breakpoint' can be justified, I'd like to do that, and use bp_location number instead of address here. However, I am not sure whether we need add bp_location number. It is slightly overkill to do so. Any thoughts? -- Yao