2000-10-11 Fernando Nasser <fnasser@totem.to.cygnus.com>
From Grant Edwards <grante@visi.com> This keeps the GUI alive while running an RDI target and lets the STOP button be used to stop the target. * remote-rdi.c (arm_rdi_stop): New function. Implements target_stop. (init_rdi_ops): Set to_stop target vector entry to the above. * rdi-share/ardi.c (stop_request): New variable. Tells when a stop has been requested. (angel_RDI_stop_request): New function. Registers that a stop has been requested. (angel_RDI_ExecuteOrStep): Add call to ui_loop_hook() in loop that waits while target is executing. Initialize and reset stop_request. * rdi-share/ardi.h: Add declaration of angel_RDI_stop_request().
This commit is contained in:
parent
d93bce0603
commit
e9110f4f31
4 changed files with 41 additions and 2 deletions
|
@ -1,3 +1,18 @@
|
|||
2000-10-11 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
From Grant Edwards <grante@visi.com>
|
||||
This keeps the GUI alive while running an RDI target and lets the
|
||||
STOP button be used to stop the target.
|
||||
* remote-rdi.c (arm_rdi_stop): New function. Implements target_stop.
|
||||
(init_rdi_ops): Set to_stop target vector entry to the above.
|
||||
* rdi-share/ardi.c (stop_request): New variable. Tells when a stop
|
||||
has been requested.
|
||||
(angel_RDI_stop_request): New function. Registers that a stop has
|
||||
been requested.
|
||||
(angel_RDI_ExecuteOrStep): Add call to ui_loop_hook() in loop that
|
||||
waits while target is executing. Initialize and reset stop_request.
|
||||
* rdi-share/ardi.h: Add declaration of angel_RDI_stop_request().
|
||||
|
||||
2000-10-12 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* remote-rdp.c (remote_rdp_xfer_inferior_memory): Protoize.
|
||||
|
|
|
@ -396,6 +396,7 @@ static void (*old_handler)();
|
|||
|
||||
static bool boot_interrupted = FALSE;
|
||||
static volatile bool interrupt_request = FALSE;
|
||||
static volatile bool stop_request = FALSE;
|
||||
|
||||
static void ardi_sigint_handler(int sig) {
|
||||
#ifdef DEBUG
|
||||
|
@ -1343,10 +1344,16 @@ static void interrupt_target( void )
|
|||
Packet *packet );
|
||||
#endif
|
||||
|
||||
void angel_RDI_stop_request(void)
|
||||
{
|
||||
stop_request = 1;
|
||||
}
|
||||
|
||||
/* Core functionality for execute and step */
|
||||
static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
|
||||
unsigned ninstr)
|
||||
{
|
||||
extern int (*ui_loop_hook) (int);
|
||||
int err;
|
||||
adp_stopped_struct stopped_info;
|
||||
void* stateptr = (void *)&stopped_info;
|
||||
|
@ -1401,15 +1408,22 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
|
|||
angel_DebugPrint("Waiting for program to finish...\n");
|
||||
#endif
|
||||
|
||||
interrupt_request = FALSE;
|
||||
stop_request = FALSE;
|
||||
|
||||
signal(SIGINT, ardi_sigint_handler);
|
||||
while( executing )
|
||||
{
|
||||
if (interrupt_request)
|
||||
if (ui_loop_hook)
|
||||
ui_loop_hook(0);
|
||||
|
||||
if (interrupt_request || stop_request)
|
||||
{
|
||||
interrupt_target();
|
||||
interrupt_request = FALSE;
|
||||
stop_request = FALSE;
|
||||
}
|
||||
Adp_AsynchronousProcessing( async_block_on_nothing );
|
||||
Adp_AsynchronousProcessing( async_block_on_nothing );
|
||||
}
|
||||
signal(SIGINT, SIG_IGN);
|
||||
|
||||
|
|
|
@ -60,6 +60,8 @@ int angel_RDI_pointinq(ARMword *address, unsigned type, unsigned datatype,
|
|||
|
||||
int angel_RDI_execute(PointHandle *handle);
|
||||
|
||||
void angel_RDI_stop_request(void);
|
||||
|
||||
int angel_RDI_step(unsigned ninstr, PointHandle *handle);
|
||||
|
||||
int angel_RDI_info(unsigned type, ARMword *arg1, ARMword *arg2);
|
||||
|
|
|
@ -929,6 +929,13 @@ rdi_error_signal (int err)
|
|||
return TARGET_SIGNAL_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
arm_rdi_stop(void)
|
||||
{
|
||||
angel_RDI_stop_request();
|
||||
}
|
||||
|
||||
|
||||
/* Define the target operations structure. */
|
||||
|
||||
|
@ -944,6 +951,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
|
|||
arm_rdi_ops.to_detach = arm_rdi_detach;
|
||||
arm_rdi_ops.to_resume = arm_rdi_resume;
|
||||
arm_rdi_ops.to_wait = arm_rdi_wait;
|
||||
arm_rdi_ops.to_stop = arm_rdi_stop;
|
||||
arm_rdi_ops.to_fetch_registers = arm_rdi_fetch_registers;
|
||||
arm_rdi_ops.to_store_registers = arm_rdi_store_registers;
|
||||
arm_rdi_ops.to_prepare_to_store = arm_rdi_prepare_to_store;
|
||||
|
|
Loading…
Reference in a new issue