From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: GDB ui word wrapping broken/interferes with 'set style' ?
Date: Sat, 12 Jan 2019 17:55:00 -0000 [thread overview]
Message-ID: <1547315729.5979.9.camel@skynet.be> (raw)
In-Reply-To: <87lg3pvmdk.fsf@tromey.com>
On Sat, 2019-01-12 at 10:03 -0700, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>
> Philippe> I changed the width to 40, and then there were a few lines and spaces before the #0
> Philippe> (I am not completely sure how to reproduce the below. You might need to quit or C-c
> Philippe> a previous paged command. So maybe this is the same problem as the next one
> Philippe> (maybe some data that stays in a buffer after a quit or C-c).
>
> I think I've figured this out and I pushed a new patch to my WIP branch
> to address it. Could you try it out? I still haven't written the test
> case but hopefully this weekend.
I have tested the last version.
Just two minor things found with the pager prompt:
Using (this patched) gdb to debug itself:
(top-gdb) show height
Number of lines gdb thinks are in a page is 24.
(top-gdb) show width
Number of characters gdb thinks are in a line is 80.
(top-gdb)Â
Put a breakpoint in the style function:
(top-gdb) break style
In the inferior gdb, do
(gdb) info breakpoints
When the style breakpoint is encountered, do
(top-gdb) bt full
The 4th page prompt is not at the first column:
...
#9Â Â 0x000055b36e50b6f1 in execute_command (p=<optimized out>,Â
    p@entry=0x55b36f6d4230 "info breakp", from_tty=1)
    at ../../gdb/gdb/top.c:630
        without_whitespace = {static npos = 18446744073709551615,Â
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No
data fields>}, <No data fields>}, _M_p = 0x7ffd285ad140 ""},Â
          _M_string_length = 0, {
            --Type <RET> for more, q to quit, c to continue without paging--
For the same test, GDB 8.2 gives:
#9Â Â 0x000055b36e50b6f1 in execute_command (p=<optimized out>,Â
    p@entry=0x55b36f6d4230 "info breakp", from_tty=1)
    at ../../gdb/gdb/top.c:630
        without_whitespace = {static npos = 18446744073709551615,Â
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No
data fields>}, <No data fields>}, _M_p = 0x7ffd285ad140 ""},Â
--Type <RET> for more, q to quit, c to continue without paging--
Note that this behaviour is not very easy to produce. You might be
more (un-)lucky by using e.g.
set height 3
and then do bt full,
so as to have more page prompts.
The second thing:
-----------------
(top-gdb) set height 3
(top-gdb) info var some
All variables matching regular expression "some":
--Type <RET> for more, q to quit, c to continue without paging--
File ./complete.c:
344: rl_compignore_func_t *rl_ignore_some_completions_function;
--Type <RET> for more, q to quit, c to continue without paging--
Non-debugging symbols:
--Type <RET> for more, q to quit, c to continue without paging--
--Type <RET> for more, q to quit, c to continue without paging--
0x000055b36e7bbc20Â Â iterate_over_some_symtabs(char const*, char const*, compunit_symtab*,
compunit_symtab*, gdb::function_view<bool (symtab*)>)::__PRETTY_FUNCTION__
(top-gdb)Â
As you can see, we have 2 successive pager prompts, but no
info in between.
GDB 8.2 does not show such behaviour.
Thanks
Philippe
next prev parent reply other threads:[~2019-01-12 17:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-30 14:51 Philippe Waroquiers
2018-12-30 20:26 ` Tom Tromey
2018-12-30 23:45 ` Tom Tromey
2018-12-31 8:13 ` Philippe Waroquiers
2019-01-06 23:40 ` Tom Tromey
2019-01-07 13:46 ` Philippe Waroquiers
2019-01-07 14:49 ` Tom Tromey
2019-01-07 16:56 ` Philippe Waroquiers
2019-01-12 17:03 ` Tom Tromey
2019-01-12 17:55 ` Philippe Waroquiers [this message]
2019-01-12 21:08 ` Philippe Waroquiers
2019-01-14 3:55 ` Tom Tromey
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=1547315729.5979.9.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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