From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21262 invoked by alias); 29 Sep 2012 14:13:07 -0000 Received: (qmail 21254 invoked by uid 22791); 29 Sep 2012 14:13:05 -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; Sat, 29 Sep 2012 14:13:00 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1THxms-00030q-Fi from Yao_Qi@mentor.com ; Sat, 29 Sep 2012 07:12:58 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 29 Sep 2012 07:12:58 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Sat, 29 Sep 2012 07:12:48 -0700 Message-ID: <506701EC.7040703@codesourcery.com> Date: Sat, 29 Sep 2012 14:13:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0 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> In-Reply-To: <5065E292.4000606@redhat.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-09/txt/msg00704.txt.bz2 On 09/29/2012 01:46 AM, Pedro Alves wrote: >> Took me a second to recall, but the reason the address is >> >necessary is multi-location tracepoints -- a tracepoint on the >> >target is identified by the { number, address } tuple. We don't >> >send over the location's sub number (like 1.1, 1.2, etc.). >> > >> >Should we mention this somewhere (other than at the tracepoint >> >packets description), so frontend people don't wonder whether they >> >can ignore the address field, and why aren't the other fields of >> >the tracepoint (like spec string) included? > And I guess the related question is, are frontends interested > in { number, address }, which is target side detail, or on > { number, location number }, which is how other breakpoints are > presented to the frontend? I would think the latter? From the frontend's point of view, {number, location number} is better, and the schema "number.location_number" has been used in "=breakpoint-modified" notification. However, if we want to use {number, location number} here, we have to guarantee that the location number is an attribute of bp_location, because: 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}. -- Yao