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

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 361 to Rev 362
    Reverse comparison

Rev 361 → Rev 362

/trunk/insight/gdb/config/or1k/tm-or1k.h
132,15 → 132,18
#define PC_SPRNUM SPR_REG(SPR_SYSTEM_GROUP, 16)
#define SR_SPRNUM SPR_REG(SPR_SYSTEM_GROUP, 17)
#define CCR_SPRNUM(cid) SPR_REG(SPR_SYSTEM_GROUP, 4 + (cid))
#define DVR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 32)
#define DCR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 40)
#define DMR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 48)
#define DMR2_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 49)
#define DCWR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 50)
#define DCWR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 51)
#define DSR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 52)
#define DRR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 53)
#define DIR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 54)
#define EPCR_SPRNUM(cid) SPR_REG(SPR_SYSTEM_GROUP, 32 + (cid))
#define EPCR0_SPRNUM SPR_REG(SPR_SYSTEM_GROUP, 32)
 
#define DVR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DCR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DMR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 16)
#define DMR2_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 17)
#define DCWR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DCWR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DSR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 20)
#define DRR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 21)
 
#define ZERO_REGNUM (0)
#define SP_REGNUM (1)
#define FP_REGNUM (2)
153,6 → 156,7
#define VFRV_REGNUM (MAX_GPR_REGS + 6)
#define PC_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 0)
#define PS_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 1)
#define EPCR_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 2)
#define CCR_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 2)
 
/*******************************************/
177,8 → 181,7
#define DMR1_ST (0x00400000)
 
/* Changed by CZ 21/06/01 */
#define DRR_SS (0x00004000)
#define DRR_TE (0x00002000)
#define DRR_BE2 (0x00002000)
#define DRR_BE (0x00001000)
#define DRR_SCE (0x00000800)
#define DRR_RE (0x00000400)
282,7 → 285,7
 
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES (NUM_REGS * OR1K_SPR_REGSIZE)
#define REGISTER_BYTES (NUM_REGS * OR1K_GPR_REGSIZE)
 
extern void or1k_do_registers_info PARAMS ((int, int));
#define DO_REGISTERS_INFO(regnum, fp) or1k_do_registers_info(regnum, fp)
519,11 → 522,6
TARGET_STOPPED
};
 
#define REG_SPACE 0x00000000
#define REG_SPACE_END 0x7FFFFFFF
#define MEM_SPACE 0x80000000
#define MEM_SPACE_END 0xFFFFFFFF
 
/* Compare conditions for DCRx registers. */
enum enum_compare_condition
{
674,8 → 672,9
SC_RISC_DEBUG, /* 1 RISC Debug Interface chain */
SC_RISC_TEST, /* 2 RISC Test Chain */
SC_TRACE, /* 3 Trace Chain */
SC_REGISTER, /* Register Chain */
SC_BLOCK, /* Block Chains */
SC_REGISTER, /* 4 Register Chain */
SC_WISHBONE, /* 5 Wisbone Chain */
SC_BLOCK /* Block Chains */
};
 
/* See JTAG documentation about these. */
690,7 → 689,7
JI_CLAMP,
JI_CLAMPZ,
JI_HIGHZ,
JI_DEBUG,
JI_DEBUG,
JI_BYPASS = 0xF
};
 
699,7 → 698,7
#define JTAG_TSEL (0x1)
#define JTAG_QSEL (0x2)
#define JTAG_SSEL (0x3)
#define JTAG_RISCOP (0x9)
#define JTAG_RISCOP (0x4)
#define JTAG_RECWP0 (0x10)
#define JTAG_RECBP0 (0x1b)
 
/trunk/insight/gdb/config/or1k/tm-or32.h
23,4 → 23,4
 
#include "or1k/tm-or1k.h"
 
#endif TM_OR32_H
#endif
/trunk/insight/gdb/remote-or1k.c
40,6 → 40,8
#include <sys/ioctl.h>
#include <fcntl.h>
 
#define debug if (remote_debug) printf_unfiltered
 
/* The following prototype is necessary or the compiler will not
correctly promote the data argument to ULONGEST */
static void or1k_write_reg (unsigned int, ULONGEST);
149,7 → 151,7
/* Error last occured, zero = ok. */
int err = 0;
 
/* Nonzero, if we changed something. */
/* Nonzero, if we changed something (except DMR1 which is updated on every run anyway). */
int debug_regs_changed;
 
/* Number of interrupts while waiting for process. */
177,8 → 179,13
unsigned int dvr[MAX_MATCHPOINTS];
struct dcr_struct dcr[MAX_MATCHPOINTS];
 
/* Number of matchpoint users */
int matchpoint_user_count[MAX_MATCHPOINTS] = {0};
 
/* Old SIGINT handler. */
static void (*ofunc) PARAMS ((int));
 
 
/* Handle low-level error that we can't recover from. Note that just
error()ing out from target_wait or some such low-level place will cause
all hell to break loose--the rest of GDB will tend to get left in an
295,7 → 302,7
unsigned int data;
{
or1k_set_chain (SC_RISC_DEBUG);
or1k_write_reg (regno + REG_SPACE, (ULONGEST)data);
or1k_write_reg (regno, (ULONGEST)data);
}
 
/* Reads register SPR from regno. */
305,9 → 312,30
unsigned int regno;
{
or1k_set_chain (SC_RISC_DEBUG);
return or1k_read_reg (regno + REG_SPACE);
return or1k_read_reg (regno);
}
 
/* Sets mem to data. */
 
void
or1k_write_mem (addr, data)
unsigned int addr;
unsigned int data;
{
or1k_set_chain (SC_WISHBONE);
or1k_write_reg (addr, (ULONGEST)data);
}
 
/* Reads register SPR from regno. */
 
unsigned int
or1k_read_mem (addr)
unsigned int addr;
{
or1k_set_chain (SC_WISHBONE);
return or1k_read_reg (addr);
}
 
/* CZ 15/09/01 -- This is hacked in right now. This should
probably NOT be called directly, but at the moment I don't
have the time to figure out how to do it right. The problem
371,11 → 399,11
or1k_set_chain (SC_REGISTER);
val = or1k_read_reg (JTAG_RISCOP);
or1k_write_reg (JTAG_RISCOP, val | 1);
or1k_read_reg (JTAG_RISCOP);
 
/* Be cautious - disable trace. */
val = or1k_read_reg (JTAG_MODER);
or1k_write_reg (JTAG_MODER, val & ~2);
or1k_flush_pipeline ();
}
 
/* Unstalls the CPU. */
389,6 → 417,7
or1k_set_chain (SC_REGISTER);
val = or1k_read_reg (JTAG_RISCOP);
or1k_write_reg (JTAG_RISCOP, val & ~1);
or1k_read_reg (JTAG_RISCOP);
}
 
/* Resets the CPU and stalls it. */
397,6 → 426,8
or1k_reset ()
{
unsigned int val;
int i;
debug ("%08x\n", or1k_read_reg (JTAG_RISCOP));
or1k_set_chain (SC_REGISTER);
 
/* Be cautious - disable trace. */
408,15 → 439,17
/* Assert reset signal. */
or1k_write_reg (JTAG_RISCOP, val | 3);
 
/* Just do something */
for (i = 0; i < 100; i++)
or1k_read_reg (JTAG_RISCOP);
 
/* give it some time */
usleep (1000);
or1k_flush_pipeline ();
 
or1k_set_chain (SC_REGISTER); /* CZ: Changed 16/06/01...must reset
scan chain after flush_pipeline() */
or1k_set_chain (SC_REGISTER);
/* Release reset signal, but keep in stall state. */
or1k_write_reg (JTAG_RISCOP, val | 1);
or1k_flush_pipeline ();
or1k_read_reg (JTAG_RISCOP);
}
 
/* Synchronizes debug registers in memory with those on target,
494,8 → 527,11
if (current_or1k_target != NULL && current_or1k_target->to_init != NULL)
current_or1k_target->to_init (args);
 
or1k_reset ();
debug("%08x\n", read_pc ());
or1k_stall ();
debug("%08x\n", read_pc ());
usleep (1000);
 
/* Determine implementation configuration. */
or1k_implementation.VR = or1k_read_spr_reg (VR_SPRNUM);
or1k_implementation.UPR = or1k_read_spr_reg (UPR_SPRNUM);
544,8 → 580,11
if (err != 0)
error ("Cannot connect.");
 
/* Enable exceptions */
or1k_write_spr_reg (SR_SPRNUM, or1k_read_spr_reg(SR_SPRNUM) | 0x2);
 
/* Stop when breakpoint occurs. */
or1k_write_spr_reg (DSR_SPRNUM, 0x1000);
or1k_write_spr_reg (DSR_SPRNUM, 0x2000);
 
do_cleanups (old_cleanups);
 
605,6 → 644,26
print_stack_frame (selected_frame, -1, 1);
}
 
/* This is the generic stop called via the target vector. When a target
interrupt is requested, either by the command line or the GUI, we
will eventually end up here. */
static void
or1k_stop ()
{
/* Send a break or a ^C, depending on user preference. */
debug ("remote_stop called\n");
 
/* We should not stop the target immediately, since it can be in an
unfinished state. So we do a single step. This should not affect
on anything. */
or1k_stall ();
/* HW STEP. Set DMR1_ST. */
dmr1 |= DMR1_ST;
or1k_write_spr_reg (DMR1_SPRNUM, dmr1);
dmr1 &= ~DMR1_ST;
or1k_unstall ();
}
 
/* Close a connection to the remote board. */
 
static void
674,6 → 733,57
fclose (fd);
}
 
/* ^C Interrupt handling */
 
/* Ask the user what to do when an interrupt is received. */
static void
interrupt_query ()
{
target_terminal_ours ();
 
if (query ("Interrupted while waiting for the program.\n\
Give up (and stop debugging it)? "))
{
target_mourn_inferior ();
return_to_top_level (RETURN_QUIT);
}
 
target_terminal_inferior ();
}
 
static void or1k_interrupt_twice (int signo);
 
 
/* The command line interface's stop routine. This function is installed
as a signal handler for SIGINT. The first time a user requests a
stop, we call remote_stop to send a break or ^C. If there is no
response from the target (it didn't stop when the user requested it),
we ask the user if he'd like to detach from the target. */
static void
or1k_interrupt (signo)
int signo;
{
debug ("interrupt");
/* If this doesn't work, try more severe steps. */
signal (signo, or1k_interrupt_twice);
 
debug ("remote_interrupt called\n");
 
interrupt_count++;
}
 
/* The user typed ^C twice. */
 
static void
or1k_interrupt_twice (signo)
int signo;
{
debug ("interrupt2");
signal (signo, ofunc);
interrupt_query ();
signal (signo, or1k_interrupt);
}
 
/* Resume execution of the target process. STEP says whether to single-step
or to run free; SIGGNAL is the signal value (e.g. SIGINT) to be given
to the target, or zero for no signal. */
682,7 → 792,9
or1k_resume (pid, step, siggnal)
int pid, step;
enum target_signal siggnal;
{
{
debug ("pc = %08x\n", read_pc());
debug ("resume %i, %i, %i\n",step, siggnal, or1k_status);
if (or1k_status != TARGET_STOPPED)
if (or1k_status == TARGET_RUNNING)
error ("Program is already running.");
693,6 → 805,8
/* Clear reason register for later. */
or1k_write_spr_reg (DRR_SPRNUM, 0);
 
or1k_commit_debug_registers ();
 
/* Else clause added by CZ 26/06/01 */
if (step)
{
707,7 → 821,6
or1k_write_spr_reg (DMR1_SPRNUM, dmr1);
}
 
or1k_commit_debug_registers ();
/* Run the target. */
#ifdef NEW_PC_HANDLING
731,6 → 844,7
/* We can now continue normally, independent of step */
or1k_unstall ();
or1k_status = TARGET_RUNNING;
debug ("-resume %i, %i, %i\n",step, siggnal, or1k_status);
}
 
/* Wait until the remote stops, and return a wait status. */
740,8 → 854,13
int pid;
struct target_waitstatus *status;
{
unsigned long val;
unsigned long pc;
char buf[MAX_REGISTER_RAW_SIZE];
interrupt_count = 0;
 
debug ("pc = %08x\n", read_pc());
debug ("wait %i %i\n", pid, or1k_status);
/* If we have not sent a single step or continue command, then the
board is waiting for us to do something. Return a status
indicating that it is stopped. */
757,29 → 876,39
if (err)
or1k_error ("Remote failure: %s", or1k_err_name (err));
 
/* Wait for or1k DRR register to be nonzero. */
interrupt_requested = 0;
old_sigint = signal (SIGINT, or1k_request_int);
do
{
if(interrupt_requested)
{
or1k_stall();
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = TARGET_SIGNAL_INT;
or1k_status = TARGET_STOPPED;
or1k_read_trace();
return 0;
}
drr = or1k_read_spr_reg (DRR_SPRNUM);
usleep (10);
}
while (drr == 0);
/* Set new signal handler */
ofunc = signal (SIGINT, or1k_interrupt);
 
signal (SIGINT, old_sigint);
status->kind = TARGET_WAITKIND_STOPPED;
or1k_flush_pipeline ();
/* Wait for risc to stop. */
do {
or1k_set_chain (SC_REGISTER);
val = or1k_read_reg (JTAG_RISCOP);
/* When we press Ctrl-C, interrupt count is set, but we must wait
for or1k_read_reg to finish, otherwise we would interrupt transaction. */
if (interrupt_count)
or1k_stop ();
 
usleep (10);
debug ("%i", val);
} while ((val & 1) == 0);
drr = or1k_read_spr_reg (DRR_SPRNUM);
/* Restore old INT signal handler */
signal (SIGINT, ofunc);
 
/* If we encounter breakpoint, drr is not set, so we set it manually. */
if (!drr)
drr |= DRR_BE;
 
status->kind = TARGET_WAITKIND_STOPPED;
 
debug ("epcr0 = %08x\n", or1k_read_spr_reg (EPCR0_SPRNUM));
debug ("drr = %08x\n", drr);
 
pc = read_pc ();
 
if (drr & DRR_RSTE)
status->value.sig = TARGET_SIGNAL_REALTIME_33;
else if (drr & DRR_BUSEE)
806,16 → 935,22
status->value.sig = TARGET_SIGNAL_REALTIME_40;
else if (drr & DRR_BE)
status->value.sig = TARGET_SIGNAL_TRAP;
else if (drr & DRR_TE)
status->value.sig = TARGET_SIGNAL_REALTIME_41;
else if (drr & DRR_SS) /* CZ 16/09/01 */
status->value.sig = TARGET_SIGNAL_TRAP;
else
else if (drr & DRR_BE2)
{
/* PC has already stepped over the l.trap instruction. */
pc -= 4;
status->value.sig = TARGET_SIGNAL_TRAP;
} else {
status->value.sig = TARGET_SIGNAL_UNKNOWN;
warning ("Invalid exception occured.");
}
 
/* Write into PC flushes the pipeline! */
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
store_unsigned_integer (buf, REGISTER_RAW_SIZE (PC_REGNUM), pc);
supply_register (PC_REGNUM, buf);
 
/* Log remote stop. */
or1k_status = TARGET_STOPPED;
848,7 → 983,7
to do this if the instruction at the current PC has the
value BRK_INSTR_STRUCT */
 
if(b_insn == or1k_read_reg((pc >> 2) + MEM_SPACE))
if(b_insn == or1k_read_mem((pc & 3)))
{
or1k_write_spr_reg(PC_SPRNUM,value);
}
889,6 → 1024,7
}
 
or1k_read_trace ();
debug ("-wait %i %i\n", pid, or1k_status);
return 0;
}
 
905,8 → 1041,8
unsigned char buf[8];
unsigned int low, high;
addr >>= 2;
low = or1k_read_reg (addr + MEM_SPACE);
high = or1k_read_reg (addr + 1 + MEM_SPACE);
low = or1k_read_mem (addr << 2);
high = or1k_read_reg ((addr + 1) << 2);
memcpy (&buf[0], &low, 4);
memcpy (&buf[4], &high, 4);
memcpy (&low, &buf[subaddr], 4);
914,8 → 1050,7
}
else
{
addr >>= 2;
return or1k_read_reg (addr + MEM_SPACE);
return or1k_read_mem (addr);
}
}
 
933,20 → 1068,19
unsigned char buf[8];
unsigned int low, high;
addr >>= 2;
low = or1k_read_reg (addr + MEM_SPACE);
high = or1k_read_reg (addr + 1 + MEM_SPACE);
low = or1k_read_mem (addr << 2);
high = or1k_read_mem ((addr + 1) << 2);
memcpy (&buf[0], &low, 4);
memcpy (&buf[4], &high, 4);
memcpy (&buf[subaddr], &val, 4);
memcpy (&low, &buf[0], 4);
memcpy (&high, &buf[4], 4);
or1k_write_reg (addr + MEM_SPACE, low);
or1k_write_reg (addr + 1 + MEM_SPACE, high);
or1k_write_mem (addr << 2, low);
or1k_write_mem ((addr + 1) << 2, high);
}
else
{
addr >>= 2;
or1k_write_reg (addr + MEM_SPACE, val);
{
or1k_write_mem (addr, val);
}
return err;
}
982,7 → 1116,7
}
if (err)
or1k_error ("Can't read register %d(%i): %s", regno,
REGNUM_TO_SPRNUM(regno) + REG_SPACE, or1k_err_name (err));
REGNUM_TO_SPRNUM(regno), or1k_err_name (err));
}
 
/* Fetch and return instruction from the specified location. */
1023,7 → 1157,7
if (regno >= NUM_REGS)
error("Invalid register number!");
 
or1k_write_spr_reg (REGNUM_TO_SPRNUM(regno), or1k_read_spr_reg (REGNUM_TO_SPRNUM(regno)));
or1k_write_spr_reg (REGNUM_TO_SPRNUM(regno), read_register (regno));
if (err)
or1k_error ("Can't write register %d(%i): %s", regno, REGNUM_TO_SPRNUM(regno), or1k_err_name (err));
}
1056,8 → 1190,15
int nBlocks = (count + block_xfer_size -1)/block_xfer_size;
int terminate = 0; /* Terminate the printing of '*'s... */
 
