From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12753 invoked by alias); 25 Feb 2011 15:15:55 -0000 Received: (qmail 12744 invoked by uid 22791); 25 Feb 2011 15:15:54 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e24smtp01.br.ibm.com (HELO e24smtp01.br.ibm.com) (32.104.18.85) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Feb 2011 15:15:49 +0000 Received: from /spool/local by e24smtp01.br.ibm.com with XMail ESMTP for from ; Fri, 25 Feb 2011 12:15:45 -0300 Received: from d24relay01.br.ibm.com ([9.8.31.16]) by e24smtp01.br.ibm.com ([10.172.0.143]) with XMail ESMTP; Fri, 25 Feb 2011 12:15:42 -0300 Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1PFDUdX991474 for ; Fri, 25 Feb 2011 12:13:30 -0300 Received: from d24av04.br.ibm.com (loopback [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1PFFNkD003958 for ; Fri, 25 Feb 2011 12:15:23 -0300 Received: from [9.78.137.234] ([9.78.137.234]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p1PFFNwk003953; Fri, 25 Feb 2011 12:15:23 -0300 Subject: Re: [rfc] More intelligent indenting of multi-line table entries (Re: [RFA] Implement support for PowerPC BookE ranged breakpoints) From: Thiago Jung Bauermann To: Ulrich Weigand Cc: gdb-patches ml In-Reply-To: <201102242041.p1OKfCYx021152@d06av02.portsmouth.uk.ibm.com> References: <201102242041.p1OKfCYx021152@d06av02.portsmouth.uk.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 25 Feb 2011 15:33:00 -0000 Message-ID: <1298646937.3009.9.camel@hactar> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit x-cbid: 11022515-6842-0000-0000-00000076A185 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00769.txt.bz2 On Thu, 2011-02-24 at 21:41 +0100, Ulrich Weigand wrote: > I'll get back to you with a full review of the latest patch, I just wanted > to quickly address one specific issue: > > So the whole point of the wrap_indent is to make sure that if the > description of a breakpoint location is too long to fit into one > line, it is wrapped at the correct point. That point happens to > be the column named "what" in the breakpoint UI table. > > Now the thing is, the UI table layer already knows exactly where > that column starts, so it is kind of pointless to attempt to > re-compute that offset. In particular, since the code currently > gets it completely wrong anyway: at some point, another column of > variable size was added --see print_type_col_width in breakpoint_1-- > but the wrap_indent logic was never updated. Hum, I guess it's high time for me to learn about GDB's printing mechanisms... > My thought was to remove that redundancy completely, and simply > ask the UI table layer for the correct position. It turns out > that this needs some new functionality exported from that layer, > but a simply query for the field information you originally > passed to that layer suffices. > > The following patch implements this suggestion; it fixes the currently > broken indentation and gets rid of the silly arguments to the > print_breakpoint_location function. Thank you very much for working on this! I really appreciate your help. > Any comments? It looks great. -- []'s Thiago Jung Bauermann IBM Linux Technology Center