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

(patch) hpjyg15a, was Re: (patch) hpjyg15: hppah-nat.c & related


>I'd prefer the name (target_signal_p()) (Well actually I don't prefer
>that name but its more consistent with the general naming convetion :-).
>
>I'll check in a change to target.[ch] that adds the target_singal_p(). 
>Hmm, I might do it slightly differently - were getting too many separate
>places where there is code like:
>
>	#if SIG...
>	   case TARGET_SIGNAL...
>	#endif
>
>With that in, can the hppa-nat.c be re-submitted?  BTW, you might also
>split it, I think it contains two changes - the code that uses this new
>function and something else.

Sure.  Here is the part which makes use of target_signal_p (the
target.[ch] changes you are making).

Ignore the hpjyg15 patch, but use this (hpjyg15a), and the sequel I'm
cooking (hpjug15b).

ChangeLog:

1999-11-08	Jimmy Guo	<guo@cup.hp.com>

	* hppah-nat.c (require_notification_of_events): start by
        ignoring all signals and then adding back in ones we're
        interested in.

        * infrun.c (handle_command): On HP, call
          require_notification_of_events to ignore signals we don't
          care.

Index: gdb/hppah-nat.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/hppah-nat.c gdb/hppah-nat.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/hppah-nat.c	Thu Nov 11 15:59:07 1999
--- gdb/hppah-nat.c	Thu Nov 11 16:38:20 1999
***************
*** 698,703 ****
--- 698,705 ----
  #if defined(PT_SET_EVENT_MASK)
    int pt_status;
    ptrace_event_t ptrace_events;
+   int nsigs;
+   int signum;
  
    /* Instruct the kernel as to the set of events we wish to be
       informed of.  (This support does not exist before HPUX 10.0.
***************
*** 709,715 ****
       the kernel to keep certain signals hidden from us, we do it
       by calling sigdelset (ptrace_events.pe_signals, signal) for
       each such signal here, before doing PT_SET_EVENT_MASK.  */
!   sigemptyset (&ptrace_events.pe_signals);
  
    ptrace_events.pe_set_event = 0;
  
--- 711,740 ----
       the kernel to keep certain signals hidden from us, we do it
       by calling sigdelset (ptrace_events.pe_signals, signal) for
       each such signal here, before doing PT_SET_EVENT_MASK.  */
!   /* RM: The above comment is no longer true. We start with ignoring
!    * all signals, and then add the ones we are interested in. We could
!    * do it the other way: start by looking at all signals and then
!    * deleting the ones that we aren't interested in, except that
!    * multiple gdb signals may be mapped to the same host signal
!    * (eg. TARGET_SIGNAL_IO and TARGET_SIGNAL_POLL both get mapped to
!    * signal 22 on HPUX 10.20) We want to be notified if we are
!    * interested in either signal.
!    */
!   sigfillset (&ptrace_events.pe_signals);
! 
!   /* RM: Let's not bother with signals we don't care about */
!   nsigs = (int) TARGET_SIGNAL_LAST;
!   for (signum = nsigs; signum > 0; signum--)
!     {
!       if ((signal_stop_state (signum)) ||
! 	  (signal_print_state (signum)) ||
! 	  (!signal_pass_state (signum)))
! 	{
! 	  if (target_signal_p (signum))
! 	    sigdelset (&ptrace_events.pe_signals,
! 		       target_signal_to_host (signum));
! 	}
!     }
  
    ptrace_events.pe_set_event = 0;
  
Index: gdb/infrun.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/infrun.c gdb/infrun.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/infrun.c	Fri Nov  5 18:37:38 1999
--- gdb/infrun.c	Fri Nov  5 18:38:41 1999
***************
*** 3621,3626 ****
--- 3621,3633 ----
  	}
      }
  
+ 
+ #ifdef GDB_TARGET_IS_HPPA
+   /* RM: Use OS interface to ignore signals we don't care about */
+   if (target_has_execution)
+     require_notification_of_events (inferior_pid);
+ #endif
+ 
    do_cleanups (old_chain);
  }
  



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