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]

Follow up to ARM Simulator support for RedBoot SWI.


Hi Guys,

  Doh!  I forgot to use the callback mechanism for the system calls.
  Fixed by applying this patch.

Cheers
        Nick

Index: sim/arm/armos.c
===================================================================
RCS file: /cvs/src/src/sim/arm/armos.c,v
retrieving revision 1.12
diff -c -3 -p -w -r1.12 armos.c
*** sim/arm/armos.c	9 May 2002 10:14:12 -0000	1.12
--- sim/arm/armos.c	9 May 2002 10:24:30 -0000
*************** ARMul_OSHandleSWI (ARMul_State * state, 
*** 658,665 ****
  	  return TRUE;
  
  	case 3:  /* Close.  */
! 	  state->Reg[0] = close (state->Reg[1]);
! 	  OSptr->ErrorNo = errno;
  	  return TRUE;
  
  	case 4:  /* Read.  */
--- 659,666 ----
  	  return TRUE;
  
  	case 3:  /* Close.  */
! 	  state->Reg[0] = sim_callback->close (sim_callback, state->Reg[1]);
! 	  OSptr->ErrorNo = sim_callback->get_errno (sim_callback);
  	  return TRUE;
  
  	case 4:  /* Read.  */
*************** ARMul_OSHandleSWI (ARMul_State * state, 
*** 671,684 ****
  	  return TRUE;
  
  	case 6:  /* Lseek.  */
! 	  state->Reg[0] = lseek (state->Reg[1], state->Reg[2], state->Reg[3]);
! 	  OSptr->ErrorNo = errno;
  	  return TRUE;
  
  	case 17: /* Utime.  */
! 	  state->Reg[0] = (ARMword) time (state->Reg[1]);
! 	  OSptr->ErrorNo = errno;
! 	  return (TRUE);
  
  	case 7:  /* Unlink.  */
  	case 8:  /* Getpid.  */
--- 672,689 ----
  	  return TRUE;
  
  	case 6:  /* Lseek.  */
! 	  state->Reg[0] = sim_callback->lseek (sim_callback,
! 					       state->Reg[1],
! 					       state->Reg[2],
! 					       state->Reg[3]);
! 	  OSptr->ErrorNo = sim_callback->get_errno (sim_callback);
  	  return TRUE;
  
  	case 17: /* Utime.  */
! 	  state->Reg[0] = (ARMword) sim_callback->time (sim_callback,
! 							(long *) state->Reg[1]);
! 	  OSptr->ErrorNo = sim_callback->get_errno (sim_callback);
! 	  return TRUE;
  
  	case 7:  /* Unlink.  */
  	case 8:  /* Getpid.  */


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