From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8712 invoked by alias); 26 Jun 2007 18:16:22 -0000 Received: (qmail 8703 invoked by uid 22791); 26 Jun 2007 18:16:21 -0000 X-Spam-Check-By: sourceware.org Received: from mail-out3.apple.com (HELO mail-out3.apple.com) (17.254.13.22) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 26 Jun 2007 18:16:19 +0000 Received: from relay7.apple.com (relay7.apple.com [17.128.113.37]) by mail-out3.apple.com (Postfix) with ESMTP id E5084A4C9B7; Tue, 26 Jun 2007 11:16:17 -0700 (PDT) Received: from relay7.apple.com (unknown [127.0.0.1]) by relay7.apple.com (Symantec Mail Security) with ESMTP id D17FE3007C; Tue, 26 Jun 2007 11:16:17 -0700 (PDT) X-AuditID: 11807125-a2466bb0000007df-3b-468157f1b480 Received: from gdbrulez.apple.com (int-si-a.apple.com [17.128.113.41]) by relay7.apple.com (Apple SCV relay) with ESMTP id BB19B30047; Tue, 26 Jun 2007 11:16:17 -0700 (PDT) Cc: Vladimir Prus , gdb@sources.redhat.com Message-Id: <81922B5F-74B3-4CCF-A690-FA58B50C94D6@apple.com> From: Jim Ingham To: Nick Roberts In-Reply-To: <18048.39066.783422.293969@kahikatea.snap.net.nz> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.891) Mime-Version: 1.0 (Apple Message framework v891) Subject: Re: 'continue' command problem Date: Tue, 26 Jun 2007 18:16:00 -0000 References: <200706041421.21962.leonp@plris.com> <200706251101.54544.ghost@cs.msu.su> <18048.39066.783422.293969@kahikatea.snap.net.nz> 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-06/txt/msg00311.txt.bz2 Ah, sorry, I just called the field "commands". It's done in breakpoint.c, in "print_it_typical" (in the Apple sources). The way I implemented it, I added a *started message to tell the UI that we had restarted because of a breakpoint command, as well as a ^continuing. I forget exactly why I chose to do it this way, it's maybe a little overdetermined. (Note, we also added a -breakpoint- commands" command to set the breakpoint commands...) Anyway, this looks like: gdbrulez:/tmp > gdb a.out GNU gdb 6.3.50-20050815 (Apple version gdb-688) (Sat Jun 16 20:20:22 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ... done (gdb) list main 1 int 2 main () 3 { 4 int foo = 0; 5 6 while (foo < 100) 7 { 8 foo++; 9 } 10 (gdb) break 8 Breakpoint 1 at 0x1fa1: file main.c, line 8. (gdb) commands 1 Type commands for when breakpoint 1 is hit, one per line. End with a line saying just "end". >print foo >continue >end (gdb) set interpreter mi1 -exec-run ~"[Switching to process 19582 local thread 0x1103]\n" =shlibs-updated ^running (gdb) ~"$1 = 0" ~"\n" ~"Continuing.\n" ^continuing *started,reason="breakpoint-command" *stopped ,time = {wallclock = "0.00153 ",user = "0.00046 ",system = "0.00098 ",start ="1182881550.648028",end="1182881550.649559"},reason="breakpoint- hit",commands="yes",times="2",bkptno="1",thread-id="1" ~"$2 = 1" ~"\n" ~"Continuing.\n" ^continuing *started,reason="breakpoint-command" *stopped ,time = {wallclock = "0.00101 ",user = "0.00034 ",system = "0.00071 ",start ="1182881550.649577",end="1182881550.650586"},reason="breakpoint- hit",commands="yes",times="3",bkptno="1",thread-id="1" ~"$3 = 2" ~"\n" ~"Continuing.\n" ^continuing Jim On Jun 25, 2007, at 9:39 PM, Nick Roberts wrote: > Jim Ingham writes: >> At Apple, we also added a "breakpoint-commands" output field to the >> "*stopped - breakpoint-hit" message. > > I can see an MI command -break-commands but no output field, > "breakpoint-commands". Which file is it in? > > > -- > Nick http://www.inet.net.nz/~nickrob