This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/10720] New: GDB goes into background when "-x" and target-async are used


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]