From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29791 invoked by alias); 19 Jan 2008 11:17:16 -0000 Received: (qmail 29783 invoked by uid 22791); 19 Jan 2008 11:17:15 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 19 Jan 2008 11:16:56 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JGBgt-00011x-CI for gdb@sources.redhat.com; Sat, 19 Jan 2008 11:16:47 +0000 Received: from 77.246.241.246 ([77.246.241.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Jan 2008 11:16:47 +0000 Received: from ghost by 77.246.241.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Jan 2008 11:16:47 +0000 To: gdb@sources.redhat.com From: Vladimir Prus Subject: RE: -var-update using formatted value Date: Sat, 19 Jan 2008 11:17:00 -0000 Message-ID: References: <6D19CA8D71C89C43A057926FE0D4ADAA04290E3C@ecamlmw720.eamcs.ericsson.se><18320.559.863596.871051@kahikatea.snap.net.nz><6D19CA8D71C89C43A057926FE0D4ADAA2DE096@ecamlmw720.eamcs.ericsson.se><18321.5512.90696.545727@kahikatea.snap.net.nz><6D19CA8D71C89C43A057926FE0D4ADAA2DE09C@ecamlmw720.eamcs.ericsson.se> <18321.17566.890207.913917@kahikatea.snap.net.nz> <6D19CA8D71C89C43A057926FE0D4ADAA2DE09D@ecamlmw720.eamcs.ericsson.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.5 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: 2008-01/txt/msg00191.txt.bz2 Marc Khouzam wrote: > > Nick wrote: > >> "-var-update --all-values" returns the value in hex so currently I don't >> think you need it in the output of "-var-set-format". > > Can I get a clarification on what var-update is -really- supposed to do? > > I say var-update should show changes when they occur on the target > and that var-update should only be used once per varObject when a program > stops. > > You say var-update should show changes when they affect the display, > independently of if they were caused by a content change in the target or > a format change in GDB. In that case, var-update is used multiple times > without the program having stepped. > > What is var-update really meant to do? I probably need to start with some background -- if that sound obvious, just skip it. There are two important point of interactions between frontend and GDB. First is updating all of UI state after stop. This means passing really lots of information, so ideally (and MI is not there yet), we want gdb to basically report to frontend, in one big response, everything that frontend cares about that might have changed -- changes in values of variables, variables than went into scope and left it, new threads, everything. Second interaction point is explicit user command -- like evaluating a given expression, setting a breakpoint, or changing variable format. The amount of data here is limited, and we don't need to optimize this very hard. So, -var-update reports to frontend all variables that have changed since last resume. You can query each variable individually, but you might have 100 variables easily, and that will really get slow. Does this make sense? - Volodya