| 1 | /* Remote debugging interface for ROM68K boot monitor, for GDB. |
| 2 | * Copyright 1990, 1991, 1992 Free Software Foundation, Inc. |
| 3 | * Contributed by Cygnus Support. Written by Rob Savoye for Cygnus. |
| 4 | * |
| 5 | * Copyright 1990, 1991, 1992 Free Software Foundation, Inc. |
| 6 | * Contributed by Cygnus Support. Written by Rob Savoye for Cygnus. |
| 7 | * |
| 8 | * This file is part of GDB. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software |
| 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 23 | */ |
| 24 | |
| 25 | struct monitor_ops { |
| 26 | char *execute; /* execute or usually GO command */ |
| 27 | char *resume; /* continue command */ |
| 28 | char *step; /* single step */ |
| 29 | char *set_break; /* set a breakpoint */ |
| 30 | char *clr_break; /* clear a breakpoint */ |
| 31 | char *set_mem; /* set memory to a value */ |
| 32 | char *dis_mem; /* display memory */ |
| 33 | char *mem_prompt; /* prompt memory commands use */ |
| 34 | char *set_reg; /* set a register */ |
| 35 | char *reg_delim; /* delimiter between registers */ |
| 36 | char *get_reg; /* read a register */ |
| 37 | char *load; /* download command */ |
| 38 | char *prompt; /* monitor command prompt */ |
| 39 | char *cmd_delim; /* end-of-command delimitor */ |
| 40 | char *cmd_end; /* optional command terminator */ |
| 41 | }; |
| 42 | |
| 43 | extern struct monitor_ops *current_monitor; |
| 44 | |
| 45 | #define GO_CMD (current_monitor->execute) |
| 46 | #define CONT_CMD (current_monitor->resume) |
| 47 | #define STEP_CMD (current_monitor->step) |
| 48 | #define SET_BREAK_CMD (current_monitor->set_break) |
| 49 | #define CLR_BREAK_CMD (current_monitor->clr_break) |
| 50 | #define MEM_SET_CMD (current_monitor->set_mem) |
| 51 | #define MEM_DIS_CMD (current_monitor->dis_mem) |
| 52 | #define LOAD_CMD (current_monitor->load) |
| 53 | #define GET_REG (current_monitor->get_reg) |
| 54 | #define REG_DELIM (current_monitor->reg_delim) |
| 55 | #define SET_REG (current_monitor->set_reg) |
| 56 | #define CMD_END (current_monitor->cmd_end) |
| 57 | #define CMD_DELIM (current_monitor->cmd_delim) |
| 58 | #define PROMPT (current_monitor->prompt) |
| 59 | #define MEM_PROMPT (current_monitor->mem_prompt) |
| 60 | |
| 61 | #define push_monitor(x) current_monitor = x; |
| 62 | |