From 2a8b1fab7c1802f6297c22dd95e79ba8ea0eb6c7 Mon Sep 17 00:00:00 2001 From: John Metzler Date: Wed, 29 Apr 1998 17:33:57 +0000 Subject: Wed Apr 29 10:20:40 1998 John Metzler * nec4102rom.c : New file implements rom monitor adapter for nec-vr4102 board. This board hosts the vr4111 chip. This file required extenstions to the monitor_ops structure, hooks for wiat filter, new flags. This version does not support more than one breakpoint and resuming after a breakpoint in 16 bit mode is completely disfunctional. * monitor.h : Defined additional hooks for dmpregs, confinuer_hooks and wait_filter. These additions require that all rom monitor interfaces be recoded to to initializa monitor ops using assignments rather than static structure initialization. Added new bits to flags MO_EXACT_DUMPADDR, MO_HAS_BLOCKWRITES * monitor.c (RDEBUG): Conditional tracing throughout the file. (fromhex): Now recognized upper cse hex digits (monitor_printf_noecho): (monitor_readchar): Tracing interferes with input timing. (monitor_open): Register different memory write functions with dcache_init if MO_HAS_BLOCKWRITES. (flush_monior_dcache): Added as an additional utilty. (monitor-resume): Call continue hook if one has been supplied. (monitor_wait_filter): New function Factored out of monitor wait and used if alternate wait-filter has not been provided. (monitor_wait): call alternate wait filter if provided. Call monitor_dump_regs, a new function factored out from inline code. (monitor_dump_block): A new function used as a utility when monitors must dump several blocks of registers using different commands. (monitor_dump_regs): Call alternate function if provided. Uses new hook in monitor.h. (monitor_write_memory): Engage previouly added hook MO_FILL_USES_ADDR. (monitor_write_even_block): new function supports writing long blocks of 4byte words. (longlongendswap): new internal function (monitor_write_memory_longlongs): new function writes large blocks using command to enter a long long. (monitor_write-memory_block): new Function figures out which block mod to use. (monitor_read_memory): Can now handle dump formats in which the bytes preceeding the requested data is not printed. * monitor.h: Added new fields to the structure --- gdb/monitor.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'gdb/monitor.h') diff --git a/gdb/monitor.h b/gdb/monitor.h index 48e83ba..6864165 100644 --- a/gdb/monitor.h +++ b/gdb/monitor.h @@ -93,8 +93,16 @@ struct monitor_ops GDB with the value of a register. */ char *dump_registers; /* Command to dump all regs at once */ char *register_pattern; /* Pattern that picks out register from reg dump */ - void (*supply_register) PARAMS ((char *name, int namelen, char *val, int vallen)); - void (*load_routine) PARAMS ((serial_t desc, char *file, int hashmark)); /* Download routine */ + void (*supply_register) PARAMS ((char *name, int namelen, + char *val, int vallen)); + void (*load_routine) PARAMS ((serial_t desc, char *file, + int hashmark)); /* Download routine */ + int (*dumpregs) PARAMS((void)) ; /* routine to dump all registers */ + int (*continue_hook) PARAMS((void)) ; /* Emit the continue command */ + int (*wait_filter) PARAMS((char * buf, /* Maybe contains registers */ + int bufmax , + int * response_length, + struct target_waitstatus * status)) ; char *load; /* load command */ char *loadresp; /* Response to load command */ char *prompt; /* monitor command prompt */ @@ -205,6 +213,20 @@ struct monitor_ops #define MO_PRINT_PROGRAM_OUTPUT 0x200000 +/* Some dump bytes commands align the first data with the preceeding +16 byte boundary. Some print blanks and start at the exactly the +requested boundary. */ + +#define MO_EXACT_DUMPADDR 0x400000 + +/* Rather entering and exiting the write memory dialog for each word byte, + we can save time by transferring the whole block without exiting + the memory editing mode. You only need to worry about this + if you are doing memory downloading. + This engages a new write function registered with dcache. + */ +#define MO_HAS_BLOCKWRITES 0x800000 + #define SREC_SIZE 160 extern void monitor_open PARAMS ((char *args, struct monitor_ops *ops, @@ -221,3 +243,4 @@ extern void monitor_write PARAMS ((char *buf, int buflen)); extern int monitor_readchar PARAMS ((void)); extern char *monitor_get_dev_name PARAMS ((void)); extern void init_monitor_ops PARAMS ((struct target_ops *)); +extern int monitor_dump_reg_block PARAMS((char * dump_cmd)) ; -- cgit v1.1