From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1245 invoked by alias); 13 Jan 2012 15:36:32 -0000 Received: (qmail 1048 invoked by uid 22791); 13 Jan 2012 15:36:31 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Jan 2012 15:36:05 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0DFa5iR011283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 Jan 2012 10:36:05 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0DFa5Mc009358; Fri, 13 Jan 2012 10:36:05 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id q0DFa3JH031864; Fri, 13 Jan 2012 10:36:04 -0500 From: Tom Tromey To: Sergio Durigan Junior Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Make static tracepoint with markers more OO References: Date: Fri, 13 Jan 2012 15:46:00 -0000 In-Reply-To: (Sergio Durigan Junior's message of "Fri, 13 Jan 2012 02:01:44 -0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-01/txt/msg00482.txt.bz2 >>>>> "Sergio" == Sergio Durigan Junior writes: Sergio> I have been working on this patch, and I would like some comments from Sergio> you guys. It basically implements new methods inside breakpoint_ops in Sergio> order to make static tracepoint with markers (`strace -m') more OO. I think it is very nice. Thanks. At first I thought that maybe the overlap between the create_sals_from_address and decode_linespec methods could be eliminated. But, I think the first one has to compute the text that is used when re-evaluating, but the latter just has to re-evaluate it, and so the savings would be minimal. My only comment on the design is that I wonder if the handling of pending breakpoints is done at the right place. I assume we don't support pending static tracepoint (not even sure if that can mean anything) -- but I think we probably do want to support pending SystemTap probe breakpoints. Sergio> + if (arg && strncmp (arg, "-m", 2) == 0 && isblank (arg[2])) I am not sure that isblank is ok to use. gdb doesn't use it anywhere else. I suggest just using the original check. Sergio> + /* This method will be responsible for creating a breakpoint given its SALs. Sergio> + Usually, it just calls `create_breakpoints_sal' (for ordinary Sergio> + breakpoints). However, there may be some special cases where we might Sergio> + need to do some tweaks, e.g., see Sergio> + `strace_marker_init_or_create_breakpoint_sal'. This function doesn't exist :) Tom