From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10002 invoked by alias); 25 Jan 2006 11:20:41 -0000 Received: (qmail 9994 invoked by uid 22791); 25 Jan 2006 11:20:41 -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; Wed, 25 Jan 2006 11:20:39 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1F1ihT-0001nR-U1 for gdb@sources.redhat.com; Wed, 25 Jan 2006 12:20:32 +0100 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jan 2006 12:20:31 +0100 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jan 2006 12:20:31 +0100 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: MI -break-info command issues Date: Wed, 25 Jan 2006 16:05:00 -0000 Message-ID: References: <20060124144449.GE28357@brasko.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00250.txt.bz2 Eli Zaretskii wrote: >> Date: Tue, 24 Jan 2006 09:44:49 -0500 >> From: Bob Rossi >> Cc: gdb@sources.redhat.com >> >> 2. The output of the command looks like this: >> > ^done,BreakpointTable={nr_rows="1",nr_cols="6", >> > hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"} >> > {width="14",alignment="-1",col_name="type",colhdr="Type"} >> > {width="4",alignment="-1",col_name="disp",colhdr="Disp"} >> > {width="3",alignment="-1",col_name="enabled",colhdr="Enb"} >> > {width="10",alignment="-1",col_name="addr",colhdr="Address"} >> > {width="40",alignment="2",col_name="what",colhdr="What"}], >> > body=[bkpt={number="2",type="breakpoint",disp="keep",enabled="y", >> > addr="0x08048464",func="main",file="main.cpp",line="6",times="1"}]} >> > >> > What is the point of producing spreadsheet-like output with columns and >> > column heading and column alignment? I'd expect that any GUI frontend >> > will have some specific representation and just ignore that extra >> > formatting. Why generate it at all? >> >> I agree, this output has always been useless to me. I would be happy to >> see it go away. > > I DON'T agree, and I think it would be a grave mistake to have this > output go away. About the worst thing a program can do is have some > information and not reveal it. Skipping unneeded information is easy; > restoring missing one is next to impossible. Well, let's see what would be missing. The number of rows is trivial to restore. The number of columns -- well, given that the number of columns given in above output is 6, while the actual number of fields is something like 8, I'm not sure what "nr_cols" means at all. Then, the column names. Any GUI can easily decide where to put each field and how to name the corresponding GUI item given a list of possible field names. I don't how it could be useful to know that gdb suggests to give label "Enb" to the "enabled" field. Then, what's "alignment"? Does gdb has a command to set preferred alignment for fields? If not, then alignment is just GDB's opinion about how GUI behave, which is not likely to be correct. The width field is completely redundant -- any GUI toolkit out there that can't auto-resize columns in a table? The extra information doesn't pertain to breakpoint itself, it's gdb opinion on formatting and is hardly usefull for machine interface. IMO, of course. - Volodya