From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99645 invoked by alias); 16 Oct 2017 22:21:10 -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 99635 invoked by uid 89); 16 Oct 2017 22:21:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=enemy, achieving, Xavier, xavier X-HELO: mailsec117.isp.belgacom.be Received: from mailsec117.isp.belgacom.be (HELO mailsec117.isp.belgacom.be) (195.238.20.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Oct 2017 22:21:07 +0000 IronPort-PHdr: =?us-ascii?q?9a23=3AszDNkR3M550rncNlsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seIfI/ad9pjvdHbS+e9qxAeQG96Ku7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuro?= =?us-ascii?q?EopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZv?= =?us-ascii?q?JuTyB4Xek9m72/q89pDXYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+?= =?us-ascii?q?VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfM?= =?us-ascii?q?QA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7Vq4/Vyi84Kh3SR/okC?= =?us-ascii?q?YHOCA/8GHLkcx7kaZXrAu8qxBj34LYZYeYP+d8cKzAZ9MXXWlPUNtRWSJfDI2z?= =?us-ascii?q?bYUPAPYGM+lXoIfwvEcOoBikCAWwHu7j1j1Fi3nr1qM6yeQhFgTG0RQ6EdIOsX?= =?us-ascii?q?TUqNT1NL8KUe+r0aLHzS/Mb+lR2Tfk9YjIcw4uoeuXXbltdsfR0UkvFwLBjlWR?= =?us-ascii?q?sYzlJy2a2v4DsmeB9epgUvuvi3Mmqw5vuDiv3dwhipLKhoMVzFDL6zl5zJwuKt?= =?us-ascii?q?KmUUN2Z8OvHphItyyCKod6XscvT3t1tCs017EKo4O3cDYXxJg9xBPSafqKeJWS?= =?us-ascii?q?7B35TuaeOzJ4iWpgeLK4mhm971Ctyvb5VsmoyFZKqTdFksXUunANyRPT7s+HR+?= =?us-ascii?q?N4/ki8wTqP1gbT5f9YIU0siKbXN5oszqQtmpcdrEjPBDL6lFvrgKOMdUgp+PCk?= =?us-ascii?q?6+H9bbXnop+cOZV0igb7Mqk2gsy/AeU4MgwPX2iD4eSzyqfv/EPjT7VQif02i7?= =?us-ascii?q?TZsJHEKsQBva60GBRV0oUj6ha5ETimzM4UkmIZI15dYhKIk5DpO03SIPD/Ffq/?= =?us-ascii?q?mVOskDZxx//cOL3uH47AIWLen7j7Ybl97FRcxxQpwd9D4JJUD6kLIOjvVU/pqN?= =?us-ascii?q?zYEhg5PhS7w+n6E9pxz5seVniTAqCFMKPdr0SI6/k0I+mLeY8VoiryJOYr5vH0?= =?us-ascii?q?l382h0URfa6z3ZsYOziEGaFWKluYbGCkuNAAC24MskJqVuvrklSEXRZaa3+5WL?= =?us-ascii?q?gxoDo8DdTiRYjPTMW1iaCK3CqgNoZRe3pNB0+FC3qucJ+LCNkWbyfHGs9glj0c?= =?us-ascii?q?TbXpdIY70giztQLg0PIzNurV/iwArZ+ly9Fv4PTOlBwo7hRvDNWb3n3LRWwizT?= =?us-ascii?q?BAfCM/wK0q+R818VyEy6UtxqUATdE=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2C9AgCcL+VZ/1d5g21cGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFQEBAQECAQEBAQgBAQEBgzSBUoNWS4sTkDgvAZYPggQKhTsChFlDFQE?= =?us-ascii?q?BAQEBAQEBAQEBaihCEIFmJAGCQQEFIw8BIzMIAxgCAhEVAgI5HgYBijOqe4Ini?= =?us-ascii?q?3KBDoIfg1iBaoIcgQ6EQIEEglSCYQWhSIIvkjyTFpVvgTk1IoFZd2GCZYJbHIF?= =?us-ascii?q?pPoI7iRcBAQE?= X-IPAS-Result: =?us-ascii?q?A2C9AgCcL+VZ/1d5g21cGgEBAQECAQEBAQgBAQEBFQEBAQE?= =?us-ascii?q?CAQEBAQgBAQEBgzSBUoNWS4sTkDgvAZYPggQKhTsChFlDFQEBAQEBAQEBAQEBa?= =?us-ascii?q?ihCEIFmJAGCQQEFIw8BIzMIAxgCAhEVAgI5HgYBijOqe4Ini3KBDoIfg1iBaoI?= =?us-ascii?q?cgQ6EQIEEglSCYQWhSIIvkjyTFpVvgTk1IoFZd2GCZYJbHIFpPoI7iRcBAQE?= Received: from 87.121-131-109.adsl-dyn.isp.belgacom.be (HELO md) ([109.131.121.87]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 17 Oct 2017 00:21:03 +0200 Message-ID: <1508192463.28654.3.camel@skynet.be> Subject: Re: [RFA v3] enable/disable sub breakpoint range From: Philippe Waroquiers To: Xavier Roirand , gdb-patches@sourceware.org Date: Mon, 16 Oct 2017 22:21:00 -0000 In-Reply-To: <7cf5c60b-4bab-1e91-61dd-f580bf417b12@adacore.com> References: <83lgks1e1h.fsf@gnu.org> <7cf5c60b-4bab-1e91-61dd-f580bf417b12@adacore.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00480.txt.bz2 On Fri, 2017-10-06 at 10:54 +0200, Xavier Roirand wrote: > Le 10/3/17 à 6:02 PM, Pedro Alves a écrit : > > We'd do the same to breakpoint commands, i.e., commands that take > > an breakpoint/location list would xref the description of > > breakpoint > > lists. > > > > See commit 5d5658a1d3c3 ("Per-inferior/Inferior-qualified thread > > IDs") > > for how that looked like before support for '*' ranges was added. > > > > (And now I wonder whether it'd make sense to model the breakpoint > > number parsing on a simplified version of the thread ID number > > parsing.  See gdb/tid-parse.h / tid_range_parser.) > > > > Thanks, > > Pedro Alves > > > We have several ways for achieving this, especially when taking the  > C++ization of the code in account. What do you think would be the > best  > approach: > > - commit patch I've done as a first step, then propose a new patch  > including '.*' support ? > > - write a breakpoint location range parser similar to the tid (for  > thread) one in pure C style including the '.*' support ? In that > case  > what about the C++ization ? Would it be done in the future ? > > - Change the patch I've proposed to integrate '.*' support in the > new  > C++ style function I wrote ? > > Something else ? IMO, if there are a number of breakpoint related commands that benefits from breakpoints range and/or breakpoints location range, a C++ parser inspired from tid parser looks a good approach. Today, however, it looks like only the enable/disable commands are accepting a bp loc. We might envisage to convert other commands to work on bp loc rather than on bp, but that looks like a much bigger work. For example, 'commands' today associates the list of commands to run with the bp, and not with each bp loc. Similarly, 'enable once' is on the bp, as the hit count is maintained per bp, and not per bp loc. Same for 'condition', 'delete', 'enable count/delete/once' So, with the current state of the breakpoints related commands, IIUC, only enable/disable are ready to work with bp loc. When another breakpoint related command is converted to work on bp loc, then a "general bp set/bp range/bp loc/bp loc range' parser would be interesting. In the meantime, it looks to me that 'perfect is the enemy of good' and that the current V3 patch looks good enough for the moment. My 2 cents ... Philippe Note: at my day job, I am a (paying) Adacore customer, and I suggested to Adacore this enhancement of enable/disable to support bp loc ranges. So, the above 2 cents opinion that the patch is good enough might be somewhat biased.