Re: [RFA] Implement support for PowerPC BookE ranged breakpoints

Ulrich Weigand
2011-03-14T20:01:22Z

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