#ifdef DEBUG_JTAG
debug ("xfer_memory %s addr=%x, len=%i, \n", write?"write":"read", memaddr, len);
fflush(stdout);
#endif
 
#if 0
if (memaddr >= MEM_SPACE)
error("Invalid address");
#endif
 
/* (CZ 21/06/01 -- because upper layers which know nothing about
Or1k or JTAG call this function directly, it is always necessary
1065,8 → 1206,6
be pointing to the Development Interface chain, in which case
we're going to get bupkiss... */
 
or1k_set_chain (SC_RISC_DEBUG);
 
if (write)
{
/* Fill start and end extra bytes of buffer with existing data. */
1105,11 → 1244,12
 
for(j=0;j<n;j++)
__buf[j] = (unsigned long)extract_unsigned_integer(&buffer[(i * block_xfer_size +j)*4], 4);
or1k_set_chain (SC_WISHBONE);
status = or1k_store_block(addr,__buf,n);
free(__buf);
if(n == block_xfer_size)
{
printf_unfiltered ("*");
debug ("*");
gdb_flush (gdb_stdout);
}
if (status)
1120,7 → 1260,7
/* FIXME: Do we want a QUIT here? */
}
if (terminate)
printf_unfiltered ("\n");
debug ("\n");
}
else
{
1130,6 → 1270,7
int n = count < block_xfer_size ? count : block_xfer_size;
unsigned long *__buf;
 
or1k_set_chain (SC_WISHBONE);
__buf = (unsigned long*)malloc(n*sizeof(unsigned long));
status = or1k_load_block(addr,__buf,n);
if (!status)
1151,7 → 1292,7
int or1k_load_block(CORE_ADDR addr,void* buffer,int nRegisters)
{
int i=0;
unsigned int regno = (addr >> 2) + MEM_SPACE;
unsigned int regno = addr;
 
if (current_or1k_target != NULL && current_or1k_target->to_read_block != NULL)
return current_or1k_target->to_read_block (regno,buffer,nRegisters);
1163,33 → 1304,13
 
int or1k_store_block(CORE_ADDR addr,void* buffer,int nRegisters)
{
unsigned int regno = (addr >> 2) + MEM_SPACE;
 
unsigned int regno = addr;
if (current_or1k_target != NULL && current_or1k_target->to_write_block != NULL)
return current_or1k_target->to_write_block (regno,buffer,nRegisters);
return 0;
}
 
/* Flushes pipeline. May not be needed by all implementations, but
it doen't hurt to do it. This function should be called every time
or1k stops.
When or1k stops it still has instructions in pipeline.
We do this by inserting nop instructions.
IF cycle remains unaffacted by writing to DIR, and it still holds
instruction, that caused break or watchpoint. */
 
void
or1k_flush_pipeline ()
{
/* CZ 15/09/01 -- Damjan has made it perfectly clear
that the DIR will not be implemented on any chip
as the entire concept is poorly conceived. This
section has therefore been removed. */
/* or1k_write_spr_reg (DIR_SPRNUM, NOP_INSTR);
or1k_write_spr_reg (DIR_SPRNUM, NOP_INSTR);
or1k_write_spr_reg (DIR_SPRNUM, NOP_INSTR); */
}
 
/* Print info on this target. */
 
static void
1647,7 → 1768,7
or1k_dummy_ops.to_close = or1k_close;
or1k_dummy_ops.to_detach = or1k_detach;
or1k_dummy_ops.to_resume = or1k_resume;
or1k_dummy_ops.to_wait = or1k_wait;
or1k_dummy_ops.to_wait = or1k_wait;
or1k_dummy_ops.to_fetch_registers = or1k_fetch_registers;
or1k_dummy_ops.to_store_registers = or1k_store_registers;
or1k_dummy_ops.to_prepare_to_store = or1k_prepare_to_store;
1660,6 → 1781,7
or1k_dummy_ops.to_create_inferior = or1k_create_inferior;
or1k_dummy_ops.to_mourn_inferior = or1k_mourn_inferior;
or1k_dummy_ops.to_stratum = process_stratum;
or1k_dummy_ops.to_stop = or1k_stop;
 
/* We can access memory while program is running. */
or1k_dummy_ops.to_has_all_memory = 0;
1672,8 → 1794,8
/* Copy the common fields to all target vectors. */
or1k_jtag_ops = or1k_sim_ops = or1k_dummy_ops;
/* Initialize target-specific fields in the target vectors adn add targets. */
/* Initialize target-specific fields in the target vectors adn add targets. */
or1k_jtag_ops.to_shortname = "jtag";
or1k_jtag_ops.to_longname = "Remote or1k debugging over JTAG port";
or1k_jtag_ops.to_doc = "Debug a board using the OR1K remote debugging protocol"
1680,7 → 1802,7
" over a parallel line.\nThe argument is the parallel port it is connected "
"to, or, if it is formatted\nas a URL of the form jtag://<hostname>:<port>,"
" then the argument refers to\na remote JTAG proxy server.\n";
or1k_jtag_ops.to_open = or1k_jtag_open;
or1k_jtag_ops.to_open = or1k_jtag_open;
add_target (&or1k_jtag_ops);
or1k_dummy_ops.to_shortname = "dummy";
/trunk/insight/gdb/or1k-tdep.c
42,18 → 42,18
 
/* Group reg name size. See or1k_reg_names. */
int or1k_group_name_sizes[OR1K_NUM_SPR_GROUPS] = {
80, 0, 0, 6, 4, 2,
23, 16, 1, 3, 2, 8};
72, 0, 0, 6, 4, 2,
22, 16, 1, 3, 2, 8};
 
int or1k_group_name_start[OR1K_NUM_SPR_GROUPS] = {
0, 0, 0, 253, 254, 256,
32, 248, 16, 16, 255, 0};
16, 248, 16, 16, 255, 0};
 
/* Generated reg names (max valid alias index).
See or1k_spr_reg_name. */
int or1k_spr_valid_aliases[OR1K_NUM_SPR_GROUPS] = {
2047+1, 2047+1, 2047+1, 258+1, 257+1, 257+1,
79+1, 263+1, 16+1, 18+1, 256+1, 7+1};
78+1, 263+1, 16+1, 18+1, 256+1, 7+1};
 
/* Register names. */
char *or1k_reg_names[] = {
85,7 → 85,7
/* group 6 - debug */
"DVR0", "DVR1", "DVR2", "DVR3", "DVR4", "DVR5", "DVR6", "DVR7",
"DCR0", "DCR1", "DCR2", "DCR3", "DCR4", "DCR5", "DCR6", "DCR7",
"DMR1", "DMR2", "DCWR0","DCWR1","DSR", "DRR", "DIR",
"DMR1", "DMR2", "DCWR0","DCWR1","DSR", "DRR",
 
/* group 7 - performance counters unit */
"PCCM0", "PCMR1", "PCMR2", "PCMR3", "PCMR4", "PCMR5", "PCMR6", "PCMR7",
107,8 → 107,8
static char *or1k_gdb_reg_names[] = {
 
/* general purpose registers */
"ZERO", "SP", "FP", "A0", "A1", "A2", "A3", "A4",
"A5", "LR", "R10", "RV", "R12", "R13", "R14", "R15",
"R0", "R1(SP)", "R2(FP)", "R3(A0)", "R4(A1)", "R5(A2)", "R6(A3)", "R7(A4)",
"R8(A5)", "R9(LR)", "R10", "R11(RV)", "R12", "R13", "R14", "R15",
"R16", "R17", "R18", "R19", "R20", "R21", "R22", "R23",
"R24", "R25", "R26", "R27", "R28", "R29", "R30", "R31",
 
348,10 → 348,10
{
case PS_REGNUM: return SR_SPRNUM;
case PC_REGNUM: return PC_SPRNUM;
case CCR_REGNUM: return CCR_SPRNUM(CURRENT_CID);
case EPC_REGNUM: return EPC_SPRNUM(CURRENT_CID);
case EAR_REGNUM: return EAR_SPRNUM(CURRENT_CID);
case ESR_REGNUM: return ESR_SPRNUM(CURRENT_CID);
/*case CCR_REGNUM: return CCR_SPRNUM(CURRENT_CID);*/
case EPCR_REGNUM: return EPCR_SPRNUM(CURRENT_CID);
/*case EAR_REGNUM: return EAR_SPRNUM(CURRENT_CID);
case ESR_REGNUM: return ESR_SPRNUM(CURRENT_CID);*/
default:
error("Invalid register number!");
break;
396,6 → 396,7
for (i = 0; i < group; i++)
group_start += or1k_group_name_sizes[i];
index -= or1k_group_name_start[group];
if (index >= or1k_group_name_sizes[group])
{
sprintf (tmp_name, "SPR%i_%i", group, index);
402,7 → 403,7
return (char *)&tmp_name;
}
else
return or1k_reg_names[group_start + index - or1k_group_name_start[group]];
return or1k_reg_names[group_start + index];
}
 
/* Build names for DMMU group. */
469,7 → 470,7
return -1;
else return i;
}
for (i = 0; i < or1k_spr_valid_aliases[group]; i++)
for (i = or1k_group_name_start[group]; i < or1k_spr_valid_aliases[group]; i++)
{
char *s;
s = or1k_spr_register_name (SPR_REG(group, i));
871,63 → 872,25
for (i = 0; i < MAX_GPR_REGS; i++)
or1k_saved_reg_addr[i] = -1;
 
for(t_pc=pc; t_pc < (pc + MAX_PROLOGUE_LENGTH) &&
state != PrologueStateMachineInvalid; t_pc += OR1K_INSTLEN)
/* Is there a prologue? */
inst = or1k_fetch_instruction (pc);
if ((inst & 0xfc1ff800) != 0xd4011000) return pc; /* l.sw I(r1),r2 */
or1k_saved_reg_addr[2] = offset++;
inst = or1k_fetch_instruction (pc + OR1K_INSTLEN);
if ((inst & 0xFFFF0000) != 0x9c410000) return pc; /* l.addi r2,r1,I */
pc += 2 * OR1K_INSTLEN;
inst = or1k_fetch_instruction (pc);
if ((inst & 0xFFFF0000) != 0x9c210000) return pc; /* l.addi r1,r1,I */
pc += OR1K_INSTLEN;
 
/* Skip stored registers. */
inst = or1k_fetch_instruction (pc);
while ((inst & 0xfc1ff800) != 0xd4020000) /* l.sw 0x0(r2),rx */
{
unsigned long insn = or1k_fetch_instruction(t_pc);
int reg;
int offset;
FunctionPrologueStates new_state = getPrologueInsnType(insn,&reg,&offset);
 
switch(state)
{
case PrologueStateMachineStart:
if(new_state == PrologueStateMachineFrameInitialized)
{
frame_size = -offset;
or1k_saved_reg_addr[1] = frame_size;
}
else
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineFrameInitialized:
if(new_state == PrologueStateMachineFrameSaved)
or1k_saved_reg_addr[reg] = frame_size - offset;
else if(new_state == PrologueStateMachineRegisterSaved)
{
/* Ooops...we have a frameless function.
Not sure what this might mean, but
let's try and continue. */
or1k_saved_reg_addr[reg] = frame_size - offset;
}
else
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineFrameSaved:
if(new_state != PrologueStateMachineFrameAdjusted &&
offset != frame_size)
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineFrameAdjusted:
case PrologueStateMachineRegisterSaved:
if(new_state == PrologueStateMachineRegisterSaved)
or1k_saved_reg_addr[reg] = frame_size - offset;
else if(new_state == PrologueStateMachineParameterSaved)
or1k_saved_reg_addr[reg] = -offset;
else
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineParameterSaved:
if(new_state == PrologueStateMachineParameterSaved)
or1k_saved_reg_addr[reg] = -offset;
else
new_state = PrologueStateMachineInvalid;
break;
default:
new_state = PrologueStateMachineInvalid;
}
 
state = new_state;
/* get saved reg. */
or1k_saved_reg_addr[(inst >> 11) & 0x1f] = offset++;
pc += OR1K_INSTLEN;
inst = or1k_fetch_instruction (pc);
}
 
return t_pc;
1316,6 → 1279,7
{
*group = i;
*index = regno;
break;
}
}
}
1341,7 → 1305,7
for (i = 0; i < or1k_spr_valid_aliases[*group]; i++)
{
char reg_name[16];
char *gen_name = or1k_spr_register_name (SPR_REG(*group, i));
char *gen_name = or1k_spr_register_name (SPR_REG(*group, i + or1k_group_name_start[*group]));
sprintf (reg_name, "SPR%i_%i", *group, i);
if (strcmp (reg_name, gen_name) != 0)
printf_filtered ("%s\t", gen_name);
1375,9 → 1339,9
parse_spr_params (args, &group, &index);
if (index >= 0)
{
printf_unfiltered ("%s.%s (SPR%i_%i) set to %i(%X), was:%i(%X)\n", or1k_group_names[group],
or1k_spr_register_name (SPR_REG(group, index)), group, index,
or1k_read_spr_reg (SPR_REG(group, index)));
unsigned long value = or1k_read_spr_reg (SPR_REG(group, index));
printf_unfiltered ("%s.%s = SPR%i_%i = %i(%x)\n", or1k_group_names[group],
or1k_spr_register_name (SPR_REG(group, index)), group, index, value, value);
}
}
 
1408,8 → 1372,9
*ptr_c = 0;
value = strtoul (nargs, &ptr_c, 0);
if (*ptr_c != 0)
error ("Invalid register value.");
printf_unfiltered ("%s.%s (SPR%i_%i) set to %i(%X), was:%i(%X)\n", or1k_group_names[group],
error ("Invalid register value.");
or1k_write_spr_reg (SPR_REG(group, index), value);
printf_unfiltered ("%s.%s (SPR%i_%i) set to %i(%x), was:%i(%x)\n", or1k_group_names[group],
or1k_spr_register_name (SPR_REG(group, index)), group, index,
value, value, prev, prev);
}
/trunk/gdb-5.0/gdb/doc/gdb.info-1
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
717,7 → 717,7
 
