From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102422 invoked by alias); 12 Jan 2019 17:55:35 -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 102411 invoked by uid 89); 12 Jan 2019 17:55:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:iterate, _M_p, paging, _m_p X-HELO: mailsec110.isp.belgacom.be Received: from mailsec110.isp.belgacom.be (HELO mailsec110.isp.belgacom.be) (195.238.20.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Jan 2019 17:55:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1547315731; x=1578851731; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=PFUoLAEGPAPQ89yE2Pgznb1d0k7A7ckmUZE/czotJ/I=; b=hjvtoBllS2lhd6hzXo6L+MqHPY7NBqb/v6lG+O9tL/Fp4xustErvUbke xLXl2UaG4VK/0UcZ6ImH71CqDIc1RA==; 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 18:55:29 +0100 Message-ID: <1547315729.5979.9.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 17:55:00 -0000 In-Reply-To: <87lg3pvmdk.fsf@tromey.com> 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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00291.txt.bz2 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> = {}, }, _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> = {}, }, _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