From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11175 invoked by alias); 9 Oct 2007 17:44:30 -0000 Received: (qmail 11164 invoked by uid 22791); 9 Oct 2007 17:44:29 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Oct 2007 17:44:25 +0000 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id l99HiI0B023467 for ; Tue, 9 Oct 2007 10:44:19 -0700 Received: from ug-out-1314.google.com (ugeo2.prod.google.com [10.66.166.2]) by zps37.corp.google.com with ESMTP id l99HiA8l023721 for ; Tue, 9 Oct 2007 10:44:18 -0700 Received: by ug-out-1314.google.com with SMTP id o2so142081uge for ; Tue, 09 Oct 2007 10:44:17 -0700 (PDT) Received: by 10.66.218.15 with SMTP id q15mr1009976ugg.1191951857265; Tue, 09 Oct 2007 10:44:17 -0700 (PDT) Received: by 10.66.242.13 with HTTP; Tue, 9 Oct 2007 10:44:17 -0700 (PDT) Message-ID: Date: Tue, 09 Oct 2007 17:44:00 -0000 From: "Douglas Evans" To: "Vladimir Prus" Subject: Re: template breakpoints Cc: gdb@sources.redhat.com In-Reply-To: <200710090856.29427.ghost@cs.msu.su> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200710090856.29427.ghost@cs.msu.su> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00049.txt.bz2 On 10/8/07, Vladimir Prus wrote: > On Tuesday 09 October 2007 02:35:35 Douglas Evans wrote: > > Hi. I downloaded and tried the new support. Nice. I noticed that > > while enable/disable work with the new "multiple breakpoints", > > condition/ignore/commands don't (currently) work. Is there a plan to > > support these with the new breakpoints as well? > > They are supposed to work. Can you provide a self-contained (source) program, > and a set of gdb commands that reproduce the problem? Appended is the session log. The testcase is testsuite/gdb.cp/mb-templates.cc. Note that in breakpoints.cc {enable,disable}_command do a strchr (args, '.') to watch for a.b spelled breakpoints where as {commands,ignore,condition}_command just call get_number. And delete_command calls get_number_or_range via map_breakpoint_numbers. [Assuming I'm reading the code correctly ...] Also, note that by "support" I mean one can, for example, set a condition on individual breakpoints within the multi-breakpoint(sp?). [Just making sure we're on the same page ...] Allowing the deletion of individual multi-breakpoints may be dubious (dunno) but the others seem useful. --- dje@ruffy:~/fsf/sourceware/head/obj/gdb/testsuite/gdb.cp$ ../../gdb mb-template\ s GNU gdb 6.7.50-20071009-cvs Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-linux"... Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) b mb-templates.cc:8 Breakpoint 1 at 0x8048652: file ../../../src/gdb/testsuite/gdb.cp/mb-templates.\ cc, line 8. (2 locations) (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x08048652 in void foo(int) at ../../../src/gdb/testsuite/gdb.cp/mb-\ templates.cc:8 1.2 y 0x0804867a in void foo(double) at ../../../src/gdb/testsuite/gdb.cp/mb-\ templates.cc:8 (gdb) disable 1.1 (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 1.1 n 0x08048652 in void foo(int) at ../../../src/gdb/testsuite/gdb.cp/mb-\ templates.cc:8 1.2 y 0x0804867a in void foo(double) at ../../../src/gdb/testsuite/gdb.cp/mb-\ templates.cc:8 (gdb) enable 1.1 (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x08048652 in void foo(int) at ../../../src/gdb/testsuite/gdb.cp/mb-\ templates.cc:8 1.2 y 0x0804867a in void foo(double) at ../../../src/gdb/testsuite/gdb.cp/mb-\ templates.cc:8 (gdb) commands 1.1 No breakpoint number 0. (gdb) ignore 1.1 3 bad breakpoint number: '1.1 3' (gdb) cond 1.1 Bad breakpoint argument: '1.1' (gdb) delete 1.1 warning: bad breakpoint number at or near '1.1' (gdb)