public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdbserver tcsetpgrp() ??
@ 2003-08-04 13:05 Vijay Saha, Noida
  2003-08-04 14:12 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Vijay Saha, Noida @ 2003-08-04 13:05 UTC (permalink / raw)
  To: gdb

Hi

I have ported the gdbserver 5.3 on arm-linux target.
But as soon as debugging finishes, the target system gets logged out.

Then I had found that the "tcsetpgrp" in server.c:start_inferior() of
gdbserver was the culprit.
After commenting the line "tcsetpgrp (fileno (stderr), signal_pid);" , the
logout problem got solved !!!

I have also found that gdb-5.2 was not using this system call !!

What does this tcsetpgrp  actually doing ..?? (It has something to do with
foreground processing of terminal ..means..??)

How much is this necessary for remote debugging...??



**************************** clip of
server.c***************************************

start_inferior (char *argv[], char *statusptr)
{

  signal (SIGTTOU, SIG_DFL);
  signal (SIGTTIN, SIG_DFL);

  signal_pid = create_inferior (argv[0], argv);

  fprintf (stderr, "Process %s created; pid = %d\n", argv[0],
           signal_pid);
  signal (SIGTTOU, SIG_IGN);
  signal (SIGTTIN, SIG_IGN);

  /* chagall temp fix */
  /* when we use this function chagall gets logged out */
  //tcsetpgrp (fileno (stderr), signal_pid);

  /* Wait till we are at 1st instruction in program, return signal number.
*/
  return mywait (statusptr, 0);
}
**************************************end clip
*****************************************

Thanks and regards
Vijay

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

* Re: gdbserver tcsetpgrp() ??
  2003-08-04 13:05 gdbserver tcsetpgrp() ?? Vijay Saha, Noida
@ 2003-08-04 14:12 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2003-08-04 14:12 UTC (permalink / raw)
  To: gdb

On Mon, Aug 04, 2003 at 06:35:17PM +0530, Vijay Saha, Noida wrote:
> Hi
> 
> I have ported the gdbserver 5.3 on arm-linux target.
> But as soon as debugging finishes, the target system gets logged out.
> 
> Then I had found that the "tcsetpgrp" in server.c:start_inferior() of
> gdbserver was the culprit.
> After commenting the line "tcsetpgrp (fileno (stderr), signal_pid);" , the
> logout problem got solved !!!
> 
> I have also found that gdb-5.2 was not using this system call !!
> 
> What does this tcsetpgrp  actually doing ..?? (It has something to do with
> foreground processing of terminal ..means..??)
> 
> How much is this necessary for remote debugging...??

Remote debugging will still work, sending control-c to interrupt the
program won't.  Console handling on your target is severely broken if
that call is causing a problem.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

end of thread, other threads:[~2003-08-04 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 13:05 gdbserver tcsetpgrp() ?? Vijay Saha, Noida
2003-08-04 14:12 ` Daniel Jacobowitz

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