public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "amerey at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29251] gdb stuck asking to enable debuginfod
Date: Wed, 01 Feb 2023 00:03:53 +0000	[thread overview]
Message-ID: <bug-29251-4717-sE6FOShWPt@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29251-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29251

--- Comment #5 from Aaron Merey <amerey at redhat dot com> ---
(In reply to Chad Cassady from comment #4) 
> I'm able to reproduce this by using gdb's machine interface (-i=mi). No
> matter what I type into emacs' client (gud), it asks me to choose between
> yes and no. 
> 
> To reproduce, I start the debugger in emacs and ask it to invoke gdb like
> this:
>    coredumpctl --debugger-arguments='-i=mi' debug
> 
> I am unable to use the editor client to debug this way. So I just run it in
> a terminal.
> 
> I suspect the interactive feature to confirm debuginfo downloads was not 
> developed to account for the machine interface, but have not done additional
> research to validate this hypothesis. I also do not know what role, if any,
> coredumpctl plays in handling the I/O to the gdb process, but I'm assuming
> it just invokes GDB with the core file and gets out of the way.
> 
> I am happy to conduct further investigation if someone is working on this.

Hi Chad, thanks for the reproducer. When I run 

  M-x gdb RET coredumpctl --debugger-arguments='-i=mi' debug

it looks like emacs isn't expecting the y/n prompt and instead sends gdb 
a sequence of commands '-inferior-tty-set /dev/pts/9', '-gdb-set height 0', 
etc.  Each of these commands is interpreted by gdb as a response to the y/n 
prompt.  Since the first letter isn't 'y' or 'n', gdb simply repeats
the prompt for each of these commands.  When the user tries to enter 'y' 
emacs sends gdb the command '-interpreter-exec console "y"' (likewise for 
'n'), making it impossible to answer the prompt.  If emacs runs gdb 
in a way that does not allow y/n prompts to be answered it should
probably disable gdb's interactive-mode.

However running gud-gdb with the same coredumpctl command worked for me.
The prompt only prints once and y/n inputs are received correctly. If you
want to skip this prompt you could also add 'set debuginfod enabled on/off'
to your .gdbinit file or include it as a command line argument with -iex.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2023-02-01  0:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 15:42 [Bug gdb/29251] New: " msebor at gmail dot com
2022-07-04 20:41 ` [Bug gdb/29251] " amerey at redhat dot com
2022-07-05 16:08 ` msebor at gmail dot com
2022-07-05 18:51 ` amerey at redhat dot com
2023-01-31 16:34 ` chad.cassady at gmail dot com
2023-02-01  0:03 ` amerey at redhat dot com [this message]

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=bug-29251-4717-sE6FOShWPt@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).