]>
Commit | Line | Data |
---|---|---|
dd3b648e RP |
1 | /* Parameters for Intel 960 running NINDY monitor, for GDB, the GNU debugger. |
2 | Copyright (C) 1990-1991 Free Software Foundation, Inc. | |
3 | Contributed by Intel Corporation and Cygnus Support. | |
4 | ||
5 | This file is part of GDB. | |
6 | ||
99a7de40 | 7 | This program is free software; you can redistribute it and/or modify |
dd3b648e | 8 | it under the terms of the GNU General Public License as published by |
99a7de40 JG |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | |
dd3b648e | 11 | |
99a7de40 | 12 | This program is distributed in the hope that it will be useful, |
dd3b648e RP |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
99a7de40 JG |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
dd3b648e RP |
20 | |
21 | /***************************************************************************** | |
22 | * Definitions to target GDB to an i960 debugged over a serial line. | |
23 | ******************************************************************************/ | |
24 | ||
25 | #include "tm-i960.h" | |
26 | ||
27 | /* Override the standard gdb prompt when compiled for this target. */ | |
28 | ||
29 | #define DEFAULT_PROMPT "(gdb960) " | |
30 | ||
31 | /* Additional command line options accepted by nindy gdb's, for handling | |
32 | the remote-nindy.c interface. These should really be target-specific | |
33 | rather than architecture-specific. */ | |
34 | ||
35 | extern int nindy_old_protocol; /* nonzero if old NINDY serial protocol */ | |
36 | extern int nindy_initial_brk; /* Send a BREAK to reset board first */ | |
37 | extern char *nindy_ttyname; /* Name of serial port to talk to nindy */ | |
38 | ||
39 | #define ADDITIONAL_OPTIONS \ | |
6a1f93f6 KR |
40 | {"O", no_argument, &nindy_old_protocol, 1}, \ |
41 | {"brk", no_argument, &nindy_initial_brk, 1}, \ | |
42 | {"ser", required_argument, 0, 1004}, /* 1004 is magic cookie for ADDL_CASES */ | |
dd3b648e RP |
43 | |
44 | #define ADDITIONAL_OPTION_CASES \ | |
6a1f93f6 | 45 | case 1004: /* -ser option: remote nindy auto-start */ \ |
dd3b648e RP |
46 | nindy_ttyname = optarg; \ |
47 | break; | |
48 | ||
49 | #define ADDITIONAL_OPTION_HELP \ | |
50 | "\ | |
51 | -O Use old protocol to talk to a Nindy target\n\ | |
52 | -brk Send a break to a Nindy target to reset it.\n\ | |
6a1f93f6 | 53 | -ser SERIAL Open remote Nindy session to SERIAL port.\n\ |
dd3b648e RP |
54 | " |
55 | ||
56 | /* If specified on the command line, open tty for talking to nindy, | |
57 | and download the executable file if one was specified. */ | |
58 | ||
59 | #define ADDITIONAL_OPTION_HANDLER \ | |
60 | if (!setjmp (to_top_level) && nindy_ttyname) { \ | |
61 | nindy_open (nindy_ttyname, !batch); \ | |
62 | if ( !setjmp(to_top_level) && execarg ) { \ | |
63 | target_load (execarg, !batch); \ | |
64 | } \ | |
65 | } | |
66 | ||
67 | /* If configured for i960 target, we take control before main loop | |
68 | and demand that we configure for a nindy target. */ | |
69 | ||
70 | #define BEFORE_MAIN_LOOP_HOOK \ | |
71 | nindy_before_main_loop(); | |
72 | ||
df86eb44 JG |
73 | extern void |
74 | nindy_before_main_loop(); /* In remote-nindy.c */ | |
75 | ||
dd3b648e RP |
76 | /* Address of end of stack space. |
77 | * This probably doesn't matter for nindy, because it's only used | |
78 | * in manipulation of core files, which we don't support. | |
79 | */ | |
80 | ||
81 | #define STACK_END_ADDR (0xfe000000) | |
82 | ||
83 | /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one | |
e140f1da | 84 | and has no caller. |
dd3b648e RP |
85 | |
86 | On the i960, each various target system type defines FRAME_CHAIN_VALID, | |
87 | since it differs between NINDY and VxWorks, the two currently supported | |
88 | targets types. */ | |
89 | ||
90 | #define FRAME_CHAIN_VALID(chain, thisframe) \ | |
91 | nindy_frame_chain_valid (chain, thisframe) | |
92 | ||
df86eb44 JG |
93 | extern int |
94 | nindy_frame_chain_valid(); /* See nindy-tdep.c */ | |
dd3b648e RP |
95 | |
96 | /* Sequence of bytes for breakpoint instruction */ | |
97 | ||
98 | #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} | |
99 | ||
100 | /* Amount ip must be decremented by after a breakpoint. | |
101 | * This is often the number of bytes in BREAKPOINT but not always. | |
102 | */ | |
103 | ||
104 | #define DECR_PC_AFTER_BREAK 0 |