GNU bug report logs - #29020
25.1; gdb-mi doesn't display prompt when attaching

Previous Next

Package: emacs;

Reported by: Mike Gulick <mgulick <at> mathworks.com>

Date: Thu, 26 Oct 2017 22:03:02 UTC

Severity: normal

Found in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 29020 <at> debbugs.gnu.org (full text, mbox):

From: Mike Gulick <mike.gulick <at> mathworks.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29020 <at> debbugs.gnu.org
Subject: Re: bug#29020: [PATCH] gdb-mi doesn't display prompt when attaching
Date: Mon, 30 Oct 2017 10:23:49 -0400
On 10/27/2017 01:35 PM, Eli Zaretskii wrote:
>> From: Mike Gulick <mike.gulick <at> mathworks.com>
>> Date: Fri, 27 Oct 2017 11:28:00 -0400
>>
>> This patch is pretty straightforward.  When we write a console message
>> to the GUD buffer, we now reset a variable that is used to determine
>> whether to print the gdb prompt on the next '^done' or '*stopped'
>> message.
> 
> Thanks, but could you please also provide a recipe that would
> demonstrate the effect of this change?
> 

Hi Eli,

Is the example I provided in the bug report sufficient?

E.g.

1) In shell:

$ sleep 1000 &
[1] 9924    # <--- NOTE PID

2) In shell:

$ emacs -Q

3) In emacs
M-x gdb
Run gdb (like this): gdb -i=mi -n

4) In *gud* buffer
(gdb) attach 9924   # <--- PID from earlier

5) Observe that (gdb) prompt is not displayed after output from GDB

With the patch, the (gdb) prompt will be displayed, e.g.

  (gdb) attach 9924
  Attaching to process 9924
  (gdb) Reading symbols from /bin/sleep...(no debugging symbols found)...done.
  Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug/.build-id/79/450f6e36287865d093ea209b85a222209925ff.debug...done.
  done.
  Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/.build-id/6f/150f33b150d6a81e26a425dd47d713d00f2d29.debug...done.
  done.
  0x00007f8f29196230 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84
  84	../sysdeps/unix/syscall-template.S: No such file or directory.
  (gdb) 

Thanks,
Mike




This bug report was last modified 7 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.