From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11692 invoked by alias); 25 Jan 2006 17:39:50 -0000 Received: (qmail 11682 invoked by uid 22791); 25 Jan 2006 17:39:50 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jan 2006 17:39:47 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-215-153.inter.net.il [83.130.215.153]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DLB33096 (AUTH halo1); Wed, 25 Jan 2006 19:38:39 +0200 (IST) Date: Wed, 25 Jan 2006 19:42:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb@sources.redhat.com In-reply-to: (message from Vladimir Prus on Wed, 25 Jan 2006 14:11:47 +0300) Subject: Re: MI -break-info command issues Reply-to: Eli Zaretskii References: <20060124144449.GE28357@brasko.net> 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/msg00253.txt.bz2 > From: Vladimir Prus > Date: Wed, 25 Jan 2006 14:11:47 +0300 > > >> 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? All of your questions are explained in gdbint.texinfo, ui_out functions are a piece of internals that _is_ documented, for a change. > 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. This output is produced by the UI-independent output functions. So judging its usefulness from the point of view of a GUI is taking a too narrow view. The advantage of ui_out routines is that whoever writes the code defines the layout once, and then each UI gleans whatever it needs from the results. The programmer who wrote the code does not need to bother which UI needs what information. Yes, that means some of the info will be redundant or useless for certain types of UI, but that's by design, and I think the advantages of a single interface far outweigh the small annoyances of having to read and discard unused parts of the output.