From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89134 invoked by alias); 7 Mar 2017 00:12:21 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 89103 invoked by uid 89); 7 Mar 2017 00:12:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=HX-PHP-Originating-Script:rcube.php X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Mar 2017 00:12:17 +0000 Received: by simark.ca (Postfix, from userid 33) id 054581E7F5; Mon, 6 Mar 2017 19:12:16 -0500 (EST) To: Matt Subject: Re: redirect gdbserver stderr/debug vim via gdbserver X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 07 Mar 2017 00:12:00 -0000 From: Simon Marchi Cc: gdb@sourceware.org In-Reply-To: References: Message-ID: <6772c1a27c8a5fbd846dd98561184568@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00004.txt.bz2 On 2017-03-03 19:09, Matt wrote: > Hi, > > I am trying to debug a console application (neovim) with gdbserver. > I've tried turning off all debug info from gdbserver (via monitor set > debug/remote-debug ...), yet I still see "Detaching from process" > mixed up with the debugged CLI application. If it's just a cosmetic thing and want to clean up nvim's UI, you can type ctrl-L to make nvim redraw it. I don't think it's possible currently to make gdbserver silent or output somewhere else than stderr. The easiest workaround, if that fits your needs, would be to first start nvim and then attach gdbserver from another terminal. e.g.: $ gdbserver --once --attach :1234 $(pidof nvim) If you need to debug a problem that happens at the startup of the program, then it's not ideal. You can always resort to adding a sleep at the beginning to give you time to attach, or a while loop on a volatile variable that you change from GDB to let the program run. > In order to make these > messages disappear, I tried redirecting gdbserver stderr (zsh) to > 'temp': > $ gdbserver localhost:7777 ./build/bin/nvim toto 2>temp > on the other side (same computer) I connect with: > $ gdb ./build/bin/nvim > (gdb) target remote :7777 > (gdb) c > > but then nothing appears on the gdbserver terminal, i.e., I can't see > neovim interface. Why is that ? I don't know, but I would assume that nvim inherits that redirected stderr, maybe that's not good. Simon