OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 606 to Rev 607
    Reverse comparison

Rev 606 → Rev 607

/trunk/insight/gdb/remote-or1k.c
166,6 → 166,9
/* Number of interrupts while waiting for process. */
static int interrupt_count = 0;
 
/* Last value of step in resume function */
static int resume_stepped = 0;
 
/* Reason of last stop. */
static int hit_watchpoint = 0;
static int hit_breakpoint = 0;
727,10 → 730,15
/* If this doesn't work, try more severe steps. */
signal (signo, or1k_interrupt_twice);
 
/* If we are stepping we should stop the command, rather than stop
the processor */
if (resume_stepped)
quit_flag = 1;
interrupt_count++;
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "or1k_interrupt called\n");
 
interrupt_count++;
}
 
/* The user typed ^C twice. */
739,14 → 747,12
or1k_interrupt_twice (signo)
int signo;
{
/* Try everything */
quit_flag = 1;
if (interrupt_count++ >= 2) {
or1k_stop ();
signal (signo, ofunc);
interrupt_query ();
signal (signo, or1k_interrupt_twice);
interrupt_count = 1;
}
or1k_stop ();
signal (signo, ofunc);
interrupt_query ();
signal (signo, or1k_interrupt_twice);
}
 
/* Resume execution of the target process. STEP says whether to single-step
764,12 → 770,9
unsigned int val;
unsigned int ppc_insn;
unsigned int pc_insn;
/* We must accumulate interrupt counts, when stepping. This may cause some
unwanted questions, if step is interrupted several consequtive times,
but this should not be the issue with normal usage */
if (step == 0)
interrupt_count = 0;
 
/* Save step value for wait function */
resume_stepped = step;
pc = read_pc();
npc = or1k_read_spr_reg (PC_SPRNUM);
1000,11 → 1003,10
if (err)
or1k_error ("Remote failure: %s", or1k_err_name (err));
 
interrupt_count = 0;
/* Set new signal handler */
if (interrupt_count)
ofunc = signal (SIGINT, or1k_interrupt_twice);
else
ofunc = signal (SIGINT, or1k_interrupt);
ofunc = signal (SIGINT, or1k_interrupt);
 
/* Wait for risc to stop. */
do {
1020,7 → 1022,10
debug ("%i", val);
} while ((val & 1) == 0);
 
//sleep(1);
/* If we had an error, wait just a while, so user can press another ^C */
if (quit_flag)
sleep(1);
 
drr = or1k_read_spr_reg (DRR_SPRNUM);
 
/* Restore old INT signal handler */
/trunk/gdb-5.0/gdb/remote-or1k.c
166,6 → 166,9
/* Number of interrupts while waiting for process. */
static int interrupt_count = 0;
 
/* Last value of step in resume function */
static int resume_stepped = 0;
 
/* Reason of last stop. */
static int hit_watchpoint = 0;
static int hit_breakpoint = 0;
727,10 → 730,15
/* If this doesn't work, try more severe steps. */
signal (signo, or1k_interrupt_twice);
 
/* If we are stepping we should stop the command, rather than stop
the processor */
if (resume_stepped)
quit_flag = 1;
interrupt_count++;
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "or1k_interrupt called\n");
 
interrupt_count++;
}
 
/* The user typed ^C twice. */
739,14 → 747,12
or1k_interrupt_twice (signo)
int signo;
{
/* Try everything */
quit_flag = 1;
if (interrupt_count++ >= 2) {
or1k_stop ();
signal (signo, ofunc);
interrupt_query ();
signal (signo, or1k_interrupt_twice);
interrupt_count = 1;
}
or1k_stop ();
signal (signo, ofunc);
interrupt_query ();
signal (signo, or1k_interrupt_twice);
}
 
/* Resume execution of the target process. STEP says whether to single-step
764,12 → 770,9
unsigned int val;
unsigned int ppc_insn;
unsigned int pc_insn;
/* We must accumulate interrupt counts, when stepping. This may cause some
unwanted questions, if step is interrupted several consequtive times,
but this should not be the issue with normal usage */
if (step == 0)
interrupt_count = 0;
 
/* Save step value for wait function */
resume_stepped = step;
pc = read_pc();
npc = or1k_read_spr_reg (PC_SPRNUM);
1000,11 → 1003,10
if (err)
or1k_error ("Remote failure: %s", or1k_err_name (err));
 
interrupt_count = 0;
/* Set new signal handler */
if (interrupt_count)
ofunc = signal (SIGINT, or1k_interrupt_twice);
else
ofunc = signal (SIGINT, or1k_interrupt);
ofunc = signal (SIGINT, or1k_interrupt);
 
/* Wait for risc to stop. */
do {
1020,7 → 1022,10
debug ("%i", val);
} while ((val & 1) == 0);
 
//sleep(1);
/* If we had an error, wait just a while, so user can press another ^C */
if (quit_flag)
sleep(1);
 
drr = or1k_read_spr_reg (DRR_SPRNUM);
 
/* Restore old INT signal handler */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.