aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-adapt.c
diff options
context:
space:
mode:
authorJohn Metzler <jmetzler@cygnus>1998-05-21 20:20:39 +0000
committerJohn Metzler <jmetzler@cygnus>1998-05-21 20:20:39 +0000
commitc719b71428c79aa3f92dbb59d67df6d4bda139c3 (patch)
tree7a0f22aaaaa024bbbbc5fd724c0fa97df269be44 /gdb/remote-adapt.c
parent5e34097b8b81e3d25e1a4b9b3d16ddd54fafb26c (diff)
downloadgdb-c719b71428c79aa3f92dbb59d67df6d4bda139c3.zip
gdb-c719b71428c79aa3f92dbb59d67df6d4bda139c3.tar.gz
gdb-c719b71428c79aa3f92dbb59d67df6d4bda139c3.tar.bz2
Thu May 21 13:14:25 1998 John Metzler <jmetzler@cygnus.com>
* gnu-nat.c (init_gnu_ops): Initialization of target ops by assignment. (_initialize_gnu_nat): Call new init * mac-nat.c (init_child_ops): Ditto (_initialize_mac_nat): Ditto * monitor.c (init_base_monitor_ops): Ditto (_initialize_remote_monitors) : Ditto * ppc-bdm.c (init_bdm_ppc_ops): Ditto (_initialize_bdm_ppc): Ditto * remote-adapt.c ( init_adapt_ops): Ditto (_initialize_remote_adapt): Ditto * remote-array.c (init_array_ops) : Ditto (_initialize_array): Ditto * remote-bug (init_bug_ops) : Ditto (_initialize_remote_bug): Ditto * remote-e7000.c (init_e7000_ops): Ditto (_initialize_remote_e7000) : Ditto * remote-eb.c (init_eb_ops) : Ditto (_initialize_remote_eb) : Ditto *remote-es.c (init_es1800_ops) : Ditto (init_es1800_child_ops) : Ditto (_initialize_es1800) ; Ditto *remote-hms.c (init_hms_ops): Ditto (_initialize_remote_hms) : Ditto * remote-mm.c (init_mm_ops): Ditto (_initialize_remote_mm) : Ditto * remote-nindy.c (init_nindy_ops): Ditto (_initialize_nindy): Ditto * remote_nrom.c (init_nrom_ops) : Ditto (_initialize_remote_nrom) : Ditto *remote-os9k (init_rombug_ops) : Ditto (_initialize_remote_os9k) : Ditto *remote-rdi.c (init_rdi_ops) : Ditto (_initialize_remote_rdi) : Ditto * remote-rdp.c (init_remote_rdp_ops) : Ditto (_initialize_remote_rdp) : Ditto * remote-sds.c (init_sds_ops) : Ditto (_initialize_remote_sds) : Ditto * remote-sim.c (init_gdbsim_ops) : Ditto (_initialize_remote_sim) : Ditto * remote-st.c (init_st2000_ops): Ditto (_initialize_remote_st2000): Ditto *remote-udi.c (init_udi_ops) : Ditto (_initialize_remote_udi) : Ditto * remote-vx.c (init_vx_ops) : Ditto (init_vx_run_ops) : Ditto (_initialize_vx) : Ditto * remote.c (init_remote_ops): Ditto (init_extended_remote_ops): Ditto (_initialize_remote): Ditto * sparcl-tdep.c (init_sparclite_ops): Ditto (_initialize_sparcl_tdep): Ditto * v850ice.c (init_850ice_ops): Ditto (_initialize_v850ice): Ditto *win32-nat.c: (init_child_ops): Ditto (_initialize_inftarg): Ditto
Diffstat (limited to 'gdb/remote-adapt.c')
-rw-r--r--gdb/remote-adapt.c109
1 files changed, 84 insertions, 25 deletions
diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c
index 8fcb1f7..f66b6bd 100644
--- a/gdb/remote-adapt.c
+++ b/gdb/remote-adapt.c
@@ -29,6 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
o - I can't get 19200 baud rate to work.
7/91 o - Freeze mode tracing can be done on a 29050. */
+
+
#include "defs.h"
#include "gdb_string.h"
#include "inferior.h"
@@ -42,6 +44,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "target.h"
#include "gdbcore.h"
+/* This processor is getting rusty but I am trying to keep it
+ up to date at least with data structure changes.
+ Activate this block to compile just this file.
+ */
+#define COMPILE_CHECK 0
+#if COMPILE_CHECK
+#define Q_REGNUM 0
+#define VAB_REGNUM 0
+#define CPS_REGNUM 0
+#define IPA_REGNUM 0
+#define IPB_REGNUM 0
+#define GR1_REGNUM 0
+#define LR0_REGNUM 0
+#define IPC_REGNUM 0
+#define CR_REGNUM 0
+#define BP_REGNUM 0
+#define FC_REGNUM 0
+#define INTE_REGNUM 0
+#define EXO_REGNUM 0
+#define GR96_REGNUM 0
+#define NPC_REGNUM
+#define FPE_REGNUM 0
+#define PC2_REGNUM 0
+#define FPS_REGNUM 0
+#define ALU_REGNUM 0
+#define LRU_REGNUM 0
+#define TERMINAL int
+#define RAW 1
+#define ANYP 1
+extern int a29k_freeze_mode ;
+extern int processor_type ;
+extern char * processor_name ;
+#endif
+
/* External data declarations */
extern int stop_soon_quietly; /* for wait_for_inferior */
@@ -85,6 +121,7 @@ rawmode(desc, turnon)
int desc;
int turnon;
{
+
TERMINAL sg;
if (desc < 0)
@@ -511,6 +548,7 @@ the baud rate, and the name of the program to run on the remote system.");
if (adapt_desc < 0)
perror_with_name (dev_name);
ioctl (adapt_desc, TIOCGETP, &sg);
+#if ! defined(COMPILE_CHECK)
#ifdef HAVE_TERMIO
sg.c_cc[VMIN] = 0; /* read with timeout. */
sg.c_cc[VTIME] = timeout * 10;
@@ -525,7 +563,7 @@ the baud rate, and the name of the program to run on the remote system.");
ioctl (adapt_desc, TIOCSETP, &sg);
adapt_stream = fdopen (adapt_desc, "r+");
-
+#endif /* compile_check */
push_target (&adapt_ops);
#ifndef HAVE_TERMIO
@@ -1325,34 +1363,55 @@ adapt_com (args, fromtty)
/* Define the target subroutine names */
-struct target_ops adapt_ops = {
- "adapt", "Remote AMD `Adapt' target",
- "Remote debug an AMD 290*0 using an `Adapt' monitor via RS232",
- adapt_open, adapt_close,
- adapt_attach, adapt_detach, adapt_resume, adapt_wait,
- adapt_fetch_register, adapt_store_register,
- adapt_prepare_to_store,
- adapt_xfer_inferior_memory,
- adapt_files_info,
- adapt_insert_breakpoint, adapt_remove_breakpoint, /* Breakpoints */
- 0, 0, 0, 0, 0, /* Terminal handling */
- adapt_kill, /* FIXME, kill */
- adapt_load,
- 0, /* lookup_symbol */
- adapt_create_inferior, /* create_inferior */
- adapt_mourn, /* mourn_inferior FIXME */
- 0, /* can_run */
- 0, /* notice_signals */
- 0, /* to_stop */
- process_stratum, 0, /* next */
- 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
- 0,0, /* Section pointers */
- OPS_MAGIC, /* Always the last thing */
-};
+struct target_ops adapt_ops ;
+static void init_adapt_ops(void)
+{
+ adapt_ops.to_shortname = "adapt";
+ adapt_ops.to_longname = "Remote AMD `Adapt' target";
+ adapt_ops.to_doc = "Remote debug an AMD 290*0 using an `Adapt' monitor via RS232";
+ adapt_ops.to_open = adapt_open;
+ adapt_ops.to_close = adapt_close;
+ adapt_ops.to_attach = adapt_attach;
+ adapt_ops.to_detach = adapt_detach;
+ adapt_ops.to_resume = adapt_resume;
+ adapt_ops.to_wait = adapt_wait;
+ adapt_ops.to_fetch_registers = adapt_fetch_register;
+ adapt_ops.to_store_registers = adapt_store_register;
+ adapt_ops.to_prepare_to_store = adapt_prepare_to_store;
+ adapt_ops.to_xfer_memory = adapt_xfer_inferior_memory;
+ adapt_ops.to_files_info = adapt_files_info;
+ adapt_ops.to_insert_breakpoint = adapt_insert_breakpoint;
+ adapt_ops.to_remove_breakpoint = adapt_remove_breakpoint;
+ adapt_ops.to_terminal_init = 0;
+ adapt_ops.to_terminal_inferior = 0;
+ adapt_ops.to_terminal_ours_for_output = 0;
+ adapt_ops.to_terminal_ours = 0;
+ adapt_ops.to_terminal_info = 0;
+ adapt_ops.to_kill = adapt_kill;
+ adapt_ops.to_load = adapt_load;
+ adapt_ops.to_lookup_symbol = 0;
+ adapt_ops.to_create_inferior = adapt_create_inferior;
+ adapt_ops.to_mourn_inferior = adapt_mourn;
+ adapt_ops.to_can_run = 0;
+ adapt_ops.to_notice_signals = 0;
+ adapt_ops.to_thread_alive = 0;
+ adapt_ops.to_stop = 0 ; /* process_stratum; */
+ adapt_ops.to_stratum = 0;
+ adapt_ops.DONT_USE = 0 ;
+ adapt_ops.to_has_all_memory = 1;
+ adapt_ops.to_has_memory = 1;
+ adapt_ops.to_has_stack = 1;
+ adapt_ops.to_has_registers = 1;
+ adapt_ops.to_has_execution = 0;
+ adapt_ops.to_sections = 0;
+ adapt_ops.to_sections_end = 0 ;
+ adapt_ops.to_magic = OPS_MAGIC;
+} /* init_adapt_ops */
void
_initialize_remote_adapt ()
{
+ init_adapt_ops() ;
add_target (&adapt_ops);
add_com ("adapt <command>", class_obscure, adapt_com,
"Send a command to the AMD Adapt remote monitor.");