From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Ulrich Weigand" <uweigand@de.ibm.com>,
Thiago Jung Bauermann <bauerman@br.ibm.com>
Subject: Re: [rfc] More intelligent indenting of multi-line table entries (Re: [RFA] Implement support for PowerPC BookE ranged breakpoints)
Date: Fri, 25 Feb 2011 14:46:00 -0000 [thread overview]
Message-ID: <201102251444.17070.pedro@codesourcery.com> (raw)
In-Reply-To: <201102242041.p1OKfCYx021152@d06av02.portsmouth.uk.ibm.com>
On Thursday 24 February 2011 20:41:12, Ulrich Weigand wrote:
> 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.
Whoops. Guilty, but it goes further back than that. It looks
like it got broken when we made the "Num" column wider:
7.0:
Num Type Disp Enb Address What
1 breakpoint keep y 0x080912fb in internal_error
at ../../src/gdb/utils.c:1048
6.0:
Num Type Disp Enb Address What
1 breakpoint keep y 0x08122147 in internal_error
at ../../gdb-6.0/gdb/utils.c:807
Shows how fragile that code was. Makes me wonder about making
that column's width dynamic as well.
> 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.
>
> Tested on i386-linux and by manual inspection of line wrapping.
>
> Any comments?
Looks great to me.
I've mentioned this before, but I think it'd really be nice
that the table layout support was reworked to be able to auto
wrap (and size perhaps) columns nicely, à la emacs' org-mode,
vis:
| Num | Name | What | Other column |
|-----+--------------+----------+--------------|
| 1 | foo bar | foo | another |
| | | bar what | broken |
| | | | sentence |
|-----+--------------+----------+--------------|
| 2 | the other | what? | yummy |
so that all colums would line-break nicely without
messing their rightmost columns. (without the guide
lines, of course).
--
Pedro Alves
next prev parent reply other threads:[~2011-02-25 14:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 1:54 [RFA] Implement support for PowerPC BookE ranged breakpoints Thiago Jung Bauermann
2011-01-28 9:39 ` Eli Zaretskii
2011-01-31 19:07 ` Thiago Jung Bauermann
2011-01-31 20:39 ` Eli Zaretskii
2011-02-17 15:49 ` Ulrich Weigand
2011-02-23 20:50 ` Thiago Jung Bauermann
2011-02-24 20:45 ` [rfc] More intelligent indenting of multi-line table entries (Re: [RFA] Implement support for PowerPC BookE ranged breakpoints) Ulrich Weigand
2011-02-25 14:46 ` Pedro Alves [this message]
2011-02-28 15:33 ` [rfc] More intelligent indenting of multi-line table entries (Re: [RFA] Implement support for PowerPC BookE ranged breakpoin Ulrich Weigand
2011-02-28 16:34 ` [commit] Remove unused parameter (Re: [rfc] More intelligent indenting of multi-line table entries) Ulrich Weigand
2011-02-25 15:33 ` [rfc] More intelligent indenting of multi-line table entries (Re: [RFA] Implement support for PowerPC BookE ranged breakpoints) Thiago Jung Bauermann
2011-02-28 17:08 ` [RFA] Implement support for PowerPC BookE ranged breakpoints Ulrich Weigand
2011-03-12 2:03 ` Thiago Jung Bauermann
2011-03-12 16:44 ` Thiago Jung Bauermann
2011-03-14 20:50 ` Ulrich Weigand
2011-03-16 6:07 ` Thiago Jung Bauermann
2011-03-16 18:00 ` Ulrich Weigand
2011-03-14 21:02 ` Ulrich Weigand
2011-03-28 16:50 ` Thiago Jung Bauermann
2011-03-29 13:10 ` Ulrich Weigand
2011-03-31 15:41 ` Thiago Jung Bauermann
2011-03-31 16:04 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201102251444.17070.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=bauerman@br.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox