From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10221 invoked by alias); 30 Jun 2011 21:35:59 -0000 Received: (qmail 10213 invoked by uid 22791); 30 Jun 2011 21:35:59 -0000 X-SWARE-Spam-Status: No, hits=-6.9 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; Thu, 30 Jun 2011 21:35:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5ULZFxO016739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Jun 2011 17:35:15 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5UL04hL023081; Thu, 30 Jun 2011 17:00:05 -0400 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 p5UL02AG029246; Thu, 30 Jun 2011 17:00:03 -0400 From: Tom Tromey To: Eli Zaretskii Cc: brobecker@adacore.com, gdb-patches@sourceware.org Subject: Re: [RFC] canonical linespec and multiple breakpoints ... References: <20110505162855.GA2546@adacore.com> <83bozgmhil.fsf@gnu.org> <83k4dcd1bh.fsf@gnu.org> Date: Thu, 30 Jun 2011 21:35:00 -0000 In-Reply-To: <83k4dcd1bh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 May 2011 10:56:02 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (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: 2011-06/txt/msg00501.txt.bz2 Eli> Maybe a useful interim step would be reworking the description you Eli> posted into a concise list of broad use case classes and issues that Eli> need to be solved in each class. We can then brainstorm possible Eli> solutions against that list. Here are the various scenarios in a more CLI-centric way. I think it is important to consider how a proposed plan handles each one. Note that in many cases the content of the linespec is unimportant, nearly any of them can be made to be ambiguous; this happens in real programs. 1. Break on an ambiguously-named function. $ gdb gdb (gdb) break parse_number Today we pick one: Breakpoint 1 at 0x7e7a54: file ../../src/gdb/p-exp.y, line 856. 2. The same, but with a file:line. 3. Set a breakpoint at a SystemTap probe, the thing that started all this: (gdb) break probe:longjmp This one (in Fedora 15 glibc) happens to have 2 locations. 4. Set a pending breakpoint. (gdb) break lib_function 5. The same, but the pending name is ambiguous. 6. Set a breakpoint that has a match in the inferior. Then the inferior loads a .so to make the linespec ambiguous. 7. 'break main', then start multiple inferiors 8. Any of the above, but with a breakpoint condition. Of particular importance is the case where the condition cannot be parsed in one location. 9. An ambiguous linespec where one match has debuginfo and another does not. I left off the MI and Python stuff. I don't think those will have a significant impact on the choices; the question is really how we want the user to interact with GDB. I will post my proposal and rundown of the scenarios separately. Tom