From: Simon Marchi <simon.marchi@polymtl.ca>
To: Matt <mattator@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: redirect gdbserver stderr/debug vim via gdbserver
Date: Tue, 07 Mar 2017 00:12:00 -0000 [thread overview]
Message-ID: <6772c1a27c8a5fbd846dd98561184568@polymtl.ca> (raw)
In-Reply-To: <CADHp1NyMpmcpk1b=JHVrqQUbV3UwG+TwJOyEmMXeOUZrcyG3VA@mail.gmail.com>
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
next prev parent reply other threads:[~2017-03-07 0:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-04 0:09 Matt
2017-03-07 0:12 ` Simon Marchi [this message]
2017-03-07 0:18 ` Matt
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=6772c1a27c8a5fbd846dd98561184568@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb@sourceware.org \
--cc=mattator@gmail.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