From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110097 invoked by alias); 12 Jan 2019 21:08:57 -0000 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 Received: (qmail 110081 invoked by uid 89); 12 Jan 2019 21:08:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=black X-HELO: mailsec106.isp.belgacom.be Received: from mailsec106.isp.belgacom.be (HELO mailsec106.isp.belgacom.be) (195.238.20.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 21:08:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1547327334; x=1578863334; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=HabISxIqabSPmsYVXGa57J4cASIfIH+j/urDq+HIhcc=; b=A1cWLae9yvLFqbVb4czHqCt6eoCllbw68ikCdG+mYCfypu1d+REu6Xgq gogNWlX8pQHez2vJqF1TtjaeCqvD8w==; Received: from 184.205-67-87.adsl-dyn.isp.belgacom.be (HELO md) ([87.67.205.184]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 12 Jan 2019 22:08:51 +0100 Message-ID: <1547327331.5979.11.camel@skynet.be> Subject: Re: GDB ui word wrapping broken/interferes with 'set style' ? From: Philippe Waroquiers To: Tom Tromey Cc: gdb-patches@sourceware.org Date: Sat, 12 Jan 2019 21:08:00 -0000 In-Reply-To: <1547315729.5979.9.camel@skynet.be> References: <1546181481.12900.10.camel@skynet.be> <87ftuelq21.fsf@tromey.com> <877efqlgu6.fsf@tromey.com> <1546244005.12900.20.camel@skynet.be> <87d0p91hk3.fsf@tromey.com> <1546868735.1926.19.camel@skynet.be> <878szw1q2t.fsf@tromey.com> <1546880163.1926.22.camel@skynet.be> <87lg3pvmdk.fsf@tromey.com> <1547315729.5979.9.camel@skynet.be> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00295.txt.bz2 Another thing: (top-gdb) bt #0  0x00007f6a9f44c660 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:84 #1  0x0000562224a0fe51 in poll (__timeout=-1, __nfds=, __fds=) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46 In the above, the 'at' in the first line is black, and the filename is green, as expected. When doing (top-gdb) set width 60 (top-gdb) bt #0 0x00007f6a9f44c660 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:84 #1 0x0000562224a0fe51 in poll (__timeout=-1, __nfds=, __fds=) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46 then the 'at' becomes also green. Philippe On Sat, 2019-01-12 at 18:55 +0100, Philippe Waroquiers wrote: > On Sat, 2019-01-12 at 10:03 -0700, Tom Tromey wrote: > > > > > > > "Philippe" == Philippe Waroquiers 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=,  >     p@entry=0x55b36f6d4230 "info breakp", from_tty=1) >     at ../../gdb/gdb/top.c:630 >         without_whitespace = {static npos = 18446744073709551615,  >           _M_dataplus = {> = {<__gnu_cxx::new_allocator> = { data fields>}, }, _M_p = 0x7ffd285ad140 ""},  >           _M_string_length = 0, { >             --Type for more, q to quit, c to continue without paging-- > > > > For the same test, GDB 8.2 gives: > #9  0x000055b36e50b6f1 in execute_command (p=,  >     p@entry=0x55b36f6d4230 "info breakp", from_tty=1) >     at ../../gdb/gdb/top.c:630 >         without_whitespace = {static npos = 18446744073709551615,  >           _M_dataplus = {> = {<__gnu_cxx::new_allocator> = { data fields>}, }, _M_p = 0x7ffd285ad140 ""},  > --Type 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 for more, q to quit, c to continue without paging-- > File ./complete.c: > 344: rl_compignore_func_t *rl_ignore_some_completions_function; > --Type for more, q to quit, c to continue without paging-- > > Non-debugging symbols: > --Type for more, q to quit, c to continue without paging-- > --Type 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)::__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 >