From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22712 invoked by alias); 14 Mar 2011 20:01:22 -0000 Received: (qmail 22700 invoked by uid 22791); 14 Mar 2011 20:01:21 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate1.uk.ibm.com (HELO mtagate1.uk.ibm.com) (194.196.100.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Mar 2011 20:01:10 +0000 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p2EK17tr031218 for ; Mon, 14 Mar 2011 20:01:07 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2EK1Pqt1724646 for ; Mon, 14 Mar 2011 20:01:25 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2EK16Ag030746 for ; Mon, 14 Mar 2011 14:01:06 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p2EK156a030714; Mon, 14 Mar 2011 14:01:05 -0600 Message-Id: <201103142001.p2EK156a030714@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 14 Mar 2011 21:01:05 +0100 Subject: Re: [RFA] Implement support for PowerPC BookE ranged breakpoints To: bauerman@br.ibm.com (Thiago Jung Bauermann) Date: Mon, 14 Mar 2011 20:50:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (gdb-patches ml) In-Reply-To: <1299896013.9288.189.camel@hactar> from "Thiago Jung Bauermann" at Mar 11, 2011 11:13:33 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-03/txt/msg00745.txt.bz2 Thiago Jung Bauermann wrote: > On Fri, 2011-03-11 at 21:36 -0300, Thiago Jung Bauermann wrote: > > On Mon, 2011-02-28 at 17:52 +0100, Ulrich Weigand wrote: > > > Do we really need to make a new ui_out_ function for this; this > > > seems a bit of a special case for that. Why don't you just generate > > > the output here? (Note that here you might want to use a temporary > > > stream like the one you had in the above functions but never used > > > there ...) > > > > I think I was using that function somewhere else in a previous > > incarnation of this patch series, so it stayed. I didn't think it was a > > problem since it is analogous to other functions in ui-out.c. > > I forgot to mention that in this version I don't add a new ui_out_ > function and instead use ui_out_field_fmt in > print_one_detail_ranged_breakpoint. I didn't even need a temporary > stream. Well yes, but by duplicating the logic how platform-specific addresses are printed ... I was hoping to avoid that. The idea is that maybe at some point in the future we will support more complex address output formats (e.g. segmented addresses), and it would be good to have as few place as possible that need to be changed to do so. Thus I'd prefer to not duplicate the logic in ui_out_field_core_addr, but rather just call it twice (using a temporary stream). Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com