Re: [rfc] More intelligent indenting of multi-line table entries (Re: [RFA] Implement support for PowerPC BookE ranged breakpoints)

Thiago Jung Bauermann
2011-02-25T15:15:55Z

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