From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18861 invoked by alias); 19 Jun 2005 21:55:09 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18850 invoked from network); 19 Jun 2005 21:55:06 -0000 Received: from unknown (192.220.74.81) by sourceware.org with QMTP; 19 Jun 2005 21:55:06 -0000 Received: (qmail 28216 invoked by uid 19025); 19 Jun 2005 21:55:05 -0000 Date: Sun, 19 Jun 2005 21:55:00 -0000 From: Jason Molenda To: Nick Roberts Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] -stack-info-frames Message-ID: <20050619145505.A24148@molenda.com> References: <17075.21529.964955.923197@farnswood.snap.net.nz> <20050617230130.GB21178@nevyn.them.org> <20050617231425.GA22254@nevyn.them.org> <17075.30993.384316.356236@farnswood.snap.net.nz> <20050618015756.GA30430@nevyn.them.org> <17075.57612.684597.392526@farnswood.snap.net.nz> <20050618155742.GB3663@nevyn.them.org> <17076.42233.730605.834264@farnswood.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <17076.42233.730605.834264@farnswood.snap.net.nz>; from nickrob@snap.net.nz on Sun, Jun 19, 2005 at 10:49:29AM +1200 X-SW-Source: 2005-06/txt/msg00298.txt.bz2 On Sun, Jun 19, 2005 at 10:49:29AM +1200, Nick Roberts wrote: > > (gdb) > > -interpreter-exec console up > > ~"#1 0xb7d621ae in poll () from /lib/tls/i686/cmov/libc.so.6\n" > > ^done > > > Yes. The same is true for the commands that control execution: > > (gdb) > -interpreter-exec console next > ~"50\t int n1=7, n2=8, n3=9;\n" > ^done > (gdb) > > doesn't give the frontend any information. For what it's worth, here's what these look like with the Apple gdb: 86-interpreter-exec console-quoted "up" (gdb) ~"#1 0x0003eaf0 in -[SKTGraphicView createGraphicOfClass:withEvent:] (self=0x341380, _cmd=0x3411c0, theClass=0xb2014, theEvent=0x3afc90) at /Developer/Examples/AppKit/Sketch/SKTGraphicView.m:345\n" ~"345\t _creatingGraphic = [[theClass allocWithZone:[document zone]] init];\n" 86^done,MI_HOOK_RESULT=[HOOK_TYPE="frame_changed",frame="1"] In the case of a 'next', 78-interpreter-exec console-quoted "next" (gdb) ^stepping ~"Current language: auto; currently objective-c\n" 78^running 78*stopped,reason="end-stepping-range",thread-id="1" These, and a handful of other notifications, are essential if you have a GUI with a "gdb console" and you want to allow the user to change program state in the console. You'll notice that we use "console-quoted" for these. We keep the meaning of "console" to actually mean console and have a separate interpreter for the MI-quoted console output. We also have the increidbly useful ability to switch the current interpreter on the fly. e.g. (gdb) b main Breakpoint 1 at 0x2d04: file a.c, line 3. (gdb) r Starting program: /private/tmp/a.out Reading symbols for shared libraries . done Breakpoint 1, main () at a.c:3 3 puts (""); (gdb) set interpreter mi -stack-select-frame 0 ^done (gdb) set interpreter console &"set interpreter console\n" Switching to interpreter "console". ^done (gdb) fr 0 #0 main () at a.c:3 3 puts (""); (gdb) So when we're working on an MI problem, we can navigate to the area of interest via console, then switch to an MI interpreter to work the problem. > > Meanwhile, we don't have this ability. So maybe we do need > > -stack-info-frame, without an argument. > > Yes, unless Apple's proposed merge will provide the necessary information. Yeah, I would agree with Daniel that you shouldn't wait. We're working on the latest FSF -> Apple merge right now. That will take a while to get all the bugs shaken out, but even when it's finished we'll have accomplished nothing for the desirable Apple -> FSF contributions -- it just sets the stage to make those easier to do. J