`-annotate LEVEL'
This option sets the "annotation level" inside GDB. Its effect is
identical to using `set annotate LEVEL' (*note Annotations::.).
identical to using `set annotate LEVEL' (*note Annotations::).
Annotation level controls how much information does GDB print
together with its prompt, values of expressions, source lines, and
other types of output. Level 0 is the normal, level 1 is for use
760,7 → 760,7
`-write'
Open the executable and core files for both reading and writing.
This is equivalent to the `set write on' command inside GDB (*note
Patching::.).
Patching::).
 
`-statistics'
This option causes GDB to print statistics about time and memory
/trunk/gdb-5.0/gdb/doc/gdb.info-2
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
414,7 → 414,7
child. While the child is sleeping, use the `ps' program to get its
process ID. Then tell GDB (a new invocation of GDB if you are also
debugging the parent process) to attach to the child process (*note
Attach::.). From that point on you can debug the child process just
Attach::). From that point on you can debug the child process just
like any other process which you attached to.
 
On HP-UX (11.x and later only?), GDB provides support for debugging
/trunk/gdb-5.0/gdb/doc/gdb.info-3
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
/trunk/gdb-5.0/gdb/doc/gdb.info
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
27,270 → 27,277
 

Indirect:
gdb.info-1: 1013
gdb.info-2: 49882
gdb.info-3: 95122
gdb.info-4: 144716
gdb.info-5: 194110
gdb.info-6: 239701
gdb.info-7: 286723
gdb.info-8: 336643
gdb.info-9: 386327
gdb.info-10: 436229
gdb.info-11: 481375
gdb.info-12: 530916
gdb.info-13: 580572
gdb.info-1: 1011
gdb.info-2: 49878
gdb.info-3: 95117
gdb.info-4: 144711
gdb.info-5: 194104
gdb.info-6: 239695
gdb.info-7: 286716
gdb.info-8: 335838
gdb.info-9: 385189
gdb.info-10: 434469
gdb.info-11: 477373
gdb.info-12: 526753
gdb.info-13: 576407

Tag Table:
(Indirect)
Node: Top1013
Node: Summary2749
Node: Free Software4310
Node: Contributors5048
Node: Sample Session11138
Node: Invocation18007
Node: Invoking GDB18480
Node: File Options20423
Node: Mode Options23753
Node: Quitting GDB28769
Node: Shell Commands29652
Node: Commands30466
Node: Command Syntax31103
Node: Completion32962
Node: Help37291
Node: Running42539
Node: Compilation43648
Node: Starting45444
Node: Arguments48617
Node: Environment49882
Node: Working Directory53087
Node: Input/Output53827
Node: Attach55432
Node: Kill Process57860
Node: Threads58818
Node: Processes64707
Node: Stopping67694
Node: Breakpoints68840
Node: Set Breaks72043
Node: Set Watchpoints81260
Node: Set Catchpoints87285
Node: Delete Breaks90753
Node: Disabling92435
Node: Conditions95122
Node: Break Commands100062
Node: Breakpoint Menus102938
Node: Error in Breakpoints104643
Node: Continuing and Stepping106176
Node: Signals113722
Node: Thread Stops117429
Node: Stack120750
Node: Frames122224
Node: Backtrace124947
Node: Selection126679
Node: Frame Info129415
Node: Source131740
Node: List132690
Node: Search136216
Node: Source Path137019
Node: Machine Code139836
Node: Data142831
Node: Expressions144716
Node: Variables146643
Node: Arrays150299
Node: Output Formats152823
Node: Memory154897
Node: Auto Display159173
Node: Print Settings162941
Node: Value History173036
Node: Convenience Vars175447
Node: Registers178433
Node: Floating Point Hardware182472
Node: Languages182975
Node: Setting184077
Node: Filenames185772
Node: Manually186509
Node: Automatically187707
Node: Show188758
Node: Checks190056
Node: Type Checking191412
Node: Range Checking194110
Node: Support196476
Node: C197412
Node: C Operators198567
Node: C Constants202933
Node: C plus plus expressions205405
Node: C Defaults208987
Node: C Checks209655
Node: Debugging C210363
Node: Debugging C plus plus210868
Node: Modula-2213857
Node: M2 Operators214758
Node: Built-In Func/Proc217730
Node: M2 Constants220494
Node: M2 Defaults222083
Node: Deviations222677
Node: M2 Checks223764
Node: M2 Scope224564
Node: GDB/M2225573
Node: Chill226470
Node: How modes are displayed227174
Node: Locations231012
Node: Values and their Operations233100
Node: Chill type and range checks238158
Node: Chill defaults239123
Node: Symbols239701
Node: Altering247291
Node: Assignment248257
Node: Jumping251355
Node: Signaling253505
Node: Returning254627
Node: Calling255819
Node: Patching256613
Node: GDB Files257683
Node: Files258148
Node: Symbol Errors269536
Node: Targets273116
Node: Active Targets274122
Node: Target Commands275694
Node: Byte Order280051
Node: Remote281035
Node: Remote Serial282028
Node: Stub Contents284621
Node: Bootstrapping286723
Node: Debug Session290523
Node: Protocol293672
Node: Server329518
Node: NetWare333564
Node: KOD335523
Node: Configurations336643
Node: Native337400
Node: HP-UX337675
Node: SVR4 Process Information337957
Node: Embedded OS339369
Node: VxWorks339838
Node: VxWorks Connection342040
Node: VxWorks Download342959
Node: VxWorks Attach344679
Node: Embedded Processors345062
Node: A29K Embedded346035
Node: A29K UDI346731
Node: A29K EB29K347572
Node: Comms (EB29K)348221
Node: gdb-EB29K351420
Node: Remote Log352787
Node: ARM353263
Node: H8/300353629
Node: Hitachi Boards355113
Node: Hitachi ICE359531
Node: Hitachi Special360311
Node: H8/500360745
Node: i960361103
Node: Nindy Startup362236
Node: Nindy Options362908
Node: Nindy Reset364509
Node: M32R/D364880
Node: M68K365057
Node: M88K365845
Node: MIPS Embedded366019
Node: PowerPC370501
Node: PA370815
Node: SH371080
Node: Sparclet371524
Node: Sparclet File372983
Node: Sparclet Connection373848
Node: Sparclet Download374311
Node: Sparclet Execution375345
Node: Sparclite375921
Node: ST2000376280
Node: Z8000377807
Node: Architectures379162
Node: A29K379452
Node: Alpha380263
Node: MIPS380385
Node: Controlling GDB381355
Node: Prompt382053
Node: Editing382825
Node: History383594
Node: Screen Size386327
Node: Numbers387787
Node: Messages/Warnings389189
Node: Debugging Output391222
Node: Sequences393283
Node: Define393863
Node: Hooks397029
Node: Command Files398427
Node: Output400584
Node: Emacs402991
Node: Annotations408947
Node: Annotations Overview410071
Node: Server Prefix411853
Node: Value Annotations412502
Node: Frame Annotations415599
Node: Displays419257
Node: Prompting420205
Node: Errors421710
Node: Breakpoint Info422599
Node: Invalidation423733
Node: Annotations for Running424212
Node: Source Annotations425725
Node: TODO426656
Node: GDB/MI427238
Node: GDB/MI Command Syntax428900
Node: GDB/MI Input Syntax429130
Node: GDB/MI Output Syntax430675
Node: GDB/MI Simple Examples434124
Node: GDB/MI Compatibility with CLI435226
Node: GDB/MI Output Records435950
Node: GDB/MI Result Records436229
Node: GDB/MI Stream Records436847
Node: GDB/MI Out-of-band Records437976
Node: GDB/MI Command Description Format438471
Node: GDB/MI Breakpoint Table Commands439452
Node: GDB/MI Data Manipulation450377
Node: GDB/MI Program Control467369
Node: GDB/MI Miscellaneous Commands479560
Node: GDB/MI Stack Manipulation481375
Node: GDB/MI Symbol Query488831
Node: GDB/MI Target Manipulation491670
Node: GDB/MI Thread Commands498487
Node: GDB/MI Tracepoint Commands500581
Node: GDB/MI Variable Objects500818
Node: GDB/MI Draft Changes to Output Syntax508430
Node: GDB Bugs512270
Node: Bug Criteria512993
Node: Bug Reporting513863
Node: Command Line Editing521143
Node: Introduction and Notation521808
Node: Readline Interaction522842
Node: Readline Bare Essentials524030
Node: Readline Movement Commands525566
Node: Readline Killing Commands526527
Node: Readline Arguments528238
Node: Searching529208
Node: Readline Init File530916
Node: Readline Init File Syntax531958
Node: Conditional Init Constructs541160
Node: Sample Init File543594
Node: Bindable Readline Commands546759
Node: Commands For Moving547505
Node: Commands For History548348
Node: Commands For Text551095
Node: Commands For Killing553109
Node: Numeric Arguments555254
Node: Commands For Completion556376
Node: Keyboard Macros558119
Node: Miscellaneous Commands558673
Node: Readline vi Mode561472
Node: Using History Interactively562315
Node: History Interaction562711
Node: Event Designators564126
Node: Word Designators565049
Node: Modifiers566294
Node: Formatting Documentation567428
Node: Installing GDB570793
Node: Separate Objdir574258
Node: Config Names576800
Node: Configure Options578240
Node: Index580572
Node: Top1011
Node: Summary2747
Node: Free Software4308
Node: Contributors5046
Node: Sample Session11136
Node: Invocation18005
Node: Invoking GDB18478
Node: File Options20421
Node: Mode Options23751
Ref: Mode Options-Footnote-128619
Node: Quitting GDB28765
Node: Shell Commands29648
Node: Commands30462
Node: Command Syntax31099
Node: Completion32958
Node: Help37287
Node: Running42535
Node: Compilation43644
Node: Starting45440
Node: Arguments48613
Node: Environment49878
Node: Working Directory53083
Node: Input/Output53823
Node: Attach55428
Node: Kill Process57856
Node: Threads58814
Node: Processes64703
Node: Stopping67689
Node: Breakpoints68835
Node: Set Breaks72038
Node: Set Watchpoints81255
Node: Set Catchpoints87280
Node: Delete Breaks90748
Node: Disabling92430
Node: Conditions95117
Node: Break Commands100057
Node: Breakpoint Menus102933
Node: Error in Breakpoints104638
Node: Continuing and Stepping106171
Node: Signals113717
Node: Thread Stops117424
Node: Stack120745
Node: Frames122219
Node: Backtrace124942
Node: Selection126674
Node: Frame Info129410
Node: Source131735
Node: List132685
Node: Search136211
Node: Source Path137014
Node: Machine Code139831
Node: Data142826
Node: Expressions144711
Node: Variables146638
Node: Arrays150294
Node: Output Formats152818
Ref: Output Formats-Footnote-1154734
Node: Memory154891
Node: Auto Display159167
Node: Print Settings162935
Node: Value History173030
Node: Convenience Vars175441
Node: Registers178427
Ref: Registers-Footnote-1182071
Node: Floating Point Hardware182466
Node: Languages182969
Node: Setting184071
Node: Filenames185766
Node: Manually186503
Node: Automatically187701
Node: Show188752
Node: Checks190050
Node: Type Checking191406
Node: Range Checking194104
Node: Support196470
Node: C197406
Node: C Operators198561
Node: C Constants202927
Node: C plus plus expressions205399
Node: C Defaults208981
Node: C Checks209649
Node: Debugging C210357
Node: Debugging C plus plus210862
Node: Modula-2213851
Node: M2 Operators214752
Node: Built-In Func/Proc217724
Node: M2 Constants220488
Node: M2 Defaults222077
Node: Deviations222671
Node: M2 Checks223758
Node: M2 Scope224558
Node: GDB/M2225567
Node: Chill226464
Node: How modes are displayed227168
Node: Locations231006
Node: Values and their Operations233094
Ref: Values and their Operations-Footnote-1237972
Node: Chill type and range checks238152
Node: Chill defaults239117
Node: Symbols239695
Node: Altering247285
Node: Assignment248251
Node: Jumping251349
Node: Signaling253499
Node: Returning254620
Node: Calling255812
Node: Patching256606
Node: GDB Files257676
Node: Files258141
Node: Symbol Errors269529
Node: Targets273109
Node: Active Targets274115
Node: Target Commands275687
Node: Byte Order280044
Node: Remote281028
Node: Remote Serial282021
Node: Stub Contents284614
Node: Bootstrapping286716
Node: Debug Session290516
Node: Protocol293665
Node: Server325518
Ref: Server-Footnote-1329444
Node: NetWare329564
Node: KOD331523
Node: Configurations332643
Node: Native333400
Node: HP-UX333675
Node: SVR4 Process Information333957
Node: Embedded OS335369
Node: VxWorks335838
Node: VxWorks Connection338040
Node: VxWorks Download338959
Node: VxWorks Attach340679
Node: Embedded Processors341062
Node: A29K Embedded342035
Node: A29K UDI342731
Node: A29K EB29K343572
Node: Comms (EB29K)344221
Node: gdb-EB29K347420
Node: Remote Log348787
Node: ARM349263
Node: H8/300349629
Node: Hitachi Boards351113
Node: Hitachi ICE355531
Node: Hitachi Special356311
Node: H8/500356745
Node: i960357103
Node: Nindy Startup358236
Node: Nindy Options358908
Node: Nindy Reset360509
Node: M32R/D360880
Node: M68K361057
Node: M88K361845
Node: MIPS Embedded362019
Node: PowerPC366501
Node: PA366815
Node: SH367080
Node: Sparclet367524
Node: Sparclet File368983
Node: Sparclet Connection369848
Node: Sparclet Download370311
Node: Sparclet Execution371345
Node: Sparclite371921
Node: ST2000372280
Node: Z8000373807
Node: Architectures375162
Node: A29K375452
Node: Alpha376263
Node: MIPS376385
Node: Controlling GDB377355
Node: Prompt378053
Node: Editing378825
Node: History379594
Node: Screen Size382327
Node: Numbers383787
Node: Messages/Warnings385189
Node: Debugging Output387222
Node: Sequences389283
Node: Define389863
Node: Hooks393029
Node: Command Files394427
Ref: Command Files-Footnote-1396475
Node: Output396584
Node: Emacs398991
Node: Annotations404947
Node: Annotations Overview406071
Node: Server Prefix407853
Node: Value Annotations408502
Node: Frame Annotations411599
Node: Displays415255
Node: Prompting416203
Node: Errors417708
Node: Breakpoint Info418597
Node: Invalidation419731
Node: Annotations for Running420210
Node: Source Annotations421723
Node: TODO422654
Node: GDB/MI423236
Node: GDB/MI Command Syntax424898
Node: GDB/MI Input Syntax425128
Node: GDB/MI Output Syntax426673
Node: GDB/MI Simple Examples430122
Node: GDB/MI Compatibility with CLI431224
Node: GDB/MI Output Records431948
Node: GDB/MI Result Records432227
Node: GDB/MI Stream Records432845
Node: GDB/MI Out-of-band Records433974
Node: GDB/MI Command Description Format434469
Node: GDB/MI Breakpoint Table Commands435450
Node: GDB/MI Data Manipulation446375
Node: GDB/MI Program Control463367
Node: GDB/MI Miscellaneous Commands475558
Node: GDB/MI Stack Manipulation477373
Node: GDB/MI Symbol Query484829
Node: GDB/MI Target Manipulation487668
Node: GDB/MI Thread Commands494485
Node: GDB/MI Tracepoint Commands496579
Node: GDB/MI Variable Objects496816
Node: GDB/MI Draft Changes to Output Syntax504268
Node: GDB Bugs508108
Node: Bug Criteria508831
Node: Bug Reporting509701
Node: Command Line Editing516981
Node: Introduction and Notation517646
Node: Readline Interaction518679
Node: Readline Bare Essentials519867
Node: Readline Movement Commands521403
Node: Readline Killing Commands522364
Node: Readline Arguments524075
Node: Searching525045
Node: Readline Init File526753
Node: Readline Init File Syntax527795
Node: Conditional Init Constructs536995
Node: Sample Init File539429
Node: Bindable Readline Commands542594
Node: Commands For Moving543340
Node: Commands For History544183
Node: Commands For Text546930
Node: Commands For Killing548944
Node: Numeric Arguments551089
Node: Commands For Completion552211
Node: Keyboard Macros553954
Node: Miscellaneous Commands554508
Node: Readline vi Mode557307
Node: Using History Interactively558150
Node: History Interaction558546
Node: Event Designators559961
Node: Word Designators560884
Node: Modifiers562129
Node: Formatting Documentation563263
Ref: Formatting Documentation-Footnote-1566564
Node: Installing GDB566628
Node: Separate Objdir570093
Node: Config Names572635
Node: Configure Options574075
Node: Index576407

End Tag Table
/trunk/gdb-5.0/gdb/doc/gdb.info-4
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
276,7 → 276,7
using typical floating point syntax.
 
For example, to print the program counter in hex (*note
Registers::.), type
Registers::), type
 
p/x $pc
 
/trunk/gdb-5.0/gdb/doc/gdb.info-5
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
/trunk/gdb-5.0/gdb/doc/gdb.info-6
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
384,7 → 384,7
Invoking the `signal' command is not the same as invoking the `kill'
utility from the shell. Sending a signal with `kill' causes GDB to
decide what to do with the signal depending on the signal handling
tables (*note Signals::.). The `signal' command passes the signal
tables (*note Signals::). The `signal' command passes the signal
directly to your program.
 

/trunk/gdb-5.0/gdb/doc/gdb.info-7
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
279,262 → 279,262
Below is a complete list of all currently defined COMMANDs and their
corresponding response DATA:
 
Packet Request Description
extended ops `!' Use the extended remote
protocol. Sticky--only
needs to be set once. The
extended remote protocol
supports the `R' packet.
reply `' Stubs that support the
extended remote protocol
return `' which,
unfortunately, is identical
to the response returned by
stubs that do not support
protocol extensions.
last signal `?' Indicate the reason the
target halted. The reply is
the same as for step and
continue.
reply see below
reserved `a' Reserved for future use
set program arguments `A'ARGLEN`,'ARGNUM`,'ARG`,...'
*(reserved)*
Initialized `argv[]' array
passed into program. ARGLEN
specifies the number of
bytes in the hex encoded
byte stream ARG. See
`gdbserver' for more details.
reply `OK'
reply `E'NN
set baud `b'BAUD Change the serial line speed
*(deprecated)* to BAUD. JTC: _When does the
transport layer state
change? When it's received,
or after the ACK is
transmitted. In either
case, there are problems if
the command or the
acknowledgment packet is
dropped._ Stan: _If people
really wanted to add
something like this, and get
it working for the first
time, they ought to modify
ser-unix.c to send some kind
of out-of-band message to a
specially-setup stub and
have the switch happen "in
between" packets, so that
from remote protocol's point
of view, nothing actually
happened._
set breakpoint `B'ADDR,MODE Set (MODE is `S') or clear
*(deprecated)* (MODE is `C') a breakpoint
at ADDR. _This has been
replaced by the `Z' and `z'
packets._
continue `c'ADDR ADDR is address to resume.
If ADDR is omitted, resume at
current address.
reply see below
continue with signal `C'SIG`;'ADDR Continue with signal SIG
(hex signal number). If
`;'ADDR is omitted, resume
at same address.
reply see below
toggle debug `d' toggle debug flag.
*(deprecated)*
detach `D' Detach GDB from the remote
system. Sent to the remote
target before GDB
disconnects.
reply _no response_ GDB does not check for any
response after sending this
packet.
reserved `e' Reserved for future use
reserved `E' Reserved for future use
reserved `f' Reserved for future use
reserved `F' Reserved for future use
read registers `g' Read general registers.
reply XX... Each byte of register data
is described by two hex
digits. The bytes with the
register are transmitted in
target byte order. The size
of each register and their
position within the `g'
PACKET are determined by the
GDB internal macros
REGISTER_RAW_SIZE and
REGISTER_NAME macros. The
specification of several
standard `g' packets is
specified below.
`E'NN for an error.
write regs `G'XX... See `g' for a description of
the XX... data.
reply `OK' for success
reply `E'NN for an error
reserved `h' Reserved for future use
set thread `H'CT... Set thread for subsequent
operations (`m', `M', `g',
`G', et.al.). C = `c' for
thread used in step and
continue; T... can be -1 for
all threads. C = `g' for
thread used in other
operations. If zero, pick a
thread, any thread.
reply `OK' for success
reply `E'NN for an error
cycle step *(draft)* `i'ADDR`,'NNN Step the remote target by a
single clock cycle. If
`,'NNN is present, cycle
step NNN cycles. If ADDR is
present, cycle step starting
at that address.
signal then cycle `I' See `i' and `S' for likely
step *(reserved)* syntax and semantics.
reserved `j' Reserved for future use
reserved `J' Reserved for future use
kill request `k' FIXME: _There is no
description of how operate
when a specific thread
context has been selected
(ie. does 'k' kill only that
thread?)_.
reserved `l' Reserved for future use
reserved `L' Reserved for future use
read memory `m'ADDR`,'LENGTH Read LENGTH bytes of memory
starting at address ADDR.
Neither GDB nor the stub
assume that sized memory
transfers are assumed using
word alligned accesses.
FIXME: _A word aligned memory
transfer mechanism is
needed._
reply XX... XX... is mem contents. Can
be fewer bytes than
requested if able to read
only part of the data.
Neither GDB nor the stub
assume that sized memory
transfers are assumed using
word alligned accesses.
FIXME: _A word aligned
memory transfer mechanism is
needed._
reply `E'NN NN is errno
write mem `M'ADDR,LENGTH`:'XX... Write LENGTH bytes of memory
starting at address ADDR.
XX... is the data.
reply `OK' for success
reply `E'NN for an error (this includes
the case where only part of
the data was written).
reserved `n' Reserved for future use
reserved `N' Reserved for future use
reserved `o' Reserved for future use
reserved `O' Reserved for future use
read reg *(reserved)* `p'N... See write register.
return R.... The hex encoded value of the
register in target byte
order.
write reg `P'N...`='R... Write register N... with
value R..., which contains
two hex digits for each byte
in the register (target byte
order).
reply `OK' for success
reply `E'NN for an error
general query `q'QUERY Request info about QUERY.
In general GDB queries have
a leading upper case letter.
Custom vendor queries
should use a company prefix
(in lower case) ex:
`qfsf.var'. QUERY may
optionally be followed by a
`,' or `;' separated list.
Stubs must ensure that they
match the full QUERY name.
reply `XX...' Hex encoded data from query.
The reply can not be empty.
reply `E'NN error reply
reply `' Indicating an unrecognized
QUERY.
general set `Q'VAR`='VAL Set value of VAR to VAL.
See `q' for a discussing of
naming conventions.
reset *(deprecated)* `r' Reset the entire system.
remote restart `R'XX Restart the remote server.
XX while needed has no clear
definition. FIXME: _An
example interaction
explaining how this packet
is used in extended-remote
mode is needed_.
step `s'ADDR ADDR is address to resume.
If ADDR is omitted, resume at
same address.
reply see below
step with signal `S'SIG`;'ADDR Like `C' but step not
continue.
reply see below
search `t'ADDR`:'PP`,'MM Search backwards starting at
address ADDR for a match
with pattern PP and mask MM.
PP and MM are 4 bytes.
ADDR must be at least 3
digits.
thread alive `T'XX Find out if the thread XX is
alive.
reply `OK' thread is still alive
reply `E'NN thread is dead
reserved `u' Reserved for future use
reserved `U' Reserved for future use
reserved `v' Reserved for future use
reserved `V' Reserved for future use
reserved `w' Reserved for future use
reserved `W' Reserved for future use
reserved `x' Reserved for future use
write mem (binary) `X'ADDR`,'LENGTH:XX... ADDR is address, LENGTH is
number of bytes, XX... is
binary data. The characters
`$', `#', and `0x7d' are
escaped using `0x7d'.
reply `OK' for success
reply `E'NN for an error
reserved `y' Reserved for future use
reserved `Y' Reserved for future use
remove break or `z'T`,'ADDR`,'LENGTH See `Z'.
watchpoint *(draft)*
insert break or `Z'T`,'ADDR`,'LENGTH T is type: `0' - software
watchpoint *(draft)* breakpoint, `1' - hardware
breakpoint, `2' - write
watchpoint, `3' - read
watchpoint, `4' - access
watchpoint; ADDR is address;
LENGTH is in bytes. For a
software breakpoint, LENGTH
specifies the size of the
instruction to be patched.
For hardware breakpoints and
watchpoints LENGTH specifies
the memory region to be
monitored. To avoid
potential problems with
duplicate packets, the
operations should be
implemented in an idempotent
way.
reply `E'NN for an error
reply `OK' for success
`' If not supported.
reserved <other> Reserved for future use
Packet Request Description
extended ops `!' Use the extended remote
protocol. Sticky--only
needs to be set once. The
extended remote protocol
supports the `R' packet.
reply `' Stubs that support the
extended remote protocol
return `' which,
unfortunately, is identical
to the response returned by
stubs that do not support
protocol extensions.
last signal `?' Indicate the reason the
target halted. The reply is
the same as for step and
continue.
reply see below
reserved `a' Reserved for future use
set program arguments `A'ARGLEN`,'ARGNUM`,'ARG`,...'
*(reserved)*
Initialized `argv[]' array
passed into program. ARGLEN
specifies the number of
bytes in the hex encoded
byte stream ARG. See
`gdbserver' for more details.
reply `OK'
reply `E'NN
set baud `b'BAUD Change the serial line speed
*(deprecated)* to BAUD. JTC: _When does the
transport layer state
change? When it's received,
or after the ACK is
transmitted. In either
case, there are problems if
the command or the
acknowledgment packet is
dropped._ Stan: _If people
really wanted to add
something like this, and get
it working for the first
time, they ought to modify
ser-unix.c to send some kind
of out-of-band message to a
specially-setup stub and
have the switch happen "in
between" packets, so that
from remote protocol's point
of view, nothing actually
happened._
set breakpoint `B'ADDR,MODE Set (MODE is `S') or clear
*(deprecated)* (MODE is `C') a breakpoint
at ADDR. _This has been
replaced by the `Z' and `z'
packets._
continue `c'ADDR ADDR is address to resume.
If ADDR is omitted, resume at
current address.
reply see below
continue with signal `C'SIG`;'ADDR Continue with signal SIG
(hex signal number). If
`;'ADDR is omitted, resume
at same address.
reply see below
toggle debug `d' toggle debug flag.
*(deprecated)*
detach `D' Detach GDB from the remote
system. Sent to the remote
target before GDB
disconnects.
reply _no response_ GDB does not check for any
response after sending this
packet.
reserved `e' Reserved for future use
reserved `E' Reserved for future use
reserved `f' Reserved for future use
reserved `F' Reserved for future use
read registers `g' Read general registers.
reply XX... Each byte of register data
is described by two hex
digits. The bytes with the
register are transmitted in
target byte order. The size
of each register and their
position within the `g'
PACKET are determined by the
GDB internal macros
REGISTER_RAW_SIZE and
REGISTER_NAME macros. The
specification of several
standard `g' packets is
specified below.
`E'NN for an error.
write regs `G'XX... See `g' for a description of
the XX... data.
reply `OK' for success
reply `E'NN for an error
reserved `h' Reserved for future use
set thread `H'CT... Set thread for subsequent
operations (`m', `M', `g',
`G', et.al.). C = `c' for
thread used in step and
continue; T... can be -1 for
all threads. C = `g' for
thread used in other
operations. If zero, pick a
thread, any thread.
reply `OK' for success
reply `E'NN for an error
cycle step *(draft)* `i'ADDR`,'NNN Step the remote target by a
single clock cycle. If
`,'NNN is present, cycle
step NNN cycles. If ADDR is
present, cycle step starting
at that address.
signal then cycle `I' See `i' and `S' for likely
step *(reserved)* syntax and semantics.
reserved `j' Reserved for future use
reserved `J' Reserved for future use
kill request `k' FIXME: _There is no
description of how operate
when a specific thread
context has been selected
(ie. does 'k' kill only that
thread?)_.
reserved `l' Reserved for future use
reserved `L' Reserved for future use
read memory `m'ADDR`,'LENGTH Read LENGTH bytes of memory
starting at address ADDR.
Neither GDB nor the stub
assume that sized memory
transfers are assumed using
word alligned accesses.
FIXME: _A word aligned memory
transfer mechanism is
needed._
reply XX... XX... is mem contents. Can
be fewer bytes than
requested if able to read
only part of the data.
Neither GDB nor the stub
assume that sized memory
transfers are assumed using
word alligned accesses.
FIXME: _A word aligned
memory transfer mechanism is
needed._
reply `E'NN NN is errno
write mem `M'ADDR,LENGTH`:'XX... Write LENGTH bytes of memory
starting at address ADDR.
XX... is the data.
reply `OK' for success
reply `E'NN for an error (this includes
the case where only part of
the data was written).
reserved `n' Reserved for future use
reserved `N' Reserved for future use
reserved `o' Reserved for future use
reserved `O' Reserved for future use
read reg *(reserved)* `p'N... See write register.
return R.... The hex encoded value of the
register in target byte
order.
write reg `P'N...`='R... Write register N... with
value R..., which contains
two hex digits for each byte
in the register (target byte
order).
reply `OK' for success
reply `E'NN for an error
general query `q'QUERY Request info about QUERY.
In general GDB queries have
a leading upper case letter.
Custom vendor queries
should use a company prefix
(in lower case) ex:
`qfsf.var'. QUERY may
optionally be followed by a
`,' or `;' separated list.
Stubs must ensure that they
match the full QUERY name.
reply `XX...' Hex encoded data from query.
The reply can not be empty.
reply `E'NN error reply
reply `' Indicating an unrecognized
QUERY.
general set `Q'VAR`='VAL Set value of VAR to VAL.
See `q' for a discussing of
naming conventions.
reset *(deprecated)* `r' Reset the entire system.
remote restart `R'XX Restart the remote server.
XX while needed has no clear
definition. FIXME: _An
example interaction
explaining how this packet
is used in extended-remote
mode is needed_.
step `s'ADDR ADDR is address to resume.
If ADDR is omitted, resume at
same address.
reply see below
step with signal `S'SIG`;'ADDR Like `C' but step not
continue.
reply see below
search `t'ADDR`:'PP`,'MM Search backwards starting at
address ADDR for a match
with pattern PP and mask MM.
PP and MM are 4 bytes.
ADDR must be at least 3
digits.
thread alive `T'XX Find out if the thread XX is
alive.
reply `OK' thread is still alive
reply `E'NN thread is dead
reserved `u' Reserved for future use
reserved `U' Reserved for future use
reserved `v' Reserved for future use
reserved `V' Reserved for future use
reserved `w' Reserved for future use
reserved `W' Reserved for future use
reserved `x' Reserved for future use
write mem (binary) `X'ADDR`,'LENGTH:XX... ADDR is address, LENGTH is
number of bytes, XX... is
binary data. The characters
`$', `#', and `0x7d' are
escaped using `0x7d'.
reply `OK' for success
reply `E'NN for an error
reserved `y' Reserved for future use
reserved `Y' Reserved for future use
remove break or `z'T`,'ADDR`,'LENGTH See `Z'.
watchpoint *(draft)*
insert break or `Z'T`,'ADDR`,'LENGTH T is type: `0' - software
watchpoint *(draft)* breakpoint, `1' - hardware
breakpoint, `2' - write
watchpoint, `3' - read
watchpoint, `4' - access
watchpoint; ADDR is address;
LENGTH is in bytes. For a
software breakpoint, LENGTH
specifies the size of the
instruction to be patched.
For hardware breakpoints and
watchpoints LENGTH specifies
the memory region to be
monitored. To avoid
potential problems with
duplicate packets, the
operations should be
implemented in an idempotent
way.
reply `E'NN for an error
reply `OK' for success
`' If not supported.
reserved <other> Reserved for future use
 
The `C', `c', `S', `s' and `?' packets can receive any of the below
as a reply. In the case of the `C', `c', `S' and `s' packets, that
542,143 → 542,143
meaning of `signal number' is poorly defined. In general one of the
UNIX signal numbering conventions is used.
 
`S'AA AA is the signal number
`T'AAN...`:'R...`;'N...`:'R...`;'N...`:'R...`;'AA = two hex digit signal number; N... =
register number (hex), R... = target byte
ordered register contents, size defined by
`REGISTER_RAW_SIZE'; N... = `thread', R...
= thread process ID, this is a hex
integer; N... = other string not starting
with valid hex digit. GDB should ignore
this N..., R... pair and go on to the
next. This way we can extend the protocol.
`W'AA The process exited, and AA is the exit
status. This is only applicable for
certains sorts of targets.
`X'AA The process terminated with signal AA.
`N'AA`;'T...`;'D...`;'B... AA = signal number; T... = address of
*(obsolete)* symbol "_start"; D... = base of data
section; B... = base of bss section.
_Note: only used by Cisco Systems targets.
The difference between this reply and the
"qOffsets" query is that the 'N' packet
may arrive spontaneously whereas the
'qOffsets' is a query initiated by the host
debugger._
`O'XX... XX... is hex encoding of ASCII data. This
can happen at any time while the program
is running and the debugger should
continue to wait for 'W', 'T', etc.
`S'AA AA is the signal number
`T'AAN...`:'R...`;'N...`:'R...`;'N...`:'R...`;'AA = two hex digit signal number; N... =
register number (hex), R... = target byte
ordered register contents, size defined by
`REGISTER_RAW_SIZE'; N... = `thread', R...
= thread process ID, this is a hex
integer; N... = other string not starting
with valid hex digit. GDB should ignore
this N..., R... pair and go on to the
next. This way we can extend the protocol.
`W'AA The process exited, and AA is the exit
status. This is only applicable for
certains sorts of targets.
`X'AA The process terminated with signal AA.
`N'AA`;'T...`;'D...`;'B... AA = signal number; T... = address of
*(obsolete)* symbol "_start"; D... = base of data
section; B... = base of bss section.
_Note: only used by Cisco Systems targets.
The difference between this reply and the
"qOffsets" query is that the 'N' packet
may arrive spontaneously whereas the
'qOffsets' is a query initiated by the host
debugger._
`O'XX... XX... is hex encoding of ASCII data. This
can happen at any time while the program
is running and the debugger should
continue to wait for 'W', 'T', etc.
 
The following set and query packets have already been defined.
 
current thread `q'`C' Return the current thread id.
reply `QC'PID Where PID is a HEX encoded 16 bit process
id.
reply * Any other reply implies the old pid.
all thread ids `q'`fThreadInfo'
`q'`sThreadInfo'Obtain a list of active thread ids from
the target (OS). Since there may be too
many active threads to fit into one reply
packet, this query works iteratively: it
may require more than one query/reply
sequence to obtain the entire list of
threads. The first query of the sequence
will be the `qf'`ThreadInfo' query;
subsequent queries in the sequence will be
the `qs'`ThreadInfo' query.
NOTE: replaces the `qL' query (see below).
reply `m'<ID> A single thread id
reply a comma-separated list of thread ids
`m'<ID>,<ID>...
reply `l' (lower case 'el') denotes end of list.
In response to each query, the target will
reply with a list of one or more thread
ids, in big-endian hex, separated by
commas. GDB will respond to each reply
with a request for more thread ids (using
the `qs' form of the query), until the
target responds with `l' (lower-case el,
for `'last'').
extra thread `q'`ThreadExtraInfo'`,'ID
info
Where <ID> is a thread-id in big-endian
hex. Obtain a printable string
description of a thread's attributes from
the target OS. This string may contain
anything that the target OS thinks is
interesting for GDB to tell the user about
the thread. The string is displayed in
GDB's `info threads' display. Some
examples of possible thread extra info
strings are "Runnable", or "Blocked on
Mutex".
reply XX... Where XX... is a hex encoding of ASCII
data, comprising the printable string
containing the extra information about the
thread's attributes.
query LIST or `q'`L'STARTFLAGTHREADCOUNTNEXTTHREAD
THREADLIST
*(deprecated)*
Obtain thread information from RTOS.
Where: STARTFLAG (one hex digit) is one to
indicate the first query and zero to
indicate a subsequent query; THREADCOUNT
(two hex digits) is the maximum number of
threads the response packet can contain;
and NEXTTHREAD (eight hex digits), for
subsequent queries (STARTFLAG is zero), is
returned in the response as ARGTHREAD.
NOTE: this query is replaced by the
`q'`fThreadInfo' query (see above).
reply
`q'`M'COUNTDONEARGTHREADTHREAD...
Where: COUNT (two hex digits) is the
number of threads being returned; DONE
(one hex digit) is zero to indicate more
threads and one indicates no further
threads; ARGTHREADID (eight hex digits) is
NEXTTHREAD from the request packet;
THREAD... is a sequence of thread IDs from
the target. THREADID (eight hex digits).
See `remote.c:parse_threadlist_response()'.
compute CRC `q'`CRC:'ADDR`,'LENGTH
of memory
block
reply `E'NN An error (such as memory fault)
reply `C'CRC32 A 32 bit cyclic redundancy check of the
specified memory region.
query sect `q'`Offsets' Get section offsets that the target used
offs when re-locating the downloaded image.
_Note: while a `Bss' offset is included in
the response, GDB ignores this and instead
applies the `Data' offset to the `Bss'
section._
reply
`Text='XXX`;Data='YYY`;Bss='ZZZ
thread info `q'`P'MODETHREADID
request
Returns information on THREADID. Where:
MODE is a hex encoded 32 bit mode;
THREADID is a hex encoded 64 bit thread ID.
reply * See
current thread `q'`C' Return the current thread id.
reply `QC'PID Where PID is a HEX encoded 16 bit process
id.
reply * Any other reply implies the old pid.
all thread ids `q'`fThreadInfo'
`q'`sThreadInfo'Obtain a list of active thread ids from
the target (OS). Since there may be too
many active threads to fit into one reply
packet, this query works iteratively: it
may require more than one query/reply
sequence to obtain the entire list of
threads. The first query of the sequence
will be the `qf'`ThreadInfo' query;
subsequent queries in the sequence will be
the `qs'`ThreadInfo' query.
NOTE: replaces the `qL' query (see below).
reply `m'<ID> A single thread id
reply a comma-separated list of thread ids
`m'<ID>,<ID>...
reply `l' (lower case 'el') denotes end of list.
In response to each query, the target will
reply with a list of one or more thread
ids, in big-endian hex, separated by
commas. GDB will respond to each reply
with a request for more thread ids (using
the `qs' form of the query), until the
target responds with `l' (lower-case el,
for `'last'').
extra thread `q'`ThreadExtraInfo'`,'ID
info
Where <ID> is a thread-id in big-endian
hex. Obtain a printable string
description of a thread's attributes from
the target OS. This string may contain
anything that the target OS thinks is
interesting for GDB to tell the user about
the thread. The string is displayed in
GDB's `info threads' display. Some
examples of possible thread extra info
strings are "Runnable", or "Blocked on
Mutex".
reply XX... Where XX... is a hex encoding of ASCII
data, comprising the printable string
containing the extra information about the
thread's attributes.
query LIST or `q'`L'STARTFLAGTHREADCOUNTNEXTTHREAD
THREADLIST
*(deprecated)*
Obtain thread information from RTOS.
Where: STARTFLAG (one hex digit) is one to
indicate the first query and zero to
indicate a subsequent query; THREADCOUNT
(two hex digits) is the maximum number of
threads the response packet can contain;
and NEXTTHREAD (eight hex digits), for
subsequent queries (STARTFLAG is zero), is
returned in the response as ARGTHREAD.
NOTE: this query is replaced by the
`q'`fThreadInfo' query (see above).
reply
`q'`M'COUNTDONEARGTHREADTHREAD...
Where: COUNT (two hex digits) is the
number of threads being returned; DONE
(one hex digit) is zero to indicate more
threads and one indicates no further
threads; ARGTHREADID (eight hex digits) is
NEXTTHREAD from the request packet;
THREAD... is a sequence of thread IDs from
the target. THREADID (eight hex digits).
See `remote.c:parse_threadlist_response()'.
compute CRC `q'`CRC:'ADDR`,'LENGTH
of memory
block
reply `E'NN An error (such as memory fault)
reply `C'CRC32 A 32 bit cyclic redundancy check of the
specified memory region.
query sect `q'`Offsets' Get section offsets that the target used
offs when re-locating the downloaded image.
_Note: while a `Bss' offset is included in
the response, GDB ignores this and instead
applies the `Data' offset to the `Bss'
section._
reply
`Text='XXX`;Data='YYY`;Bss='ZZZ
thread info `q'`P'MODETHREADID
request
Returns information on THREADID. Where:
MODE is a hex encoded 32 bit mode;
THREADID is a hex encoded 64 bit thread ID.
reply * See
`remote.c:remote_unpack_thread_info_response()'.
remote command `q'`Rcmd,'COMMAND
COMMAND (hex encoded) is passed to the
local interpreter for execution. Invalid
commands should be reported using the
output string. Before the final result
packet, the target may also respond with a
number of intermediate `O'OUTPUT console
output packets. _Implementors should note
that providing access to a stubs's
interpreter may have security
implications_.
reply `OK' A command response with no output.
reply OUTPUT A command response with the hex encoded
output string OUTPUT.
reply `E'NN Indicate a badly formed request.
reply `' When `q'`Rcmd' is not recognized.
remote command `q'`Rcmd,'COMMAND
COMMAND (hex encoded) is passed to the
local interpreter for execution. Invalid
commands should be reported using the
output string. Before the final result
packet, the target may also respond with a
number of intermediate `O'OUTPUT console
output packets. _Implementors should note
that providing access to a stubs's
interpreter may have security
implications_.
reply `OK' A command response with no output.
reply OUTPUT A command response with the hex encoded
output string OUTPUT.
reply `E'NN Indicate a badly formed request.
reply `' When `q'`Rcmd' is not recognized.
 
The following `g'/`G' packets have previously been defined. In the
below, some thirty-two bit registers are transferred as sixty-four
687,17 → 687,17
The two nibbles within a register byte are transfered most-significant -
least-significant.
 
MIPS32 All registers are transfered as
thirty-two bit quantities in the
order: 32 general-purpose; sr; lo;
hi; bad; cause; pc; 32
floating-point registers; fsr; fir;
fp.
MIPS64 All registers are transfered as
sixty-four bit quantities (including
thirty-two bit registers such as
`sr'). The ordering is the same as
`MIPS32'.
MIPS32 All registers are transfered as
thirty-two bit quantities in the
order: 32 general-purpose; sr; lo;
hi; bad; cause; pc; 32
floating-point registers; fsr; fir;
fp.
MIPS64 All registers are transfered as
sixty-four bit quantities (including
thirty-two bit registers such as
`sr'). The ordering is the same as
`MIPS32'.
 
Example sequence of a target being re-started. Notice how the
restart does not get any direct output:
897,3 → 897,106
There is currently no way to determine whether a given operating
system is supported other than to try it.
 

File: gdb.info, Node: Configurations, Next: Controlling GDB, Prev: Targets, Up: Top
 
Configuration-Specific Information
**********************************
 
While nearly all GDB commands are available for all native and cross
versions of the debugger, there are some exceptions. This chapter
describes things that are only available in certain configurations.
 
There are three major categories of configurations: native
configurations, where the host and target are the same, embedded
operating system configurations, which are usually the same for several
different processor architectures, and bare embedded processors, which
are quite different from each other.
 
* Menu:
 
* Native::
* Embedded OS::
* Embedded Processors::
* Architectures::
 

File: gdb.info, Node: Native, Next: Embedded OS, Up: Configurations
 
Native
======
 
This section describes details specific to particular native
configurations.
 
* Menu:
 
* HP-UX:: HP-UX
* SVR4 Process Information:: SVR4 process information
 

File: gdb.info, Node: HP-UX, Next: SVR4 Process Information, Up: Native
 
HP-UX
-----
 
On HP-UX systems, if you refer to a function or variable name that
begins with a dollar sign, GDB searches for a user or system name
first, before it searches for a convenience variable.
 

File: gdb.info, Node: SVR4 Process Information, Prev: HP-UX, Up: Native
 
SVR4 process information
------------------------
 
Many versions of SVR4 provide a facility called `/proc' that can be
used to examine the image of a running process using file-system
subroutines. If GDB is configured for an operating system with this
facility, the command `info proc' is available to report on several
kinds of information about the process running your program. `info
proc' works only on SVR4 systems that include the `procfs' code. This
includes OSF/1 (Digital Unix), Solaris, Irix, and Unixware, but not
HP-UX or Linux, for example.
 
`info proc'
Summarize available information about the process.
 
`info proc mappings'
Report on the address ranges accessible in the program, with
information on whether your program may read, write, or execute
each range.
 
`info proc times'
Starting time, user CPU time, and system CPU time for your program
and its children.
 
`info proc id'
Report on the process IDs related to your program: its own process
ID, the ID of its parent, the process group ID, and the session ID.
 
`info proc status'
General information on the state of the process. If the process is
stopped, this report includes the reason for stopping, and any
signal received.
 
`info proc all'
Show all the above information about the process.
 

File: gdb.info, Node: Embedded OS, Next: Embedded Processors, Prev: Native, Up: Configurations
 
Embedded Operating Systems
==========================
 
This section describes configurations involving the debugging of
embedded operating systems that are available for several different
architectures.
 
* Menu:
 
* VxWorks:: Using GDB with VxWorks
 
GDB includes the ability to debug programs running on various
real-time operating systems.
 
/trunk/gdb-5.0/gdb/doc/gdb.info-8
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
26,109 → 26,6
versions.
 

File: gdb.info, Node: Configurations, Next: Controlling GDB, Prev: Targets, Up: Top
 
Configuration-Specific Information
**********************************
 
While nearly all GDB commands are available for all native and cross
versions of the debugger, there are some exceptions. This chapter
describes things that are only available in certain configurations.
 
There are three major categories of configurations: native
configurations, where the host and target are the same, embedded
operating system configurations, which are usually the same for several
different processor architectures, and bare embedded processors, which
are quite different from each other.
 
* Menu:
 
* Native::
* Embedded OS::
* Embedded Processors::
* Architectures::
 

File: gdb.info, Node: Native, Next: Embedded OS, Up: Configurations
 
Native
======
 
This section describes details specific to particular native
configurations.
 
* Menu:
 
* HP-UX:: HP-UX
* SVR4 Process Information:: SVR4 process information
 

File: gdb.info, Node: HP-UX, Next: SVR4 Process Information, Up: Native
 
HP-UX
-----
 
On HP-UX systems, if you refer to a function or variable name that
begins with a dollar sign, GDB searches for a user or system name
first, before it searches for a convenience variable.
 

File: gdb.info, Node: SVR4 Process Information, Prev: HP-UX, Up: Native
 
SVR4 process information
------------------------
 
Many versions of SVR4 provide a facility called `/proc' that can be
used to examine the image of a running process using file-system
subroutines. If GDB is configured for an operating system with this
facility, the command `info proc' is available to report on several
kinds of information about the process running your program. `info
proc' works only on SVR4 systems that include the `procfs' code. This
includes OSF/1 (Digital Unix), Solaris, Irix, and Unixware, but not
HP-UX or Linux, for example.
 
`info proc'
Summarize available information about the process.
 
`info proc mappings'
Report on the address ranges accessible in the program, with
information on whether your program may read, write, or execute
each range.
 
`info proc times'
Starting time, user CPU time, and system CPU time for your program
and its children.
 
`info proc id'
Report on the process IDs related to your program: its own process
ID, the ID of its parent, the process group ID, and the session ID.
 
`info proc status'
General information on the state of the process. If the process is
stopped, this report includes the reason for stopping, and any
signal received.
 
`info proc all'
Show all the above information about the process.
 

File: gdb.info, Node: Embedded OS, Next: Embedded Processors, Prev: Native, Up: Configurations
 
Embedded Operating Systems
==========================
 
This section describes configurations involving the debugging of
embedded operating systems that are available for several different
architectures.
 
* Menu:
 
* VxWorks:: Using GDB with VxWorks
 
GDB includes the ability to debug programs running on various
real-time operating systems.
 

File: gdb.info, Node: VxWorks, Up: Embedded OS
 
Using GDB with VxWorks
1438,3 → 1335,77
`show commands +'
Print ten commands just after the commands last printed.
 

File: gdb.info, Node: Screen Size, Next: Numbers, Prev: History, Up: Controlling GDB
 
Screen size
===========
 
Certain commands to GDB may produce large amounts of information
output to the screen. To help you read all of it, GDB pauses and asks
you for input at the end of each page of output. Type <RET> when you
want to continue the output, or `q' to discard the remaining output.
Also, the screen width setting determines when to wrap lines of output.
Depending on what is being printed, GDB tries to break the line at a
readable place, rather than simply letting it overflow onto the
following line.
 
Normally GDB knows the size of the screen from the terminal driver
software. For example, on Unix GDB uses the termcap data base together
with the value of the `TERM' environment variable and the `stty rows'
and `stty cols' settings. If this is not correct, you can override it
with the `set height' and `set width' commands:
 
`set height LPP'
`show height'
`set width CPL'
`show width'
These `set' commands specify a screen height of LPP lines and a
screen width of CPL characters. The associated `show' commands
display the current settings.
 
If you specify a height of zero lines, GDB does not pause during
output no matter how long the output is. This is useful if output
is to a file or to an editor buffer.
 
Likewise, you can specify `set width 0' to prevent GDB from
wrapping its output.
 

File: gdb.info, Node: Numbers, Next: Messages/Warnings, Prev: Screen Size, Up: Controlling GDB
 
Numbers
=======
 
You can always enter numbers in octal, decimal, or hexadecimal in
GDB by the usual conventions: octal numbers begin with `0', decimal
numbers end with `.', and hexadecimal numbers begin with `0x'. Numbers
that begin with none of these are, by default, entered in base 10;
likewise, the default display for numbers--when no particular format is
specified--is base 10. You can change the default base for both input
and output with the `set radix' command.
 
`set input-radix BASE'
Set the default base for numeric input. Supported choices for
BASE are decimal 8, 10, or 16. BASE must itself be specified
either unambiguously or using the current default radix; for
example, any of
 
set radix 012
set radix 10.
set radix 0xa
 
sets the base to decimal. On the other hand, `set radix 10'
leaves the radix unchanged no matter what it was.
 
`set output-radix BASE'
Set the default base for numeric display. Supported choices for
BASE are decimal 8, 10, or 16. BASE must itself be specified
either unambiguously or using the current default radix.
 
`show input-radix'
Display the current default base for numeric input.
 
`show output-radix'
Display the current default base for numeric display.
 
/trunk/gdb-5.0/gdb/doc/gdb.info-9
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
26,80 → 26,6
versions.
 

File: gdb.info, Node: Screen Size, Next: Numbers, Prev: History, Up: Controlling GDB
 
Screen size
===========
 
Certain commands to GDB may produce large amounts of information
output to the screen. To help you read all of it, GDB pauses and asks
you for input at the end of each page of output. Type <RET> when you
want to continue the output, or `q' to discard the remaining output.
Also, the screen width setting determines when to wrap lines of output.
Depending on what is being printed, GDB tries to break the line at a
readable place, rather than simply letting it overflow onto the
following line.
 
Normally GDB knows the size of the screen from the terminal driver
software. For example, on Unix GDB uses the termcap data base together
with the value of the `TERM' environment variable and the `stty rows'
and `stty cols' settings. If this is not correct, you can override it
with the `set height' and `set width' commands:
 
`set height LPP'
`show height'
`set width CPL'
`show width'
These `set' commands specify a screen height of LPP lines and a
screen width of CPL characters. The associated `show' commands
display the current settings.
 
If you specify a height of zero lines, GDB does not pause during
output no matter how long the output is. This is useful if output
is to a file or to an editor buffer.
 
Likewise, you can specify `set width 0' to prevent GDB from
wrapping its output.
 

File: gdb.info, Node: Numbers, Next: Messages/Warnings, Prev: Screen Size, Up: Controlling GDB
 
Numbers
=======
 
You can always enter numbers in octal, decimal, or hexadecimal in
GDB by the usual conventions: octal numbers begin with `0', decimal
numbers end with `.', and hexadecimal numbers begin with `0x'. Numbers
that begin with none of these are, by default, entered in base 10;
likewise, the default display for numbers--when no particular format is
specified--is base 10. You can change the default base for both input
and output with the `set radix' command.
 
`set input-radix BASE'
Set the default base for numeric input. Supported choices for
BASE are decimal 8, 10, or 16. BASE must itself be specified
either unambiguously or using the current default radix; for
example, any of
 
set radix 012
set radix 10.
set radix 0xa
 
sets the base to decimal. On the other hand, `set radix 10'
leaves the radix unchanged no matter what it was.
 
`set output-radix BASE'
Set the default base for numeric display. Supported choices for
BASE are decimal 8, 10, or 16. BASE must itself be specified
either unambiguously or using the current default radix.
 
`show input-radix'
Display the current default base for numeric input.
 
`show output-radix'
Display the current default base for numeric display.
 

File: gdb.info, Node: Messages/Warnings, Next: Debugging Output, Prev: Numbers, Up: Controlling GDB
 
Optional warnings and messages
875,7 → 801,7
where FUNCTION-NAME is the name of the function executing in the
frame, or `??' if not known, and ARGUMENTS are the arguments to
the frame, with parentheses around them (each argument is annotated
individually as well, *note Value Annotations::.).
individually as well, *note Value Annotations::).
 
If source information is available, a reference to it is then
printed:
904,7 → 830,7
 
Then, if source is to actually be displayed for this frame (for
example, this is not true for output from the `backtrace'
command), then a `source' annotation (*note Source Annotations::.)
command), then a `source' annotation (*note Source Annotations::)
is displayed. Unlike most annotations, this is output instead of
the normal text which would be output, not in addition.
 
1501,3 → 1427,67
* GDB/MI Stream Records::
* GDB/MI Out-of-band Records::
 

File: gdb.info, Node: GDB/MI Result Records, Next: GDB/MI Stream Records, Up: GDB/MI Output Records
 
GDB/MI Result Records
---------------------
 
In addition to a number of out-of-band notifications, the response
to a GDB/MI command includes one of the following result indications:
 
`"^done" [ "," RESULTS ]'
The synchronous operation was successful, `RESULTS' is the return
value.
 
`"^running"'
The asynchronous operation was successfully started. The target is
running.
 
`"^error" "," C-STRING'
The operation failed. The `C-STRING' contains the corresponding
error message.
 

File: gdb.info, Node: GDB/MI Stream Records, Next: GDB/MI Out-of-band Records, Prev: GDB/MI Result Records, Up: GDB/MI Output Records
 
GDB/MI Stream Records
---------------------
 
GDB internally maintains a number of output streams: the console, the
target, and the log. The output intended for each of these streams is
funneled through the GDB/MI interface using "stream records".
 
Each stream record begins with a unique "prefix character" which
identifies its stream (*note GDB/MI Output Syntax: GDB/MI Output
Syntax.). In addition to the prefix, each stream record contains a
`STRING-OUTPUT'. This is either raw text (with an implicit new line)
or a quoted C string (which does not contain an implicit newline).
 
`"~" STRING-OUTPUT'
The console output stream contains text that should be displayed
in the CLI console window. It contains the textual responses to
CLI commands.
 
`"@" STRING-OUTPUT'
The target output stream contains any textual output from the
running target.
 
`"&" STRING-OUTPUT'
The LOG stream contains debugging messages being produced by GDB's
internals.
 

File: gdb.info, Node: GDB/MI Out-of-band Records, Prev: GDB/MI Stream Records, Up: GDB/MI Output Records
 
GDB/MI Out-of-band Records
--------------------------
 
"Out-of-band" records are used to notify the GDB/MI client of
additional changes that have occurred. Those changes can either be a
consequence of GDB/MI (e.g., a breakpoint modified) or a result of
target activity (e.g., target stopped).
 
The following is a preliminary list of possible out-of-band records.
 
`"*" "stop"'
/trunk/gdb-5.0/gdb/doc/gdb.info-10
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
26,70 → 26,6
versions.
 

File: gdb.info, Node: GDB/MI Result Records, Next: GDB/MI Stream Records, Up: GDB/MI Output Records
 
GDB/MI Result Records
---------------------
 
In addition to a number of out-of-band notifications, the response
to a GDB/MI command includes one of the following result indications:
 
`"^done" [ "," RESULTS ]'
The synchronous operation was successful, `RESULTS' is the return
value.
 
`"^running"'
The asynchronous operation was successfully started. The target is
running.
 
`"^error" "," C-STRING'
The operation failed. The `C-STRING' contains the corresponding
error message.
 

File: gdb.info, Node: GDB/MI Stream Records, Next: GDB/MI Out-of-band Records, Prev: GDB/MI Result Records, Up: GDB/MI Output Records
 
GDB/MI Stream Records
---------------------
 
GDB internally maintains a number of output streams: the console, the
target, and the log. The output intended for each of these streams is
funneled through the GDB/MI interface using "stream records".
 
Each stream record begins with a unique "prefix character" which
identifies its stream (*note GDB/MI Output Syntax: GDB/MI Output
Syntax.). In addition to the prefix, each stream record contains a
`STRING-OUTPUT'. This is either raw text (with an implicit new line)
or a quoted C string (which does not contain an implicit newline).
 
`"~" STRING-OUTPUT'
The console output stream contains text that should be displayed
in the CLI console window. It contains the textual responses to
CLI commands.
 
`"@" STRING-OUTPUT'
The target output stream contains any textual output from the
running target.
 
`"&" STRING-OUTPUT'
The LOG stream contains debugging messages being produced by GDB's
internals.
 

File: gdb.info, Node: GDB/MI Out-of-band Records, Prev: GDB/MI Stream Records, Up: GDB/MI Output Records
 
GDB/MI Out-of-band Records
--------------------------
 
"Out-of-band" records are used to notify the GDB/MI client of
additional changes that have occurred. Those changes can either be a
consequence of GDB/MI (e.g., a breakpoint modified) or a result of
target activity (e.g., target stopped).
 
The following is a preliminary list of possible out-of-band records.
 
`"*" "stop"'

File: gdb.info, Node: GDB/MI Command Description Format, Next: GDB/MI Breakpoint Table Commands, Prev: GDB/MI Output Records, Up: GDB/MI
 
GDB/MI Command Description Format
/trunk/gdb-5.0/gdb/doc/gdb.info-11
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
992,20 → 992,20
The following is the complete set of flathead operations defined to
access this functionality:
 
*Operation* *Description*
-var-create create a variable object
-var-delete delete the variable object and its children
-var-set-format set the display format of this variable
-var-show-format show the display format of this variable
-var-info-num-children tells how many children this object has
-var-list-children return a list of the object's children
-var-info-type show the type of this variable object
-var-info-expression print what this variable object represents
-var-show-attributes is this variable editable? does it exist
here?
-var-evaluate-expressionget the value of this variable
-var-assign set the value of this variable
-var-update update the variable and its children
*Operation* *Description*
-var-create create a variable object
-var-delete delete the variable object and its children
-var-set-format set the display format of this variable
-var-show-format show the display format of this variable
-var-info-num-children tells how many children this object has
-var-list-children return a list of the object's children
-var-info-type show the type of this variable object
-var-info-expression print what this variable object represents
-var-show-attributes is this variable editable? does it exist
here?
-var-evaluate-expressionget the value of this variable
-var-assign set the value of this variable
-var-update update the variable and its children
 
In the next subsection we describe each operation in detail and
suggest how it can be used.
1587,8 → 1587,7
 
In addition, several keys have their own names. Specifically,
<DEL>, <ESC>, <LFD>, <SPC>, <RET>, and <TAB> all stand for themselves
when seen in this text, or in an init file (*note Readline Init
File::.).
when seen in this text, or in an init file (*note Readline Init File::).
 

File: gdb.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing
/trunk/gdb-5.0/gdb/doc/gdb.info-12
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
61,7 → 61,7
There are only a few basic constructs allowed in the Readline init
file. Blank lines are ignored. Lines beginning with a `#' are
comments. Lines beginning with a `$' indicate conditional constructs
(*note Conditional Init Constructs::.). Other lines denote variable
(*note Conditional Init Constructs::). Other lines denote variable
settings and key bindings.
 
Variable Settings
143,7 → 143,7
`isearch-terminators'
The string of characters that should terminate an incremental
search without subsequently executing the character as a
command (*note Searching::.). If this variable has not been
command (*note Searching::). If this variable has not been
given a value, the characters <ESC> and <C-J> will terminate
an incremental search.
 
/trunk/gdb-5.0/gdb/doc/gdb.info-13
1,4 → 1,4
This is ./gdb.info, produced by Makeinfo version 3.12f from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
 
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
183,86 → 183,6
* .vxgdbinit: Command Files.
* /proc: SVR4 Process Information.
* @, referencing memory as an array: Arrays.
* AMD 29K register stack: A29K.
* AMD EB29K: A29K Embedded.
* AMD29K via UDI: A29K UDI.
* AT&T disassembly flavor: Machine Code.
* Alpha stack: MIPS.
* C and C++: C.
* C and C++ checks: C Checks.
* C and C++ constants: C Constants.
* C and C++ defaults: C Defaults.
* C and C++ operators: C Operators.
* C++: C.
* C++ and object formats: C plus plus expressions.
* C++ exception handling: Debugging C plus plus.
* C++ scope resolution: Variables.
* C++ support, not in COFF: C plus plus expressions.
* C++ symbol decoding style: Print Settings.
* C++ symbol display: Debugging C plus plus.
* COFF versus C++: C plus plus expressions.
* Chill: Summary.
* EB29K board: A29K EB29K.
* EBMON: Comms (EB29K).
* ECOFF and C++: C plus plus expressions.
* ELF/DWARF and C++: C plus plus expressions.
* ELF/stabs and C++: C plus plus expressions.
* Emacs: Emacs.
* Fortran: Summary.
* Fujitsu: Remote Serial.
* GDB bugs, reporting: Bug Reporting.
* GDB reference card: Formatting Documentation.
* GDB/MI, breakpoint commands: GDB/MI Breakpoint Table Commands.
* GDB/MI, compatibility with CLI: GDB/MI Compatibility with CLI.
* GDB/MI, data manipulation: GDB/MI Data Manipulation.
* GDB/MI, draft changes to output syntax: GDB/MI Draft Changes to Output Syntax.
* GDB/MI, input syntax: GDB/MI Input Syntax.
* GDB/MI, its purpose: GDB/MI.
* GDB/MI, out-of-band records: GDB/MI Out-of-band Records.
* GDB/MI, output syntax: GDB/MI Output Syntax.
* GDB/MI, result records: GDB/MI Result Records.
* GDB/MI, simple examples: GDB/MI Simple Examples.
* GDB/MI, stream records: GDB/MI Stream Records.
* GDBHISTFILE: History.
* GNU C++: C.
* GNU Emacs: Emacs.
* H8/300 or H8/500 download: H8/300.
* Hitachi: Remote Serial.
* Hitachi SH download: H8/300.
* INCLUDE_RDB: VxWorks.
* Intel: Remote Serial.
* Intel disassembly flavor: Machine Code.
* KOD: KOD.
* MIPS boards: MIPS Embedded.
* MIPS remote floating point: MIPS Embedded.
* MIPS remotedebug protocol: MIPS Embedded.
* MIPS stack: MIPS.
* Modula-2: Summary.
* Modula-2 built-ins: M2 Operators.
* Modula-2 checks: M2 Checks.
* Modula-2 constants: Built-In Func/Proc.
* Modula-2 defaults: M2 Defaults.
* Modula-2 operators: M2 Operators.
* Modula-2, GDB support: Modula-2.
* Modula-2, deviations from: Deviations.
* Motorola 680x0: Remote Serial.
* New SYSTAG message: Threads.
* New SYSTAG message, on HP-UX: Threads.
* Nindy: i960.
* Pascal: Summary.
* RET (repeat last command): Command Syntax.
* SH: Remote Serial.
* ST2000 auxiliary commands: ST2000.
* STDBUG commands (ST2000): ST2000.
* Sparc: Remote Serial.
* SparcLite: Remote Serial.
* Sparclet: Sparclet.
* TCP port, target remote: Debug Session.
* UDI: A29K UDI.
* VxWorks: VxWorks.
* XCOFF and C++: C plus plus expressions.
* Z8000: Z8000.
* Zilog Z8000 simulator: Z8000.
* ^done: GDB/MI Result Records.
* ^error: GDB/MI Result Records.
* ^running: GDB/MI Result Records.
274,6 → 194,10
* active targets: Active Targets.
* add-shared-symbol-file: Files.
* add-symbol-file: Files.
* Alpha stack: MIPS.
* AMD 29K register stack: A29K.
* AMD EB29K: A29K Embedded.
* AMD29K via UDI: A29K UDI.
* annotations: Annotations Overview.
* annotations for breakpoints: Breakpoint Info.
* annotations for display: Displays.
295,6 → 219,7
* assembly instructions: Machine Code.
* assignment: Assignment.
* async output in GDB/MI: GDB/MI Output Syntax.
* AT&T disassembly flavor: Machine Code.
* attach: Attach.
* automatic display: Auto Display.
* automatic thread selection: Threads.
334,6 → 259,18
* bug reports: Bug Reporting.
* bugs in GDB: GDB Bugs.
* c (continue): Continuing and Stepping.
* C and C++: C.
* C and C++ checks: C Checks.
* C and C++ constants: C Constants.
* C and C++ defaults: C Defaults.
* C and C++ operators: C Operators.
* C++: C.
* C++ and object formats: C plus plus expressions.
* C++ exception handling: Debugging C plus plus.
* C++ scope resolution: Variables.
* C++ support, not in COFF: C plus plus expressions.
* C++ symbol decoding style: Print Settings.
* C++ symbol display: Debugging C plus plus.
* call: Calling.
* call overloaded functions: C plus plus expressions.
* call stack: Stack.
360,10 → 297,12
* checks, range: Type Checking.
* checks, type: Checks.
* checksum, for GDB remote: Protocol.
* Chill: Summary.
* choosing target byte order: Byte Order.
* clear: Delete Breaks.
* clear-screen (C-l): Commands For Moving.
* clearing breakpoints, watchpoints, catchpoints: Delete Breaks.
* COFF versus C++: C plus plus expressions.
* colon, doubled as scope operator: M2 Scope.
* colon-colon, context for variables/functions: Variables.
* colon-colon, in Modula-2: M2 Scope.
426,7 → 365,7
* demangling: Print Settings.
* detach: Attach.
* device: Hitachi Boards.
* digit-argument (M-0, M-1, ... M-): Numeric Arguments.
* digit-argument (M-0, M-1, ... M--): Numeric Arguments.
* dir: Source Path.
* directories for source files: Source Path.
* directory: Source Path.
465,14 → 404,20
* dump-variables (): Miscellaneous Commands.
* dynamic linking: Files.
* eb.log, a log file for EB29K: Remote Log.
* EB29K board: A29K EB29K.
* EBMON: Comms (EB29K).
* echo: Output.
* ECOFF and C++: C plus plus expressions.
* editing: Editing.
* editing command lines: Readline Bare Essentials.
* editing-mode: Readline Init File Syntax.
* ELF/DWARF and C++: C plus plus expressions.
* ELF/stabs and C++: C plus plus expressions.
* else: Define.
* elt: Value Annotations.
* elt-rep: Value Annotations.
* elt-rep-end: Value Annotations.
* Emacs: Emacs.
* enable: Disabling.
* enable breakpoints: Disabling.
* enable display: Auto Display.
524,6 → 469,7
* fork, debugging programs which call: Processes.
* format options: Print Settings.
* formatted output: Output Formats.
* Fortran: Summary.
* forward-backward-delete-char (): Commands For Text.
* forward-char (C-f): Commands For Moving.
* forward-search: Search.
548,13 → 494,31
* frame-where: Frame Annotations.
* frameless execution: Frames.
* frames-invalid: Invalidation.
* Fujitsu: Remote Serial.
* function-call: Frame Annotations.
* g++, GNU C++ compiler: C.
* GDB bugs, reporting: Bug Reporting.
* GDB reference card: Formatting Documentation.
* gdb.ini: Command Files.
* GDB/MI, breakpoint commands: GDB/MI Breakpoint Table Commands.
* GDB/MI, compatibility with CLI: GDB/MI Compatibility with CLI.
* GDB/MI, data manipulation: GDB/MI Data Manipulation.
* GDB/MI, draft changes to output syntax: GDB/MI Draft Changes to Output Syntax.
* GDB/MI, input syntax: GDB/MI Input Syntax.
* GDB/MI, its purpose: GDB/MI.
* GDB/MI, out-of-band records: GDB/MI Out-of-band Records.
* GDB/MI, output syntax: GDB/MI Output Syntax.
* GDB/MI, result records: GDB/MI Result Records.
* GDB/MI, simple examples: GDB/MI Simple Examples.
* GDB/MI, stream records: GDB/MI Stream Records.
* GDBHISTFILE: History.
* gdbserve.nlm: NetWare.
* gdbserver: Server.
* getDebugChar: Bootstrapping.
* GNU C++: C.
* GNU Emacs: Emacs.
* h (help): Help.
* H8/300 or H8/500 download: H8/300.
* handle: Signals.
* handle_exception: Stub Contents.
* handling signals: Signals.
574,6 → 538,8
* history substitution: History.
* history-search-backward (): Commands For History.
* history-search-forward (): Commands For History.
* Hitachi: Remote Serial.
* Hitachi SH download: H8/300.
* hooks, for commands: Hooks.
* horizontal-scroll-mode: Readline Init File Syntax.
* i (info): Help.
584,6 → 550,7
* if: Define.
* ignore: Conditions.
* ignore count (of breakpoint): Conditions.
* INCLUDE_RDB: VxWorks.
* info: Help.
* info address: Symbols.
* info all-registers: Registers.
635,6 → 602,8
* inspect: Data.
* installation: Installing GDB.
* instructions, assembly: Machine Code.
* Intel: Remote Serial.
* Intel disassembly flavor: Machine Code.
* interaction, readline: Readline Interaction.
* internal GDB breakpoints: Set Breaks.
* interrupt: Quitting GDB.
653,6 → 622,7
* kill-whole-line (): Commands For Killing.
* kill-word (M-d): Commands For Killing.
* killing text: Readline Killing Commands.
* KOD: KOD.
* l (list): List.
* languages: Languages.
* latest breakpoint: Set Breaks.
680,6 → 650,19
* memset: Bootstrapping.
* menu-complete (): Commands For Completion.
* meta-flag: Readline Init File Syntax.
* MIPS boards: MIPS Embedded.
* MIPS remote floating point: MIPS Embedded.
* MIPS remotedebug protocol: MIPS Embedded.
* MIPS stack: MIPS.
* Modula-2: Summary.
* Modula-2 built-ins: M2 Operators.
* Modula-2 checks: M2 Checks.
* Modula-2 constants: Built-In Func/Proc.
* Modula-2 defaults: M2 Defaults.
* Modula-2 operators: M2 Operators.
* Modula-2, deviations from: Deviations.
* Modula-2, GDB support: Modula-2.
* Motorola 680x0: Remote Serial.
* multiple processes: Processes.
* multiple targets: Active Targets.
* multiple threads: Threads.
687,10 → 670,13
* names of symbols: Symbols.
* namespace in C++: C plus plus expressions.
* negative breakpoint numbers: Set Breaks.
* New SYSTAG message: Threads.
* New SYSTAG message, on HP-UX: Threads.
* next: Continuing and Stepping.
* next-history (C-n): Commands For History.
* nexti: Continuing and Stepping.
* ni (nexti): Continuing and Stepping.
* Nindy: i960.
* non-incremental-forward-search-history (M-n): Commands For History.
* non-incremental-reverse-search-history (M-p): Commands For History.
* notation, readline: Readline Bare Essentials.
714,6 → 700,7
* overloading in C++: Debugging C plus plus.
* packets, reporting on stdout: Debugging Output.
* partial symbol dump: Symbols.
* Pascal: Summary.
* patching binaries: Patching.
* path: Environment.
* pauses in output: Screen Size.
790,6 → 777,7
* response time, MIPS debugging: MIPS.
* result records in GDB/MI: GDB/MI Result Records.
* resuming execution: Continuing and Stepping.
* RET (repeat last command): Command Syntax.
* retransmit-timeout, MIPS protocol: MIPS Embedded.
* return: Returning.
* returning from a function: Returning.
799,8 → 787,8
* run: Starting.
* running: Starting.
* running 29K programs: A29K EB29K.
* running and debugging Sparclet programs: Sparclet Execution.
* running VxWorks tasks: VxWorks Attach.
* running and debugging Sparclet programs: Sparclet Execution.
* running, on Sparclet: Sparclet.
* rwatch: Set Watchpoints.
* s (step): Continuing and Stepping.
890,6 → 878,7
* set_debug_traps: Stub Contents.
* setting variables: Assignment.
* setting watchpoints: Set Watchpoints.
* SH: Remote Serial.
* sh-stub.c: Remote Serial.
* share: Files.
* shared libraries: Files.
975,9 → 964,13
* source <1>: Source Annotations.
* source: Command Files.
* source path: Source Path.
* Sparc: Remote Serial.
* sparc-stub.c: Remote Serial.
* sparcl-stub.c: Remote Serial.
* Sparclet: Sparclet.
* SparcLite: Remote Serial.
* speed: Hitachi Boards.
* ST2000 auxiliary commands: ST2000.
* st2000 CMD: ST2000.
* stack frame: Frames.
* stack on Alpha: MIPS.
988,6 → 981,7
* starting <1>: Annotations for Running.
* starting: Starting.
* status output in GDB/MI: GDB/MI Output Syntax.
* STDBUG commands (ST2000): ST2000.
* step: Continuing and Stepping.
* stepi: Continuing and Stepping.
* stepping: Continuing and Stepping.
1055,10 → 1049,10
* target vxworks: VxWorks.
* target w89k: PA.
* tbreak: Set Breaks.
* TCP port, target remote: Debug Session.
* terminal: Input/Output.
* thbreak: Set Breaks.
* this, inside C++ member functions: C plus plus expressions.
* thread THREADNO: Threads.
* thread apply: Threads.
* thread breakpoints: Thread Stops.
* thread identifier (GDB): Threads.
1065,6 → 1059,7
* thread identifier (system): Threads.
* thread identifier (system), on HP-UX: Threads.
* thread number: Threads.
* thread THREADNO: Threads.
* threads and watchpoints: Set Watchpoints.
* threads of execution: Threads.
* threads, automatic switching: Threads.
1080,6 → 1075,7
* type conversions in C++: C plus plus expressions.
* u (until): Continuing and Stepping.
* udi: A29K UDI.
* UDI: A29K UDI.
* undisplay: Auto Display.
* undo (C-_, C-x C-u): Miscellaneous Commands.
* universal-argument (): Numeric Arguments.
1104,6 → 1100,7
* variables, setting: Assignment.
* version number: Help.
* visible-stats: Readline Init File Syntax.
* VxWorks: VxWorks.
* vxworks-timeout: VxWorks.
* watch: Set Watchpoints.
* watchpoint: Annotations for Running.
1122,11 → 1119,14
* wrong values: Variables.
* x (examine memory): Memory.
* x(examine), and info line: Machine Code.
* XCOFF and C++: C plus plus expressions.
* yank (C-y): Commands For Killing.
* yank-last-arg (M-., M-_): Commands For History.
* yank-nth-arg (M-C-y): Commands For History.
* yank-pop (M-y): Commands For Killing.
* yanking text: Readline Killing Commands.
* Z8000: Z8000.
* Zilog Z8000 simulator: Z8000.
* {TYPE}: Expressions.
 
 
/trunk/gdb-5.0/gdb/jtag.c
333,14 → 333,16
static int ReadResponse(int fd,void* buffer,int len)
{
int32_t status = 0;
int result = jtag_proxy_read(fd,&status,4);
int result;
char* buf = (char*)buffer;
 
result = jtag_proxy_read(fd,&status,4);
 
status = ntohl(status);
*((int32_t*)buffer) = status;
 
if(result) return result;
if(status) return status;
if(result) {printf("result %i %x\n", result, result); return result;}
if(status) {printf("status %i %x\n", status, status); return status;}
 
result = jtag_proxy_read(fd,&buf[4],len-4);
return result;
573,6 → 575,10
int crc_read, crc_write, crc_ok, retry;
int result;
 
#ifdef DEBUG_JTAG
printf_unfiltered ("write reg %x <- %x\n", regno, data);
fflush (stdout);
#endif
switch(connection.location) /* CZ */
{
case JTAG_LOCAL:
633,6 → 639,10
error("jtag_write_reg called with no connection!");
break;
}
#ifdef DEBUG_JTAG
printf_unfiltered ("!write reg\n");
fflush (stdout);
#endif
}
 
/* Reads register/memory from regno. */
645,6 → 655,10
int crc_read, crc_write, crc_actual_read, retry, crc_ok;
int result;
 
#ifdef DEBUG_JTAG
printf_unfiltered ("read reg %x\n", regno);
fflush (stdout);
#endif
switch(connection.location)
{
case JTAG_LOCAL:
705,6 → 719,10
break;
}
#ifdef DEBUG_JTAG
printf_unfiltered ("read reg %x\n", data);
fflush (stdout);
#endif
return data; /* CZ */
}
 
713,6 → 731,16
unsigned long* buffer = (unsigned long*)data;
int i,result;
 
if(nRegisters == 1) {
jtag_write_reg(regno, *buffer);
return err;
}
#ifdef DEBUG_JTAG
printf_unfiltered ("write block %x,%i\n", regno, nRegisters);
fflush (stdout);
#endif
 
err = 0;
switch(connection.location)
{
731,7 → 759,11
error("jtag_write_reg called with no connection!");
break;
}
 
#ifdef DEBUG_JTAG
printf_unfiltered ("!write block\n");
fflush (stdout);
#endif
return err;
}
 
740,6 → 772,15
unsigned long* buffer = (unsigned long*)data;
int i,result;
 
#ifdef DEBUG_JTAG
printf_unfiltered ("read block %x,%i\n", regno, nRegisters);
fflush (stdout);
#endif
 
/* if(nRegisters == 1) {
*buffer = jtag_read_reg(regno);
return err;
}*/
err = 0;
switch(connection.location)
{
759,6 → 800,10
break;
}
 
#ifdef DEBUG_JTAG
printf_unfiltered ("read block\n");
fflush (stdout);
#endif
return err;
}
 
770,6 → 815,10
{
int result;
 
#ifdef DEBUG_JTAG
printf_unfiltered ("set chain %x\n", chain);
fflush (stdout);
#endif
switch(connection.location)
{
case JTAG_LOCAL:
780,7 → 829,7
 
current_chain = chain;
jp1_prepare_control ();
 
jp1_write_JTAG (0); /* CAPTURE_IR */
jp1_write_JTAG (0); /* SHIFT_IR */
 
826,6 → 875,10
error("jtag_set_chain called with no connection!");
break;
}
#ifdef DEBUG_JTAG
printf_unfiltered ("!set chain\n");
fflush (stdout);
#endif
}
 
/* Added by CZ 24/05/01 */
952,6 → 1005,10
char *port_name;
char **argv;
 
#ifdef DEBUG_JTAG
printf_unfiltered ("INIT\n");
fflush(stdout);
#endif
if (args == 0) /* CZ */
error ( "To open a or1k remote debugging connection, you need to specify a "
"parallel port\nconnected to the target board, or else a remote "
1047,7 → 1104,6
connection.device.fd = 0;
break;
default:
error("No jtag connection specified!");
break;
}
connection.location = JTAG_NOT_CONNECTED;
/trunk/gdb-5.0/gdb/remote-or1k.c
40,6 → 40,8
#include <sys/ioctl.h>
#include <fcntl.h>
 
#define debug if (remote_debug) printf_unfiltered
 
/* The following prototype is necessary or the compiler will not
correctly promote the data argument to ULONGEST */
static void or1k_write_reg (unsigned int, ULONGEST);
149,7 → 151,7
/* Error last occured, zero = ok. */
int err = 0;
 
/* Nonzero, if we changed something. */
/* Nonzero, if we changed something (except DMR1 which is updated on every run anyway). */
int debug_regs_changed;
 
/* Number of interrupts while waiting for process. */
177,8 → 179,13
unsigned int dvr[MAX_MATCHPOINTS];
struct dcr_struct dcr[MAX_MATCHPOINTS];
 
/* Number of matchpoint users */
int matchpoint_user_count[MAX_MATCHPOINTS] = {0};
 
/* Old SIGINT handler. */
static void (*ofunc) PARAMS ((int));
 
 
/* Handle low-level error that we can't recover from. Note that just
error()ing out from target_wait or some such low-level place will cause
all hell to break loose--the rest of GDB will tend to get left in an
295,7 → 302,7
unsigned int data;
{
or1k_set_chain (SC_RISC_DEBUG);
or1k_write_reg (regno + REG_SPACE, (ULONGEST)data);
or1k_write_reg (regno, (ULONGEST)data);
}
 
/* Reads register SPR from regno. */
305,9 → 312,30
unsigned int regno;
{
or1k_set_chain (SC_RISC_DEBUG);
return or1k_read_reg (regno + REG_SPACE);
return or1k_read_reg (regno);
}
 
/* Sets mem to data. */
 
void
or1k_write_mem (addr, data)
unsigned int addr;
unsigned int data;
{
or1k_set_chain (SC_WISHBONE);
or1k_write_reg (addr, (ULONGEST)data);
}
 
/* Reads register SPR from regno. */
 
unsigned int
or1k_read_mem (addr)
unsigned int addr;
{
or1k_set_chain (SC_WISHBONE);
return or1k_read_reg (addr);
}
 
/* CZ 15/09/01 -- This is hacked in right now. This should
probably NOT be called directly, but at the moment I don't
have the time to figure out how to do it right. The problem
371,11 → 399,11
or1k_set_chain (SC_REGISTER);
val = or1k_read_reg (JTAG_RISCOP);
or1k_write_reg (JTAG_RISCOP, val | 1);
or1k_read_reg (JTAG_RISCOP);
 
/* Be cautious - disable trace. */
val = or1k_read_reg (JTAG_MODER);
or1k_write_reg (JTAG_MODER, val & ~2);
or1k_flush_pipeline ();
}
 
/* Unstalls the CPU. */
389,6 → 417,7
or1k_set_chain (SC_REGISTER);
val = or1k_read_reg (JTAG_RISCOP);
or1k_write_reg (JTAG_RISCOP, val & ~1);
or1k_read_reg (JTAG_RISCOP);
}
 
/* Resets the CPU and stalls it. */
397,6 → 426,8
or1k_reset ()
{
unsigned int val;
int i;
debug ("%08x\n", or1k_read_reg (JTAG_RISCOP));
or1k_set_chain (SC_REGISTER);
 
/* Be cautious - disable trace. */
408,15 → 439,17
/* Assert reset signal. */
or1k_write_reg (JTAG_RISCOP, val | 3);
 
/* Just do something */
for (i = 0; i < 100; i++)
or1k_read_reg (JTAG_RISCOP);
 
/* give it some time */
usleep (1000);
or1k_flush_pipeline ();
 
or1k_set_chain (SC_REGISTER); /* CZ: Changed 16/06/01...must reset
scan chain after flush_pipeline() */
or1k_set_chain (SC_REGISTER);
/* Release reset signal, but keep in stall state. */
or1k_write_reg (JTAG_RISCOP, val | 1);
or1k_flush_pipeline ();
or1k_read_reg (JTAG_RISCOP);
}
 
/* Synchronizes debug registers in memory with those on target,
494,8 → 527,11
if (current_or1k_target != NULL && current_or1k_target->to_init != NULL)
current_or1k_target->to_init (args);
 
or1k_reset ();
debug("%08x\n", read_pc ());
or1k_stall ();
debug("%08x\n", read_pc ());
usleep (1000);
 
/* Determine implementation configuration. */
or1k_implementation.VR = or1k_read_spr_reg (VR_SPRNUM);
or1k_implementation.UPR = or1k_read_spr_reg (UPR_SPRNUM);
544,8 → 580,11
if (err != 0)
error ("Cannot connect.");
 
/* Enable exceptions */
or1k_write_spr_reg (SR_SPRNUM, or1k_read_spr_reg(SR_SPRNUM) | 0x2);
 
/* Stop when breakpoint occurs. */
or1k_write_spr_reg (DSR_SPRNUM, 0x1000);
or1k_write_spr_reg (DSR_SPRNUM, 0x2000);
 
do_cleanups (old_cleanups);
 
605,6 → 644,26
print_stack_frame (selected_frame, -1, 1);
}
 
/* This is the generic stop called via the target vector. When a target
interrupt is requested, either by the command line or the GUI, we
will eventually end up here. */
static void
or1k_stop ()
{
/* Send a break or a ^C, depending on user preference. */
debug ("remote_stop called\n");
 
/* We should not stop the target immediately, since it can be in an
unfinished state. So we do a single step. This should not affect
on anything. */
or1k_stall ();
/* HW STEP. Set DMR1_ST. */
dmr1 |= DMR1_ST;
or1k_write_spr_reg (DMR1_SPRNUM, dmr1);
dmr1 &= ~DMR1_ST;
or1k_unstall ();
}
 
/* Close a connection to the remote board. */
 
static void
674,6 → 733,57
fclose (fd);
}
 
/* ^C Interrupt handling */
 
/* Ask the user what to do when an interrupt is received. */
static void
interrupt_query ()
{
target_terminal_ours ();
 
if (query ("Interrupted while waiting for the program.\n\
Give up (and stop debugging it)? "))
{
target_mourn_inferior ();
return_to_top_level (RETURN_QUIT);
}
 
target_terminal_inferior ();
}
 
static void or1k_interrupt_twice (int signo);
 
 
/* The command line interface's stop routine. This function is installed
as a signal handler for SIGINT. The first time a user requests a
stop, we call remote_stop to send a break or ^C. If there is no
response from the target (it didn't stop when the user requested it),
we ask the user if he'd like to detach from the target. */
static void
or1k_interrupt (signo)
int signo;
{
debug ("interrupt");
/* If this doesn't work, try more severe steps. */
signal (signo, or1k_interrupt_twice);
 
debug ("remote_interrupt called\n");
 
interrupt_count++;
}
 
/* The user typed ^C twice. */
 
static void
or1k_interrupt_twice (signo)
int signo;
{
debug ("interrupt2");
signal (signo, ofunc);
interrupt_query ();
signal (signo, or1k_interrupt);
}
 
/* Resume execution of the target process. STEP says whether to single-step
or to run free; SIGGNAL is the signal value (e.g. SIGINT) to be given
to the target, or zero for no signal. */
682,7 → 792,9
or1k_resume (pid, step, siggnal)
int pid, step;
enum target_signal siggnal;
{
{
debug ("pc = %08x\n", read_pc());
debug ("resume %i, %i, %i\n",step, siggnal, or1k_status);
if (or1k_status != TARGET_STOPPED)
if (or1k_status == TARGET_RUNNING)
error ("Program is already running.");
693,6 → 805,8
/* Clear reason register for later. */
or1k_write_spr_reg (DRR_SPRNUM, 0);
 
or1k_commit_debug_registers ();
 
/* Else clause added by CZ 26/06/01 */
if (step)
{
707,7 → 821,6
or1k_write_spr_reg (DMR1_SPRNUM, dmr1);
}
 
or1k_commit_debug_registers ();
/* Run the target. */
#ifdef NEW_PC_HANDLING
731,6 → 844,7
/* We can now continue normally, independent of step */
or1k_unstall ();
or1k_status = TARGET_RUNNING;
debug ("-resume %i, %i, %i\n",step, siggnal, or1k_status);
}
 
/* Wait until the remote stops, and return a wait status. */
740,8 → 854,13
int pid;
struct target_waitstatus *status;
{
unsigned long val;
unsigned long pc;
char buf[MAX_REGISTER_RAW_SIZE];
interrupt_count = 0;
 
debug ("pc = %08x\n", read_pc());
debug ("wait %i %i\n", pid, or1k_status);
/* If we have not sent a single step or continue command, then the
board is waiting for us to do something. Return a status
indicating that it is stopped. */
757,29 → 876,39
if (err)
or1k_error ("Remote failure: %s", or1k_err_name (err));
 
/* Wait for or1k DRR register to be nonzero. */
interrupt_requested = 0;
old_sigint = signal (SIGINT, or1k_request_int);
do
{
if(interrupt_requested)
{
or1k_stall();
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = TARGET_SIGNAL_INT;
or1k_status = TARGET_STOPPED;
or1k_read_trace();
return 0;
}
drr = or1k_read_spr_reg (DRR_SPRNUM);
usleep (10);
}
while (drr == 0);
/* Set new signal handler */
ofunc = signal (SIGINT, or1k_interrupt);
 
signal (SIGINT, old_sigint);
status->kind = TARGET_WAITKIND_STOPPED;
or1k_flush_pipeline ();
/* Wait for risc to stop. */
do {
or1k_set_chain (SC_REGISTER);
val = or1k_read_reg (JTAG_RISCOP);
/* When we press Ctrl-C, interrupt count is set, but we must wait
for or1k_read_reg to finish, otherwise we would interrupt transaction. */
if (interrupt_count)
or1k_stop ();
 
usleep (10);
debug ("%i", val);
} while ((val & 1) == 0);
drr = or1k_read_spr_reg (DRR_SPRNUM);
/* Restore old INT signal handler */
signal (SIGINT, ofunc);
 
/* If we encounter breakpoint, drr is not set, so we set it manually. */
if (!drr)
drr |= DRR_BE;
 
status->kind = TARGET_WAITKIND_STOPPED;
 
debug ("epcr0 = %08x\n", or1k_read_spr_reg (EPCR0_SPRNUM));
debug ("drr = %08x\n", drr);
 
pc = read_pc ();
 
if (drr & DRR_RSTE)
status->value.sig = TARGET_SIGNAL_REALTIME_33;
else if (drr & DRR_BUSEE)
806,16 → 935,22
status->value.sig = TARGET_SIGNAL_REALTIME_40;
else if (drr & DRR_BE)
status->value.sig = TARGET_SIGNAL_TRAP;
else if (drr & DRR_TE)
status->value.sig = TARGET_SIGNAL_REALTIME_41;
else if (drr & DRR_SS) /* CZ 16/09/01 */
status->value.sig = TARGET_SIGNAL_TRAP;
else
else if (drr & DRR_BE2)
{
/* PC has already stepped over the l.trap instruction. */
pc -= 4;
status->value.sig = TARGET_SIGNAL_TRAP;
} else {
status->value.sig = TARGET_SIGNAL_UNKNOWN;
warning ("Invalid exception occured.");
}
 
/* Write into PC flushes the pipeline! */
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
store_unsigned_integer (buf, REGISTER_RAW_SIZE (PC_REGNUM), pc);
supply_register (PC_REGNUM, buf);
 
/* Log remote stop. */
or1k_status = TARGET_STOPPED;
848,7 → 983,7
to do this if the instruction at the current PC has the
value BRK_INSTR_STRUCT */
 
if(b_insn == or1k_read_reg((pc >> 2) + MEM_SPACE))
if(b_insn == or1k_read_mem((pc & 3)))
{
or1k_write_spr_reg(PC_SPRNUM,value);
}
889,6 → 1024,7
}
 
or1k_read_trace ();
debug ("-wait %i %i\n", pid, or1k_status);
return 0;
}
 
905,8 → 1041,8
unsigned char buf[8];
unsigned int low, high;
addr >>= 2;
low = or1k_read_reg (addr + MEM_SPACE);
high = or1k_read_reg (addr + 1 + MEM_SPACE);
low = or1k_read_mem (addr << 2);
high = or1k_read_reg ((addr + 1) << 2);
memcpy (&buf[0], &low, 4);
memcpy (&buf[4], &high, 4);
memcpy (&low, &buf[subaddr], 4);
914,8 → 1050,7
}
else
{
addr >>= 2;
return or1k_read_reg (addr + MEM_SPACE);
return or1k_read_mem (addr);
}
}
 
933,20 → 1068,19
unsigned char buf[8];
unsigned int low, high;
addr >>= 2;
low = or1k_read_reg (addr + MEM_SPACE);
high = or1k_read_reg (addr + 1 + MEM_SPACE);
low = or1k_read_mem (addr << 2);
high = or1k_read_mem ((addr + 1) << 2);
memcpy (&buf[0], &low, 4);
memcpy (&buf[4], &high, 4);
memcpy (&buf[subaddr], &val, 4);
memcpy (&low, &buf[0], 4);
memcpy (&high, &buf[4], 4);
or1k_write_reg (addr + MEM_SPACE, low);
or1k_write_reg (addr + 1 + MEM_SPACE, high);
or1k_write_mem (addr << 2, low);
or1k_write_mem ((addr + 1) << 2, high);
}
else
{
addr >>= 2;
or1k_write_reg (addr + MEM_SPACE, val);
{
or1k_write_mem (addr, val);
}
return err;
}
982,7 → 1116,7
}
if (err)
or1k_error ("Can't read register %d(%i): %s", regno,
REGNUM_TO_SPRNUM(regno) + REG_SPACE, or1k_err_name (err));
REGNUM_TO_SPRNUM(regno), or1k_err_name (err));
}
 
/* Fetch and return instruction from the specified location. */
1023,7 → 1157,7
if (regno >= NUM_REGS)
error("Invalid register number!");
 
or1k_write_spr_reg (REGNUM_TO_SPRNUM(regno), or1k_read_spr_reg (REGNUM_TO_SPRNUM(regno)));
or1k_write_spr_reg (REGNUM_TO_SPRNUM(regno), read_register (regno));
if (err)
or1k_error ("Can't write register %d(%i): %s", regno, REGNUM_TO_SPRNUM(regno), or1k_err_name (err));
}
1056,8 → 1190,15
int nBlocks = (count + block_xfer_size -1)/block_xfer_size;
int terminate = 0; /* Terminate the printing of '*'s... */
 
#ifdef DEBUG_JTAG
debug ("xfer_memory %s addr=%x, len=%i, \n", write?"write":"read", memaddr, len);
fflush(stdout);
#endif
 
#if 0
if (memaddr >= MEM_SPACE)
error("Invalid address");
#endif
 
/* (CZ 21/06/01 -- because upper layers which know nothing about
Or1k or JTAG call this function directly, it is always necessary
1065,8 → 1206,6
be pointing to the Development Interface chain, in which case
we're going to get bupkiss... */
 
or1k_set_chain (SC_RISC_DEBUG);
 
if (write)
{
/* Fill start and end extra bytes of buffer with existing data. */
1105,11 → 1244,12
 
for(j=0;j<n;j++)
__buf[j] = (unsigned long)extract_unsigned_integer(&buffer[(i * block_xfer_size +j)*4], 4);
or1k_set_chain (SC_WISHBONE);
status = or1k_store_block(addr,__buf,n);
free(__buf);
if(n == block_xfer_size)
{
printf_unfiltered ("*");
debug ("*");
gdb_flush (gdb_stdout);
}
if (status)
1120,7 → 1260,7
/* FIXME: Do we want a QUIT here? */
}
if (terminate)
printf_unfiltered ("\n");
debug ("\n");
}
else
{
1130,6 → 1270,7
int n = count < block_xfer_size ? count : block_xfer_size;
unsigned long *__buf;
 
or1k_set_chain (SC_WISHBONE);
__buf = (unsigned long*)malloc(n*sizeof(unsigned long));
status = or1k_load_block(addr,__buf,n);
if (!status)
1151,7 → 1292,7
int or1k_load_block(CORE_ADDR addr,void* buffer,int nRegisters)
{
int i=0;
unsigned int regno = (addr >> 2) + MEM_SPACE;
unsigned int regno = addr;
 
if (current_or1k_target != NULL && current_or1k_target->to_read_block != NULL)
return current_or1k_target->to_read_block (regno,buffer,nRegisters);
1163,33 → 1304,13
 
int or1k_store_block(CORE_ADDR addr,void* buffer,int nRegisters)
{
unsigned int regno = (addr >> 2) + MEM_SPACE;
 
unsigned int regno = addr;
if (current_or1k_target != NULL && current_or1k_target->to_write_block != NULL)
return current_or1k_target->to_write_block (regno,buffer,nRegisters);
return 0;
}
 
/* Flushes pipeline. May not be needed by all implementations, but
it doen't hurt to do it. This function should be called every time
or1k stops.
When or1k stops it still has instructions in pipeline.
We do this by inserting nop instructions.
IF cycle remains unaffacted by writing to DIR, and it still holds
instruction, that caused break or watchpoint. */
 
void
or1k_flush_pipeline ()
{
/* CZ 15/09/01 -- Damjan has made it perfectly clear
that the DIR will not be implemented on any chip
as the entire concept is poorly conceived. This
section has therefore been removed. */
/* or1k_write_spr_reg (DIR_SPRNUM, NOP_INSTR);
or1k_write_spr_reg (DIR_SPRNUM, NOP_INSTR);
or1k_write_spr_reg (DIR_SPRNUM, NOP_INSTR); */
}
 
/* Print info on this target. */
 
static void
1647,7 → 1768,7
or1k_dummy_ops.to_close = or1k_close;
or1k_dummy_ops.to_detach = or1k_detach;
or1k_dummy_ops.to_resume = or1k_resume;
or1k_dummy_ops.to_wait = or1k_wait;
or1k_dummy_ops.to_wait = or1k_wait;
or1k_dummy_ops.to_fetch_registers = or1k_fetch_registers;
or1k_dummy_ops.to_store_registers = or1k_store_registers;
or1k_dummy_ops.to_prepare_to_store = or1k_prepare_to_store;
1660,6 → 1781,7
or1k_dummy_ops.to_create_inferior = or1k_create_inferior;
or1k_dummy_ops.to_mourn_inferior = or1k_mourn_inferior;
or1k_dummy_ops.to_stratum = process_stratum;
or1k_dummy_ops.to_stop = or1k_stop;
 
/* We can access memory while program is running. */
or1k_dummy_ops.to_has_all_memory = 0;
1672,8 → 1794,8
/* Copy the common fields to all target vectors. */
or1k_jtag_ops = or1k_sim_ops = or1k_dummy_ops;
/* Initialize target-specific fields in the target vectors adn add targets. */
/* Initialize target-specific fields in the target vectors adn add targets. */
or1k_jtag_ops.to_shortname = "jtag";
or1k_jtag_ops.to_longname = "Remote or1k debugging over JTAG port";
or1k_jtag_ops.to_doc = "Debug a board using the OR1K remote debugging protocol"
1680,7 → 1802,7
" over a parallel line.\nThe argument is the parallel port it is connected "
"to, or, if it is formatted\nas a URL of the form jtag://<hostname>:<port>,"
" then the argument refers to\na remote JTAG proxy server.\n";
or1k_jtag_ops.to_open = or1k_jtag_open;
or1k_jtag_ops.to_open = or1k_jtag_open;
add_target (&or1k_jtag_ops);
or1k_dummy_ops.to_shortname = "dummy";
/trunk/gdb-5.0/gdb/top.c
1726,6 → 1726,7
*line = 0;
}
 
/* Read a line from the stream "instream" without command line editing.
 
It prints PROMPT_ARG once at the start.
/trunk/gdb-5.0/gdb/or1k-tdep.c
42,18 → 42,18
 
/* Group reg name size. See or1k_reg_names. */
int or1k_group_name_sizes[OR1K_NUM_SPR_GROUPS] = {
80, 0, 0, 6, 4, 2,
23, 16, 1, 3, 2, 8};
72, 0, 0, 6, 4, 2,
22, 16, 1, 3, 2, 8};
 
int or1k_group_name_start[OR1K_NUM_SPR_GROUPS] = {
0, 0, 0, 253, 254, 256,
32, 248, 16, 16, 255, 0};
16, 248, 16, 16, 255, 0};
 
/* Generated reg names (max valid alias index).
See or1k_spr_reg_name. */
int or1k_spr_valid_aliases[OR1K_NUM_SPR_GROUPS] = {
2047+1, 2047+1, 2047+1, 258+1, 257+1, 257+1,
79+1, 263+1, 16+1, 18+1, 256+1, 7+1};
78+1, 263+1, 16+1, 18+1, 256+1, 7+1};
 
/* Register names. */
char *or1k_reg_names[] = {
85,7 → 85,7
/* group 6 - debug */
"DVR0", "DVR1", "DVR2", "DVR3", "DVR4", "DVR5", "DVR6", "DVR7",
"DCR0", "DCR1", "DCR2", "DCR3", "DCR4", "DCR5", "DCR6", "DCR7",
"DMR1", "DMR2", "DCWR0","DCWR1","DSR", "DRR", "DIR",
"DMR1", "DMR2", "DCWR0","DCWR1","DSR", "DRR",
 
/* group 7 - performance counters unit */
"PCCM0", "PCMR1", "PCMR2", "PCMR3", "PCMR4", "PCMR5", "PCMR6", "PCMR7",
107,8 → 107,8
static char *or1k_gdb_reg_names[] = {
 
/* general purpose registers */
"ZERO", "SP", "FP", "A0", "A1", "A2", "A3", "A4",
"A5", "LR", "R10", "RV", "R12", "R13", "R14", "R15",
"R0", "R1(SP)", "R2(FP)", "R3(A0)", "R4(A1)", "R5(A2)", "R6(A3)", "R7(A4)",
"R8(A5)", "R9(LR)", "R10", "R11(RV)", "R12", "R13", "R14", "R15",
"R16", "R17", "R18", "R19", "R20", "R21", "R22", "R23",
"R24", "R25", "R26", "R27", "R28", "R29", "R30", "R31",
 
348,10 → 348,10
{
case PS_REGNUM: return SR_SPRNUM;
case PC_REGNUM: return PC_SPRNUM;
case CCR_REGNUM: return CCR_SPRNUM(CURRENT_CID);
case EPC_REGNUM: return EPC_SPRNUM(CURRENT_CID);
case EAR_REGNUM: return EAR_SPRNUM(CURRENT_CID);
case ESR_REGNUM: return ESR_SPRNUM(CURRENT_CID);
/*case CCR_REGNUM: return CCR_SPRNUM(CURRENT_CID);*/
case EPCR_REGNUM: return EPCR_SPRNUM(CURRENT_CID);
/*case EAR_REGNUM: return EAR_SPRNUM(CURRENT_CID);
case ESR_REGNUM: return ESR_SPRNUM(CURRENT_CID);*/
default:
error("Invalid register number!");
break;
396,6 → 396,7
for (i = 0; i < group; i++)
group_start += or1k_group_name_sizes[i];
index -= or1k_group_name_start[group];
if (index >= or1k_group_name_sizes[group])
{
sprintf (tmp_name, "SPR%i_%i", group, index);
402,7 → 403,7
return (char *)&tmp_name;
}
else
return or1k_reg_names[group_start + index - or1k_group_name_start[group]];
return or1k_reg_names[group_start + index];
}
 
/* Build names for DMMU group. */
469,7 → 470,7
return -1;
else return i;
}
for (i = 0; i < or1k_spr_valid_aliases[group]; i++)
for (i = or1k_group_name_start[group]; i < or1k_spr_valid_aliases[group]; i++)
{
char *s;
s = or1k_spr_register_name (SPR_REG(group, i));
871,63 → 872,25
for (i = 0; i < MAX_GPR_REGS; i++)
or1k_saved_reg_addr[i] = -1;
 
for(t_pc=pc; t_pc < (pc + MAX_PROLOGUE_LENGTH) &&
state != PrologueStateMachineInvalid; t_pc += OR1K_INSTLEN)
/* Is there a prologue? */
inst = or1k_fetch_instruction (pc);
if ((inst & 0xfc1ff800) != 0xd4011000) return pc; /* l.sw I(r1),r2 */
or1k_saved_reg_addr[2] = offset++;
inst = or1k_fetch_instruction (pc + OR1K_INSTLEN);
if ((inst & 0xFFFF0000) != 0x9c410000) return pc; /* l.addi r2,r1,I */
pc += 2 * OR1K_INSTLEN;
inst = or1k_fetch_instruction (pc);
if ((inst & 0xFFFF0000) != 0x9c210000) return pc; /* l.addi r1,r1,I */
pc += OR1K_INSTLEN;
 
/* Skip stored registers. */
inst = or1k_fetch_instruction (pc);
while ((inst & 0xfc1ff800) != 0xd4020000) /* l.sw 0x0(r2),rx */
{
unsigned long insn = or1k_fetch_instruction(t_pc);
int reg;
int offset;
FunctionPrologueStates new_state = getPrologueInsnType(insn,&reg,&offset);
 
switch(state)
{
case PrologueStateMachineStart:
if(new_state == PrologueStateMachineFrameInitialized)
{
frame_size = -offset;
or1k_saved_reg_addr[1] = frame_size;
}
else
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineFrameInitialized:
if(new_state == PrologueStateMachineFrameSaved)
or1k_saved_reg_addr[reg] = frame_size - offset;
else if(new_state == PrologueStateMachineRegisterSaved)
{
/* Ooops...we have a frameless function.
Not sure what this might mean, but
let's try and continue. */
or1k_saved_reg_addr[reg] = frame_size - offset;
}
else
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineFrameSaved:
if(new_state != PrologueStateMachineFrameAdjusted &&
offset != frame_size)
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineFrameAdjusted:
case PrologueStateMachineRegisterSaved:
if(new_state == PrologueStateMachineRegisterSaved)
or1k_saved_reg_addr[reg] = frame_size - offset;
else if(new_state == PrologueStateMachineParameterSaved)
or1k_saved_reg_addr[reg] = -offset;
else
new_state = PrologueStateMachineInvalid;
break;
case PrologueStateMachineParameterSaved:
if(new_state == PrologueStateMachineParameterSaved)
or1k_saved_reg_addr[reg] = -offset;
else
new_state = PrologueStateMachineInvalid;
break;
default:
new_state = PrologueStateMachineInvalid;
}
 
state = new_state;
/* get saved reg. */
or1k_saved_reg_addr[(inst >> 11) & 0x1f] = offset++;
pc += OR1K_INSTLEN;
inst = or1k_fetch_instruction (pc);
}
 
return t_pc;
1316,6 → 1279,7
{
*group = i;
*index = regno;
break;
}
}
}
1341,7 → 1305,7
for (i = 0; i < or1k_spr_valid_aliases[*group]; i++)
{
char reg_name[16];
char *gen_name = or1k_spr_register_name (SPR_REG(*group, i));
char *gen_name = or1k_spr_register_name (SPR_REG(*group, i + or1k_group_name_start[*group]));
sprintf (reg_name, "SPR%i_%i", *group, i);
if (strcmp (reg_name, gen_name) != 0)
printf_filtered ("%s\t", gen_name);
1375,9 → 1339,9
parse_spr_params (args, &group, &index);
if (index >= 0)
{
printf_unfiltered ("%s.%s (SPR%i_%i) set to %i(%X), was:%i(%X)\n", or1k_group_names[group],
or1k_spr_register_name (SPR_REG(group, index)), group, index,
or1k_read_spr_reg (SPR_REG(group, index)));
unsigned long value = or1k_read_spr_reg (SPR_REG(group, index));
printf_unfiltered ("%s.%s = SPR%i_%i = %i(%x)\n", or1k_group_names[group],
or1k_spr_register_name (SPR_REG(group, index)), group, index, value, value);
}
}
 
1408,8 → 1372,9
*ptr_c = 0;
value = strtoul (nargs, &ptr_c, 0);
if (*ptr_c != 0)
error ("Invalid register value.");
printf_unfiltered ("%s.%s (SPR%i_%i) set to %i(%X), was:%i(%X)\n", or1k_group_names[group],
error ("Invalid register value.");
or1k_write_spr_reg (SPR_REG(group, index), value);
printf_unfiltered ("%s.%s (SPR%i_%i) set to %i(%x), was:%i(%x)\n", or1k_group_names[group],
or1k_spr_register_name (SPR_REG(group, index)), group, index,
value, value, prev, prev);
}
/trunk/gdb-5.0/gdb/config/or1k/tm-or1k.h
132,15 → 132,18
#define PC_SPRNUM SPR_REG(SPR_SYSTEM_GROUP, 16)
#define SR_SPRNUM SPR_REG(SPR_SYSTEM_GROUP, 17)
#define CCR_SPRNUM(cid) SPR_REG(SPR_SYSTEM_GROUP, 4 + (cid))
#define DVR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 32)
#define DCR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 40)
#define DMR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 48)
#define DMR2_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 49)
#define DCWR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 50)
#define DCWR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 51)
#define DSR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 52)
#define DRR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 53)
#define DIR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 54)
#define EPCR_SPRNUM(cid) SPR_REG(SPR_SYSTEM_GROUP, 32 + (cid))
#define EPCR0_SPRNUM SPR_REG(SPR_SYSTEM_GROUP, 32)
 
#define DVR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DCR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DMR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 16)
#define DMR2_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 17)
#define DCWR0_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DCWR1_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 0xee)
#define DSR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 20)
#define DRR_SPRNUM SPR_REG(SPR_DEBUG_GROUP, 21)
 
#define ZERO_REGNUM (0)
#define SP_REGNUM (1)
#define FP_REGNUM (2)
153,6 → 156,7
#define VFRV_REGNUM (MAX_GPR_REGS + 6)
#define PC_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 0)
#define PS_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 1)
#define EPCR_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 2)
#define CCR_REGNUM (MAX_GPR_REGS + MAX_VF_REGS + 2)
 
/*******************************************/
177,8 → 181,7
#define DMR1_ST (0x00400000)
 
/* Changed by CZ 21/06/01 */
#define DRR_SS (0x00004000)
#define DRR_TE (0x00002000)
#define DRR_BE2 (0x00002000)
#define DRR_BE (0x00001000)
#define DRR_SCE (0x00000800)
#define DRR_RE (0x00000400)
282,7 → 285,7
 
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES (NUM_REGS * OR1K_SPR_REGSIZE)
#define REGISTER_BYTES (NUM_REGS * OR1K_GPR_REGSIZE)
 
extern void or1k_do_registers_info PARAMS ((int, int));
#define DO_REGISTERS_INFO(regnum, fp) or1k_do_registers_info(regnum, fp)
519,11 → 522,6
TARGET_STOPPED
};
 
#define REG_SPACE 0x00000000
#define REG_SPACE_END 0x7FFFFFFF
#define MEM_SPACE 0x80000000
#define MEM_SPACE_END 0xFFFFFFFF
 
/* Compare conditions for DCRx registers. */
enum enum_compare_condition
{
674,8 → 672,9
SC_RISC_DEBUG, /* 1 RISC Debug Interface chain */
SC_RISC_TEST, /* 2 RISC Test Chain */
SC_TRACE, /* 3 Trace Chain */
SC_REGISTER, /* Register Chain */
SC_BLOCK, /* Block Chains */
SC_REGISTER, /* 4 Register Chain */
SC_WISHBONE, /* 5 Wisbone Chain */
SC_BLOCK /* Block Chains */
};
 
/* See JTAG documentation about these. */
690,7 → 689,7
JI_CLAMP,
JI_CLAMPZ,
JI_HIGHZ,
JI_DEBUG,
JI_DEBUG,
JI_BYPASS = 0xF
};
 
699,7 → 698,7
#define JTAG_TSEL (0x1)
#define JTAG_QSEL (0x2)
#define JTAG_SSEL (0x3)
#define JTAG_RISCOP (0x9)
#define JTAG_RISCOP (0x4)
#define JTAG_RECWP0 (0x10)
#define JTAG_RECBP0 (0x1b)
 
/trunk/gdb-5.0/gdb/config/or1k/tm-or32.h
23,4 → 23,4
 
#include "or1k/tm-or1k.h"
 
#endif TM_OR32_H
#endif

powered by: WebSVN 2.1.0

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