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]
Other format: [Raw text]

Fix sim/cris/traps.c build error on freebsd


Spotted on alpha-unknown-freebsd5.3.  sigaction(2)
shows a prominent "#define sa_handler ..." which explains the
somewhat cryptic compilation error.  Anyways, committed.

	* cris/traps.c (cris_break_13_handler) <case
	TARGET_SYS_rt_sigaction>: Rename sa_handler, sa_flags,
	sa_restorer, sa_mask_low, sa_mask_high to target_sa_handler etc.


Index: cris/traps.c
===================================================================
RCS file: /cvs/src/src/sim/cris/traps.c,v
retrieving revision 1.1
diff -p -c -u -p -r1.1 traps.c
--- cris/traps.c	28 Jan 2005 04:29:00 -0000	1.1
+++ cris/traps.c	24 Mar 2005 01:11:31 -0000
@@ -1790,15 +1790,15 @@ cris_break_13_handler (SIM_CPU *current_
 	      }
 	    if (new_sa != 0)
 	      {
-		USI sa_handler
+		USI target_sa_handler
 		  = sim_core_read_unaligned_4 (current_cpu, pc, 0, new_sa);
-		USI sa_flags
+		USI target_sa_flags
 		  = sim_core_read_unaligned_4 (current_cpu, pc, 0, new_sa + 4);
-		USI sa_restorer
+		USI target_sa_restorer
 		  = sim_core_read_unaligned_4 (current_cpu, pc, 0, new_sa + 8);
-		USI sa_mask_low
+		USI target_sa_mask_low
 		  = sim_core_read_unaligned_4 (current_cpu, pc, 0, new_sa + 12);
-		USI sa_mask_high
+		USI target_sa_mask_high
 		  = sim_core_read_unaligned_4 (current_cpu, pc, 0, new_sa + 16);
 
 		/* We won't interrupt a syscall so we won't restart it,
@@ -1808,10 +1808,10 @@ cris_break_13_handler (SIM_CPU *current_
 		   TARGET_SA_RESTORER, so don't look at it.  For the
 		   time being, we don't nest sighandlers, so we
 		   ignore the sa_mask, which simplifies things.  */
-		if ((sa_flags != 0
-		     && sa_flags != TARGET_SA_RESTART
-		     && sa_flags != (TARGET_SA_RESTART|TARGET_SA_SIGINFO))
-		    || sa_handler == 0)
+		if ((target_sa_flags != 0
+		     && target_sa_flags != TARGET_SA_RESTART
+		     && target_sa_flags != (TARGET_SA_RESTART|TARGET_SA_SIGINFO))
+		    || target_sa_handler == 0)
 		  {
 		    sim_io_eprintf (sd, "Unimplemented rt_sigaction "
 				    "syscall (0x%lx, "
@@ -1820,14 +1820,15 @@ cris_break_13_handler (SIM_CPU *current_
 				    "0x%lx)\n",
 				    (unsigned long) arg1,
 				    (unsigned long) arg2,
-				    sa_handler, sa_flags, sa_restorer,
-				    sa_mask_low, sa_mask_high,
+				    target_sa_handler, target_sa_flags,
+				    target_sa_restorer,
+				    target_sa_mask_low, target_sa_mask_high,
 				    (unsigned long) arg3);
 		    sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
 				     SIM_SIGILL);
 		  }
 
-		current_cpu->sighandler[signum] = sa_handler;
+		current_cpu->sighandler[signum] = target_sa_handler;
 
 		/* Because we may have unblocked signals, one may now be
 		   pending, if there are threads, that is.  */

brgds, H-P


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