public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/10720] New: GDB goes into background when "-x" and target-async are used
@ 2009-10-02  5:44 nenad at intrepid dot com
  2010-01-26 16:02 ` [Bug gdb/10720] " timo dot suoranta at acrodea dot co dot jp
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nenad at intrepid dot com @ 2009-10-02  5:44 UTC (permalink / raw)
  To: gdb-prs

I built from 20090820 snapshot and I noticed GDB suspends itself when async mode
is enabled and commands are executed from the command file. Here is a small example:

[219]% cat y.c
#include <stdio.h>

void
main()
{
printf("hello");
}
[220]% cat ygdbinit
set target-async 1
file y
b main
r
[221]% ../../gdb/wrk/gdb/gdb -x ygdbinit
GNU gdb (GDB) 6.8.50.20090820 (GDB UPC/dev)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(no debugging symbols found)
Breakpoint 1 at 0x4004c8
(no debugging symbols found)
(no debugging symbols found)

Suspended (tty output)
[222]%

If I execute "fg" command right after, gdb comes back with prompt:

nenad@screamer[222]% fg
../../gdb/wrk/gdb/gdb -x ygdbinit
(no debugging symbols found)

Breakpoint 1, 0x00000000004004c8 in main ()
(gdb)  

If I execute these commands manually from the terminal everything works.

This causes me a problem when I want to debug gdb, as the following signal is
being reported by the gdb that is used to debug my version of gdb:

Program received signal SIGTTOU, Stopped (tty output).
0x00000032ca2d5dd8 in *__GI_tcsetattr (fd=<value optimized out>,
optional_actions=<value optimized out>, 
    termios_p=0x7fffffffdd00) at ../sysdeps/unix/sysv/linux/tcsetattr.c:84
84	  retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);

and I am not able to continue debugging the gdb.

By looking on the web I found a reference to this signal and similar behavior 
back in 2004 http://sourceware.org/ml/gdb/2004-03/msg00224.html but no solution
was specified in the thread.

Has anyone seen something like this before?

-- 
           Summary: GDB goes into background when "-x" and target-async are
                    used
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: nenad at intrepid dot com
                CC: gary at intrepid dot com,gdb-prs at sourceware dot org
  GCC host triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10720

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/10720] GDB goes into background when "-x" and target-async are used
  2009-10-02  5:44 [Bug gdb/10720] New: GDB goes into background when "-x" and target-async are used nenad at intrepid dot com
@ 2010-01-26 16:02 ` timo dot suoranta at acrodea dot co dot jp
  2010-01-26 16:09 ` timo dot suoranta at acrodea dot co dot jp
  2010-01-28 13:22 ` timo dot suoranta at acrodea dot co dot jp
  2 siblings, 0 replies; 4+ messages in thread
From: timo dot suoranta at acrodea dot co dot jp @ 2010-01-26 16:02 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From timo dot suoranta at acrodea dot co dot jp  2010-01-26 16:02 -------
With 7.0.50.20100125, just having

interpreter-exec mi "-gdb-set target-async 1"
interpreter-exec mi "-target-select remote localhost:2000"

in script run with ./gdb.exe -fullname -quiet -nx -i=mi2 -x gdbinit.txt gives me
endless flood of lines like this:

&"select: Bad file descriptor.\n"
&"select: Bad file descriptor.\n"
&"select: Bad file descriptor.\n"

(needs a remote target to connect to)


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10720

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/10720] GDB goes into background when "-x" and target-async are used
  2009-10-02  5:44 [Bug gdb/10720] New: GDB goes into background when "-x" and target-async are used nenad at intrepid dot com
  2010-01-26 16:02 ` [Bug gdb/10720] " timo dot suoranta at acrodea dot co dot jp
@ 2010-01-26 16:09 ` timo dot suoranta at acrodea dot co dot jp
  2010-01-28 13:22 ` timo dot suoranta at acrodea dot co dot jp
  2 siblings, 0 replies; 4+ messages in thread
From: timo dot suoranta at acrodea dot co dot jp @ 2010-01-26 16:09 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timo dot suoranta at acrodea
                   |                            |dot co dot jp


http://sourceware.org/bugzilla/show_bug.cgi?id=10720

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/10720] GDB goes into background when "-x" and target-async are used
  2009-10-02  5:44 [Bug gdb/10720] New: GDB goes into background when "-x" and target-async are used nenad at intrepid dot com
  2010-01-26 16:02 ` [Bug gdb/10720] " timo dot suoranta at acrodea dot co dot jp
  2010-01-26 16:09 ` timo dot suoranta at acrodea dot co dot jp
@ 2010-01-28 13:22 ` timo dot suoranta at acrodea dot co dot jp
  2 siblings, 0 replies; 4+ messages in thread
From: timo dot suoranta at acrodea dot co dot jp @ 2010-01-28 13:22 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From timo dot suoranta at acrodea dot co dot jp  2010-01-28 13:22 -------
Looks like remote+async+ source command will also end up with endless loop of
&"select: Bad file descriptor.\n" -lines when script ends.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10720

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-28 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-02  5:44 [Bug gdb/10720] New: GDB goes into background when "-x" and target-async are used nenad at intrepid dot com
2010-01-26 16:02 ` [Bug gdb/10720] " timo dot suoranta at acrodea dot co dot jp
2010-01-26 16:09 ` timo dot suoranta at acrodea dot co dot jp
2010-01-28 13:22 ` timo dot suoranta at acrodea dot co dot jp

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).