This is the mail archive of the gdb-patches@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]

Re: [PATCH] The gcore command hangs without a terminal


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


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