This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] The gcore command hangs without a terminal
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 Mar 2007 12:20:41 -0400
- Subject: Re: [PATCH] The gcore command hangs without a terminal
- References: <20070225122641.GA25884@host0.dyn.jankratochvil.net>
On Sun, Feb 25, 2007 at 01:26:42PM +0100, Jan Kratochvil wrote:
> Hi,
>
> The function `attach_command' sets up the terminal by calling
> target_terminal_inferior (). This makes gcore(1) to lock up when being run
> without its controlling terminal.
>
> I do not find a reason for this terminal setup as GDB does not share its
> input/output with the application in the mode of external attached program.
Unfortunately I think this is the wrong place to fix it. You're
commenting out a call to target_terminal_inferior, but there are lots
of other calls to this function - including one any time we continue
the program.
target_terminal_inferior is a call eventually to terminal_inferior.
This checks gdb_has_a_terminal (). How are you calling GDB without a
controlling terminal that still lets gdb_has_a_terminal () return
true? That's probably the right place to fix it.
--
Daniel Jacobowitz
CodeSourcery