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

Re: notice_signals


Brethour, Tanya (tonic) wrote:
> 
> Michael,
> 
> Well there is a function called child_wait (ie hpux_thread_wait) which
> essentially does the exact same thing.

Not the same at all.
Child_wait is for when GDB has told the child process to continue, 
and gdb now wants to wait for the child (hence "child wait") to 
stop again at some event.

notice_signals is to specify WHICH action you want gdb to take
for WHICH signal whenever that signal happens.  EG. stop for
this one, ignore that one, print a message for those other ones...


> It handles all events the occur (ie.
> system exit, signalled, creation of a thread). 

In the case of child_wait, to "handle" an event means that the 
event JUST occurred, and now you want to do something about it
(eg. stop and give the user a prompt).

In the case of notice_signals, you are essentially making a
table of actions to be associated with signals that will be
received LATER.


> Do you know why this function
> would be necessary.. and if it is.. why is it only used by solaris? 

It's used by all targets, not just by solaris.  Child_wait, or
target_wait, is ubiquitous.

> All other
> targets (at least from what I see doing a grep notice_signal) all set it to
> zero.

Ah.  Don't know about that.

> 
> So.. if anyone knows what makes this function important.. and needed aside
> from child_wait... then let me know.
> 
> Thanks!
> Tanya
> 
> > -----Original Message-----
> > From: Michael Snyder [SMTP:msnyder@redhat.com]
> > Sent: Monday, July 31, 2000 11:08 AM
> > To:   Brethour, Tanya (tonic)
> > Cc:   'gdb-patches@sourceware.cygnus.com'
> > Subject:      Re: notice_signals
> >
> > Brethour, Tanya (tonic) wrote:
> > >
> > > Hello..
> > >
> > > I was curious if anyone knew what the notice_signals function (ie.
> > > hpux_thread_notice_signals, child_ops_to.notice_signals,
> > > procfs_notice_signals) is trying to accomplish. Is this needed for ALL
> > > platforms.. or what is the criteria to tell if it is needed?
> >
> >
> > Hi,
> >
> > "notice_signals" basically tells GDB what it should do
> > when the child process gets a signal.  Ie stop and
> > prompt the user, ignore the signal and continue,
> > let the child receive the signal, etc.  I would think
> > it is necessary for any target that uses signals.
> >
> > Michael
> >

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