From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86124 invoked by alias); 30 Jun 2015 15:47:09 -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 85159 invoked by uid 89); 30 Jun 2015 15:47:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 30 Jun 2015 15:47:08 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 09630B66BF; Tue, 30 Jun 2015 15:47:07 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5UFl5ai017210; Tue, 30 Jun 2015 11:47:06 -0400 Message-ID: <5592B9F9.2090208@redhat.com> Date: Tue, 30 Jun 2015 15:47:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH 3/3] Replace TUI's select_frame hook (PR tui/13378) References: <1435667837-16337-1-git-send-email-patrick@parcs.ath.cx> <5592A2EE.40900@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00649.txt.bz2 On 06/30/2015 04:12 PM, Patrick Palka wrote: > On Tue, Jun 30, 2015 at 10:54 AM, Patrick Palka wrote: > The call to "print_source_lines (sal.symtab, sal.line, sal.line + 1, > 0);" in the else branch eventually calls "tui_show_source (sal.line);" > which adjusts the source window so that sal.line is the very first > line visible. > > I'm not sure how easy this would be to fix properly. We want to avoid > calling print_source_lines in print_frame_info when the TUI is active. > Of course, I can just guard the code with "if (tui_active)" but that's > not a good fix. Indeed. > Instead of removing the hook yet, what about making > it (tui_print_frame_info_listing_hook) a no-op in the interim? If that works, fine with me. Fine with me to leave it be as is too. > > BTW, in the CLI, this call to print_source_lines is responsible for > printing the stopped-at source line to stdout, e.g. Yeah. Maybe if we move the print_stop_event call out of normal_stop into TUI/CLI normal_stop observers, then we can tailor CLI/TUI/MI to print what they need. I actually moved it here: https://github.com/palves/gdb/commits/palves/merge-more-async-and-sync https://github.com/palves/gdb/commit/c0a88ed037b645fb9f072290000dc11044524639 That's WIP (still ugly) post 7.10 material. > > (gdb) start > .... > Temporary breakpoint 2, main () at 13378.c:9 > 9 int i = 0; // THIS LINE > (gdb) Thanks, Pedro Alves