From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22311 invoked by alias); 5 Dec 2001 19:59:24 -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 22290 invoked from network); 5 Dec 2001 19:59:24 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 5 Dec 2001 19:59:24 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id fB5JxNu03477 for ; Wed, 5 Dec 2001 11:59:23 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Wed, 5 Dec 2001 11:59:18 -0800 Received: from [17.202.40.220] (inghji.apple.com [17.202.40.220]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id fB5JxI201199; Wed, 5 Dec 2001 11:59:18 -0800 (PST) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Wed, 05 Dec 2001 11:59:00 -0000 Subject: Re: Bug with lists in tables in ui-out.c From: Jim Ingham To: Andrew Cagney CC: GDB Patches Message-ID: In-Reply-To: <3C0DCE7C.4090407@cygnus.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2001-12/txt/msg00144.txt.bz2 On 12/4/01 11:36 PM, "Andrew Cagney" wrote: >> Turns out if you have an element of a table that is a list or tuple, then >> the current ui-out table code chokes. verify_field_alignment doesn't know >> that each of the elements of the sublist are not separate table elements, so >> it throws an error at the first one it sees. The following patch fixes this >> bug. > > Thinking about this some more, I suspect you're constructing something like: > > table={hdr={...},body=[{{}, ...},...}]} > > or as a code sequence: > > ..._body() > ui_out_tuple_begin(); /*row*/ > ui_out_tupple_begin(); /* element - non-standard */ > ui_out_field (.....) > > I'm wondering if a table is even applicable in this case. How exactly > should the header formatting information, for instance, be interpreted > when there is more than one entry. > > Would you have an example? > > Andrew > > > Andrew, The example is the table that "info break" makes. In FSF gdb, you only emit table headers for the first 6 columns, and if there are commands, they are added to the bkpt tuple (and so formally should be other columns in the table), but there is no equivalent entry in the header list. The table code doesn't require that all data in a table row have an equivalent header entry, so this works, but this is just a bit bogus... Somebody here got annoyed by this and added table headers for the other columns - mostly so users could see what the columns mean. In this case, the list that is being added to the table is the list of breakpoint commands. Jim -- +==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+== Jim Ingham jingham@apple.com Developer Tools - gdb