Commit | Line | Data |
---|---|---|
37e4214c SG |
1 | # Apply these patches to GDB to produce an Energize GDB. |
2 | # To apply these patches, first cd to gdb-XX/gdb, then run patch -p0 < thisfile. | |
3 | =================================================================== | |
4 | RCS file: /local/cvsfiles/devo/gdb/Makefile.in,v | |
5 | retrieving revision 1.158 | |
6 | diff -c -r1.158 Makefile.in | |
7 | *** 1.158 1992/06/19 22:39:40 | |
8 | --- Makefile.in 1992/06/23 04:22:01 | |
9 | *************** | |
10 | *** 124,129 **** | |
11 | --- 124,134 ---- | |
12 | READLINE_DEP = $$(READLINE_DIR) | |
13 | RL_LIB = ./../readline${subdir}/libreadline.a | |
14 | ||
15 | + # Cadillac libraries | |
16 | + CADILLAC_DIR = ${srcdir}/deblib | |
17 | + CADILLAC_INCLUDES = -I${CADILLAC_DIR}/connection -I${CADILLAC_DIR}/debugger | |
18 | + CADILLAC_LIBS = ${srcdir}/deblib/connection/libconn.a | |
19 | + | |
20 | # All the includes used for CFLAGS and for lint. | |
21 | # -I. for config files. | |
22 | # -I${srcdir} possibly for regex.h also. | |
23 | *************** | |
24 | *** 156,162 **** | |
25 | # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. | |
26 | # TERMCAP comes after readline, since readline depends on it. | |
27 | CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
28 | ! ${XM_CLIBS} ${TM_CLIBS} | |
29 | CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
30 | ${RL_LIB} ${MMALLOC_LIB} | |
31 | ||
32 | --- 161,167 ---- | |
33 | # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. | |
34 | # TERMCAP comes after readline, since readline depends on it. | |
35 | CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
36 | ! ${XM_CLIBS} ${TM_CLIBS} ${CADILLAC_LIBS} | |
37 | CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
38 | ${RL_LIB} ${MMALLOC_LIB} | |
39 | ||
40 | *************** | |
41 | *** 195,201 **** | |
42 | ${DEMANGLER}.c mem-break.c target.c inftarg.c \ | |
43 | dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \ | |
44 | ieee-float.c language.c parse.c buildsym.c objfiles.c \ | |
45 | ! minsyms.c mipsread.c | |
46 | ||
47 | # Source files in subdirectories (which will be handled separately by | |
48 | # 'make gdb.tar.Z'). | |
49 | --- 200,206 ---- | |
50 | ${DEMANGLER}.c mem-break.c target.c inftarg.c \ | |
51 | dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \ | |
52 | ieee-float.c language.c parse.c buildsym.c objfiles.c \ | |
53 | ! minsyms.c mipsread.c cadillac.c | |
54 | ||
55 | # Source files in subdirectories (which will be handled separately by | |
56 | # 'make gdb.tar.Z'). | |
57 | *************** | |
58 | *** 280,286 **** | |
59 | command.o utils.o expprint.o environ.o version.o gdbtypes.o \ | |
60 | copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \ | |
61 | inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \ | |
62 | ! buildsym.o objfiles.o minsyms.o \ | |
63 | dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o | |
64 | ||
65 | RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES) | |
66 | --- 285,291 ---- | |
67 | command.o utils.o expprint.o environ.o version.o gdbtypes.o \ | |
68 | copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \ | |
69 | inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \ | |
70 | ! buildsym.o objfiles.o minsyms.o cadillac.o \ | |
71 | dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o | |
72 | ||
73 | RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES) | |
74 | *************** | |
75 | *** 695,700 **** | |
76 | --- 700,708 ---- | |
77 | ||
78 | ttyflush.o: ${srcdir}/nindy-share/ttyflush.c | |
79 | ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c | |
80 | + | |
81 | + cadillac.o: ${srcdir}/cadillac.c | |
82 | + ${CC} -c ${INTERNAL_CFLAGS} ${CADILLAC_INCLUDES} ${srcdir}/cadillac.c | |
83 | ||
84 | lint: $(LINTFILES) | |
85 | $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ | |
86 | =================================================================== | |
87 | RCS file: /local/cvsfiles/devo/gdb/breakpoint.c,v | |
88 | retrieving revision 1.36 | |
89 | diff -c -r1.36 breakpoint.c | |
90 | *** 1.36 1992/06/17 21:53:28 | |
91 | --- breakpoint.c 1992/06/23 04:19:21 | |
92 | *************** | |
93 | *** 273,278 **** | |
94 | --- 273,280 ---- | |
95 | b->cond_string = NULL; | |
96 | if (from_tty) | |
97 | printf_filtered ("Breakpoint %d now unconditional.\n", bnum); | |
98 | + if (cadillac) | |
99 | + cadillac_condition_breakpoint(b); | |
100 | } | |
101 | else | |
102 | { | |
103 | *************** | |
104 | *** 281,286 **** | |
105 | --- 283,290 ---- | |
106 | typed in or the decompiled expression. */ | |
107 | b->cond_string = savestring (arg, strlen (arg)); | |
108 | b->cond = parse_exp_1 (&arg, block_for_pc (b->address), 0); | |
109 | + if (cadillac) | |
110 | + cadillac_condition_breakpoint(b); | |
111 | if (*arg) | |
112 | error ("Junk at end of expression"); | |
113 | } | |
114 | *************** | |
115 | *** 316,330 **** | |
116 | ALL_BREAKPOINTS (b) | |
117 | if (b->number == bnum) | |
118 | { | |
119 | ! if (from_tty && input_from_terminal_p ()) | |
120 | ! { | |
121 | ! printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ | |
122 | End with a line saying just \"end\".\n", bnum); | |
123 | - fflush (stdout); | |
124 | - } | |
125 | l = read_command_lines (); | |
126 | free_command_lines (&b->commands); | |
127 | b->commands = l; | |
128 | return; | |
129 | } | |
130 | error ("No breakpoint number %d.", bnum); | |
131 | --- 320,333 ---- | |
132 | ALL_BREAKPOINTS (b) | |
133 | if (b->number == bnum) | |
134 | { | |
135 | ! if ((from_tty && input_from_terminal_p ()) || cadillac) | |
136 | ! printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ | |
137 | End with a line saying just \"end\".\n", bnum); | |
138 | l = read_command_lines (); | |
139 | free_command_lines (&b->commands); | |
140 | b->commands = l; | |
141 | + if (cadillac) | |
142 | + cadillac_commands_breakpoint(b); | |
143 | return; | |
144 | } | |
145 | error ("No breakpoint number %d.", bnum); | |
146 | *************** | |
147 | *** 925,930 **** | |
148 | --- 928,935 ---- | |
149 | { | |
150 | b->ignore_count--; | |
151 | this_bp_stop = 0; | |
152 | + if (cadillac) | |
153 | + cadillac_ignore_breakpoint(b); | |
154 | } | |
155 | else | |
156 | { | |
157 | *************** | |
158 | *** 1365,1370 **** | |
159 | --- 1370,1378 ---- | |
160 | mention (b) | |
161 | struct breakpoint *b; | |
162 | { | |
163 | + if (cadillac) | |
164 | + cadillac_create_breakpoint(b); | |
165 | + | |
166 | switch (b->type) | |
167 | { | |
168 | case bp_watchpoint: | |
169 | *************** | |
170 | *** 2106,2111 **** | |
171 | --- 2114,2122 ---- | |
172 | register struct breakpoint *b; | |
173 | register bpstat bs; | |
174 | ||
175 | + if (cadillac) | |
176 | + cadillac_delete_breakpoint(bpt); | |
177 | + | |
178 | if (bpt->inserted) | |
179 | target_remove_breakpoint(bpt->address, bpt->shadow_contents); | |
180 | ||
181 | *************** | |
182 | *** 2277,2282 **** | |
183 | --- 2288,2295 ---- | |
184 | if (b->number == bptnum) | |
185 | { | |
186 | b->ignore_count = count; | |
187 | + if (cadillac) | |
188 | + cadillac_ignore_breakpoint(b); | |
189 | if (!from_tty) | |
190 | return; | |
191 | else if (count == 0) | |
192 | *************** | |
193 | *** 2301,2307 **** | |
194 | struct breakpoint *b; | |
195 | ||
196 | ALL_BREAKPOINTS (b) | |
197 | ! b->ignore_count = 0; | |
198 | } | |
199 | ||
200 | /* Command to set ignore-count of breakpoint N to COUNT. */ | |
201 | --- 2314,2324 ---- | |
202 | struct breakpoint *b; | |
203 | ||
204 | ALL_BREAKPOINTS (b) | |
205 | ! { | |
206 | ! b->ignore_count = 0; | |
207 | ! if (cadillac) | |
208 | ! cadillac_ignore_breakpoint(b); | |
209 | ! } | |
210 | } | |
211 | ||
212 | /* Command to set ignore-count of breakpoint N to COUNT. */ | |
213 | *************** | |
214 | *** 2368,2373 **** | |
215 | --- 2385,2393 ---- | |
216 | { | |
217 | bpt->enable = enabled; | |
218 | ||
219 | + if (cadillac) | |
220 | + cadillac_enable_breakpoint(bpt); | |
221 | + | |
222 | if (xgdb_verbose && bpt->type == bp_breakpoint) | |
223 | printf ("breakpoint #%d enabled\n", bpt->number); | |
224 | ||
225 | *************** | |
226 | *** 2415,2420 **** | |
227 | --- 2435,2443 ---- | |
228 | disable_breakpoint (bpt) | |
229 | struct breakpoint *bpt; | |
230 | { | |
231 | + if (cadillac) | |
232 | + cadillac_disable_breakpoint(bpt); | |
233 | + | |
234 | bpt->enable = disabled; | |
235 | ||
236 | if (xgdb_verbose && bpt->type == bp_breakpoint) | |
237 | =================================================================== | |
238 | RCS file: /local/cvsfiles/devo/gdb/command.c,v | |
239 | retrieving revision 1.15 | |
240 | diff -c -r1.15 command.c | |
241 | *** 1.15 1992/06/23 03:33:41 | |
242 | --- command.c 1992/06/23 04:19:26 | |
243 | *************** | |
244 | *** 1149,1155 **** | |
245 | } | |
246 | ||
247 | if (pid != -1) | |
248 | ! while ((rc = wait (&status)) != pid && rc != -1) | |
249 | ; | |
250 | else | |
251 | error ("Fork failed"); | |
252 | --- 1149,1155 ---- | |
253 | } | |
254 | ||
255 | if (pid != -1) | |
256 | ! while ((rc = cadillac ? cadillac_wait(&status) : wait (&status)) != pid && rc != -1) | |
257 | ; | |
258 | else | |
259 | error ("Fork failed"); | |
260 | =================================================================== | |
261 | RCS file: /local/cvsfiles/devo/gdb/defs.h,v | |
262 | retrieving revision 1.36 | |
263 | diff -c -r1.36 defs.h | |
264 | *** 1.36 1992/06/15 14:26:55 | |
265 | --- defs.h 1992/06/16 01:24:19 | |
266 | *************** | |
267 | *** 774,777 **** | |
268 | --- 774,846 ---- | |
269 | extern CORE_ADDR | |
270 | push_word (); | |
271 | ||
272 | + /* Energize/Cadillac stuff */ | |
273 | + | |
274 | + /* Non-zero means that we're doing the cadillac interface. */ | |
275 | + extern int cadillac; | |
276 | + | |
277 | + /* Get a pty for use with cadillac */ | |
278 | + extern char *cadillac_getpty PARAMS ((void)); | |
279 | + | |
280 | + /* Notify cadillac of new process creation */ | |
281 | + extern void cadillac_new_process PARAMS ((void)); | |
282 | + | |
283 | + /* Low level wait routine for wait_for_inferior */ | |
284 | + extern int cadillac_wait PARAMS ((int *)); | |
285 | + | |
286 | + /* Initialize */ | |
287 | + extern void cadillac_initialize PARAMS ((char *, char *)); | |
288 | + | |
289 | + /* Main loop for cadillac protocol driver */ | |
290 | + extern void cadillac_main_loop PARAMS ((void)); | |
291 | + | |
292 | + struct cmd_list_element; | |
293 | + | |
294 | + /* Command hook for cadillac */ | |
295 | + extern void cadillac_call_command PARAMS ((struct cmd_list_element *, | |
296 | + char *, int)); | |
297 | + | |
298 | + /* Read commands for the command command, and others */ | |
299 | + extern char *cadillac_command_line_input PARAMS ((void)); | |
300 | + | |
301 | + struct symbol; | |
302 | + struct type; | |
303 | + | |
304 | + extern void cadillac_start_variable_annotation PARAMS ((char *, | |
305 | + struct symbol *, | |
306 | + struct type *, | |
307 | + CORE_ADDR, | |
308 | + char *)); | |
309 | + | |
310 | + extern void cadillac_end_variable_annotation PARAMS ((void)); | |
311 | + | |
312 | + extern void cadillac_annotate_function PARAMS ((char *, int, int)); | |
313 | + | |
314 | + struct objfile; | |
315 | + extern void cadillac_symbol_file PARAMS ((struct objfile *)); | |
316 | + | |
317 | + /*extern void cadillac_query PARAMS ((char *, ...));*/ | |
318 | + extern void cadillac_query (); /* Prototypes for varargs don't work */ | |
319 | + | |
320 | + extern char *cadillac_command_line_input PARAMS ((void)); | |
321 | + | |
322 | + extern void cadillac_acknowledge_query PARAMS ((char *)); | |
323 | + | |
324 | + extern void cadillac_fputs PARAMS ((const char *)); | |
325 | + | |
326 | + struct breakpoint; | |
327 | + extern void cadillac_condition_breakpoint PARAMS ((struct breakpoint *)); | |
328 | + | |
329 | + extern void cadillac_commands_breakpoint PARAMS ((struct breakpoint *)); | |
330 | + | |
331 | + extern void cadillac_ignore_breakpoint PARAMS ((struct breakpoint *)); | |
332 | + | |
333 | + extern void cadillac_create_breakpoint PARAMS ((struct breakpoint *)); | |
334 | + | |
335 | + extern void cadillac_delete_breakpoint PARAMS ((struct breakpoint *)); | |
336 | + | |
337 | + extern void cadillac_enable_breakpoint PARAMS ((struct breakpoint *)); | |
338 | + | |
339 | + extern void cadillac_disable_breakpoint PARAMS ((struct breakpoint *)); | |
340 | + | |
341 | #endif /* !defined (DEFS_H) */ | |
342 | =================================================================== | |
343 | RCS file: /local/cvsfiles/devo/gdb/inflow.c,v | |
344 | retrieving revision 1.25 | |
345 | diff -c -r1.25 inflow.c | |
346 | *** 1.25 1992/05/17 23:54:22 | |
347 | --- inflow.c 1992/06/15 23:02:32 | |
348 | *************** | |
349 | *** 81,87 **** | |
350 | static short pgrp_inferior; | |
351 | static short pgrp_ours; | |
352 | # else /* not def SHORT_PGRP */ | |
353 | ! static int pgrp_inferior; | |
354 | static int pgrp_ours; | |
355 | # endif /* not def SHORT_PGRP */ | |
356 | #else /* not def TIOCGPGRP */ | |
357 | --- 81,87 ---- | |
358 | static short pgrp_inferior; | |
359 | static short pgrp_ours; | |
360 | # else /* not def SHORT_PGRP */ | |
361 | ! int pgrp_inferior; | |
362 | static int pgrp_ours; | |
363 | # endif /* not def SHORT_PGRP */ | |
364 | #else /* not def TIOCGPGRP */ | |
365 | =================================================================== | |
366 | RCS file: /local/cvsfiles/devo/gdb/infrun.c,v | |
367 | retrieving revision 1.49 | |
368 | diff -c -r1.49 infrun.c | |
369 | *** 1.49 1992/06/23 00:24:50 | |
370 | --- infrun.c 1992/06/23 04:19:35 | |
371 | *************** | |
372 | *** 615,620 **** | |
373 | --- 615,622 ---- | |
374 | Here we must get it up to actual execution of the real program. */ | |
375 | ||
376 | inferior_pid = pid; /* Needed for wait_for_inferior stuff below */ | |
377 | + if (cadillac) | |
378 | + cadillac_new_process(); | |
379 | ||
380 | clear_proceed_status (); | |
381 | ||
382 | *************** | |
383 | *** 753,758 **** | |
384 | --- 755,762 ---- | |
385 | ||
386 | attach (pid); | |
387 | inferior_pid = pid; | |
388 | + if (cadillac) | |
389 | + cadillac_new_process(); | |
390 | push_target (&child_ops); | |
391 | ||
392 | mark_breakpoints_out (); | |
393 | =================================================================== | |
394 | RCS file: /local/cvsfiles/devo/gdb/inftarg.c,v | |
395 | retrieving revision 1.11 | |
396 | diff -c -r1.11 inftarg.c | |
397 | *** 1.11 1992/03/29 23:21:27 | |
398 | --- inftarg.c 1992/06/15 23:56:08 | |
399 | *************** | |
400 | *** 58,64 **** | |
401 | #ifdef USE_PROC_FS | |
402 | pid = proc_wait (status); | |
403 | #else | |
404 | ! pid = wait (status); | |
405 | #endif | |
406 | if (pid == -1) /* No more children to wait for */ | |
407 | { | |
408 | --- 58,67 ---- | |
409 | #ifdef USE_PROC_FS | |
410 | pid = proc_wait (status); | |
411 | #else | |
412 | ! if (cadillac) | |
413 | ! pid = cadillac_wait (status); | |
414 | ! else | |
415 | ! pid = wait (status); | |
416 | #endif | |
417 | if (pid == -1) /* No more children to wait for */ | |
418 | { | |
419 | =================================================================== | |
420 | RCS file: /local/cvsfiles/devo/gdb/main.c,v | |
421 | retrieving revision 1.47 | |
422 | diff -c -r1.47 main.c | |
423 | *** 1.47 1992/06/09 06:09:23 | |
424 | --- main.c 1992/06/13 03:32:16 | |
425 | *************** | |
426 | *** 397,402 **** | |
427 | --- 397,403 ---- | |
428 | char *corearg = NULL; | |
429 | char *cdarg = NULL; | |
430 | char *ttyarg = NULL; | |
431 | + char *cadillac_id = NULL; | |
432 | ||
433 | /* Pointers to all arguments of +command option. */ | |
434 | char **cmdarg; | |
435 | *************** | |
436 | *** 492,497 **** | |
437 | --- 493,499 ---- | |
438 | {"tty", required_argument, 0, 't'}, | |
439 | {"baud", required_argument, 0, 'b'}, | |
440 | {"b", required_argument, 0, 'b'}, | |
441 | + {"context", required_argument, 0, 12}, | |
442 | /* Allow machine descriptions to add more options... */ | |
443 | #ifdef ADDITIONAL_OPTIONS | |
444 | ADDITIONAL_OPTIONS | |
445 | *************** | |
446 | *** 524,529 **** | |
447 | --- 526,534 ---- | |
448 | case 11: | |
449 | cdarg = optarg; | |
450 | break; | |
451 | + case 12: | |
452 | + cadillac_id = optarg; | |
453 | + break; | |
454 | case 's': | |
455 | symarg = optarg; | |
456 | break; | |
457 | *************** | |
458 | *** 670,675 **** | |
459 | --- 675,683 ---- | |
460 | free ((PTR)dirarg); | |
461 | do_cleanups (ALL_CLEANUPS); | |
462 | ||
463 | + if (cadillac_id) | |
464 | + cadillac_initialize (cadillac_id, execarg); | |
465 | + | |
466 | if (execarg != NULL | |
467 | && symarg != NULL | |
468 | && strcmp (execarg, symarg) == 0) | |
469 | *************** | |
470 | *** 691,696 **** | |
471 | --- 699,705 ---- | |
472 | if (!setjmp (to_top_level)) | |
473 | symbol_file_command (symarg, 0); | |
474 | } | |
475 | + | |
476 | do_cleanups (ALL_CLEANUPS); | |
477 | ||
478 | /* After the symbol file has been read, print a newline to get us | |
479 | *************** | |
480 | *** 818,824 **** | |
481 | if (!setjmp (to_top_level)) | |
482 | { | |
483 | do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ | |
484 | ! command_loop (); | |
485 | quit_command ((char *)0, instream == stdin); | |
486 | } | |
487 | } | |
488 | --- 827,836 ---- | |
489 | if (!setjmp (to_top_level)) | |
490 | { | |
491 | do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ | |
492 | ! if (cadillac_id) | |
493 | ! cadillac_main_loop(); | |
494 | ! else | |
495 | ! command_loop (); | |
496 | quit_command ((char *)0, instream == stdin); | |
497 | } | |
498 | } | |
499 | *************** | |
500 | *** 880,886 **** | |
501 | else if (c->function.cfunc == NO_FUNCTION) | |
502 | error ("That is not a command, just a help topic."); | |
503 | else | |
504 | ! (*c->function.cfunc) (arg, from_tty & caution); | |
505 | } | |
506 | ||
507 | /* Tell the user if the language has changed (except first time). */ | |
508 | --- 892,901 ---- | |
509 | else if (c->function.cfunc == NO_FUNCTION) | |
510 | error ("That is not a command, just a help topic."); | |
511 | else | |
512 | ! if (cadillac) | |
513 | ! cadillac_call_command (c, arg, from_tty & caution); | |
514 | ! else | |
515 | ! (*c->function.cfunc) (arg, from_tty & caution); | |
516 | } | |
517 | ||
518 | /* Tell the user if the language has changed (except first time). */ | |
519 | *************** | |
520 | *** 1516,1522 **** | |
521 | while (1) | |
522 | { | |
523 | dont_repeat (); | |
524 | ! p = command_line_input ((char *) NULL, instream == stdin); | |
525 | if (p == NULL) | |
526 | /* Treat end of file like "end". */ | |
527 | break; | |
528 | --- 1531,1540 ---- | |
529 | while (1) | |
530 | { | |
531 | dont_repeat (); | |
532 | ! if (cadillac) | |
533 | ! p = cadillac_command_line_input(); | |
534 | ! else | |
535 | ! p = command_line_input ((char *) NULL, instream == stdin); | |
536 | if (p == NULL) | |
537 | /* Treat end of file like "end". */ | |
538 | break; | |
539 | *************** | |
540 | *** 1820,1826 **** | |
541 | void | |
542 | print_prompt () | |
543 | { | |
544 | ! printf ("%s", prompt); | |
545 | fflush (stdout); | |
546 | } | |
547 | \f | |
548 | --- 1838,1844 ---- | |
549 | void | |
550 | print_prompt () | |
551 | { | |
552 | ! printf_filtered ("%s", prompt); | |
553 | fflush (stdout); | |
554 | } | |
555 | \f | |
556 | =================================================================== | |
557 | RCS file: /local/cvsfiles/devo/gdb/mipsread.c,v | |
558 | retrieving revision 1.71 | |
559 | diff -c -r1.71 mipsread.c | |
560 | *** 1.71 1992/06/17 18:14:19 | |
561 | --- mipsread.c 1992/06/23 04:19:41 | |
562 | *************** | |
563 | *** 67,72 **** | |
564 | --- 67,73 ---- | |
565 | #include <sys/param.h> | |
566 | #include <sys/file.h> | |
567 | #include <sys/stat.h> | |
568 | + #include <strings.h> | |
569 | ||
570 | #include "coff/mips.h" /* COFF-like aspects of ecoff files */ | |
571 | #include "coff/ecoff-ext.h" /* External forms of ecoff sym structures */ | |
572 | =================================================================== | |
573 | RCS file: /local/cvsfiles/devo/gdb/printcmd.c,v | |
574 | retrieving revision 1.28 | |
575 | diff -c -r1.28 printcmd.c | |
576 | *** 1.28 1992/06/13 18:20:41 | |
577 | --- printcmd.c 1992/06/14 22:11:35 | |
578 | *************** | |
579 | *** 778,783 **** | |
580 | --- 778,792 ---- | |
581 | { | |
582 | int histindex = record_latest_value (val); | |
583 | ||
584 | + if (cadillac) | |
585 | + { | |
586 | + char buf[20]; | |
587 | + | |
588 | + sprintf(buf, "$%d", histindex); | |
589 | + cadillac_start_variable_annotation(buf, NULL, VALUE_TYPE(val), | |
590 | + VALUE_ADDRESS(val), ""); | |
591 | + } | |
592 | + | |
593 | if (inspect) | |
594 | printf ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex); | |
595 | else | |
596 | *************** | |
597 | *** 784,789 **** | |
598 | --- 793,800 ---- | |
599 | if (histindex >= 0) printf_filtered ("$%d = ", histindex); | |
600 | ||
601 | print_formatted (val, format, fmt.size); | |
602 | + if (cadillac) | |
603 | + cadillac_end_variable_annotation(); | |
604 | printf_filtered ("\n"); | |
605 | if (inspect) | |
606 | printf("\") )\030"); | |
607 | *************** | |
608 | *** 1608,1618 **** | |
609 | --- 1619,1639 ---- | |
610 | standard indentation here is 4 spaces, and val_print indents | |
611 | 2 for each recurse. */ | |
612 | val = read_var_value (sym, FRAME_INFO_ID (fi)); | |
613 | + | |
614 | + if (cadillac) | |
615 | + cadillac_start_variable_annotation(SYMBOL_NAME(sym), sym, | |
616 | + VALUE_TYPE(val), | |
617 | + VALUE_ADDRESS(val), ""); | |
618 | + | |
619 | if (val) | |
620 | val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val), | |
621 | stream, 0, 0, 2, Val_no_prettyprint); | |
622 | else | |
623 | fputs_filtered ("???", stream); | |
624 | + | |
625 | + if (cadillac) | |
626 | + cadillac_end_variable_annotation(); | |
627 | + | |
628 | first = 0; | |
629 | } | |
630 | ||
631 | =================================================================== | |
632 | RCS file: /local/cvsfiles/devo/gdb/stack.c,v | |
633 | retrieving revision 1.30 | |
634 | diff -c -r1.30 stack.c | |
635 | *** 1.30 1992/06/20 23:30:33 | |
636 | --- stack.c 1992/06/23 04:19:48 | |
637 | *************** | |
638 | *** 159,165 **** | |
639 | if (addressprint) | |
640 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
641 | ||
642 | ! fputs_demangled (fname, stdout, 0); | |
643 | fputs_filtered (" (...)\n", stdout); | |
644 | ||
645 | return; | |
646 | --- 159,168 ---- | |
647 | if (addressprint) | |
648 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
649 | ||
650 | ! if (cadillac) | |
651 | ! cadillac_annotate_function(fname, 0, level); | |
652 | ! else | |
653 | ! fputs_demangled (fname, stdout, 0); | |
654 | fputs_filtered (" (...)\n", stdout); | |
655 | ||
656 | return; | |
657 | *************** | |
658 | *** 218,224 **** | |
659 | if (addressprint) | |
660 | if (fi->pc != sal.pc || !sal.symtab) | |
661 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
662 | ! fputs_demangled (funname ? funname : "??", stdout, 0); | |
663 | wrap_here (" "); | |
664 | fputs_filtered (" (", stdout); | |
665 | if (args) | |
666 | --- 221,230 ---- | |
667 | if (addressprint) | |
668 | if (fi->pc != sal.pc || !sal.symtab) | |
669 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
670 | ! if (cadillac) | |
671 | ! cadillac_annotate_function(funname ? funname : "??", 0, level); | |
672 | ! else | |
673 | ! fputs_demangled (funname ? funname : "??", stdout, 0); | |
674 | wrap_here (" "); | |
675 | fputs_filtered (" (", stdout); | |
676 | if (args) | |
677 | *************** | |
678 | *** 255,261 **** | |
679 | { | |
680 | if (addressprint && mid_statement) | |
681 | printf_filtered ("%s\t", local_hex_string(fi->pc)); | |
682 | ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); | |
683 | } | |
684 | current_source_line = max (sal.line - lines_to_list/2, 1); | |
685 | } | |
686 | --- 261,268 ---- | |
687 | { | |
688 | if (addressprint && mid_statement) | |
689 | printf_filtered ("%s\t", local_hex_string(fi->pc)); | |
690 | ! if (!cadillac) | |
691 | ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); | |
692 | } | |
693 | current_source_line = max (sal.line - lines_to_list/2, 1); | |
694 | } | |
695 | *************** | |
696 | *** 429,435 **** | |
697 | if (funname) | |
698 | { | |
699 | printf_filtered (" in "); | |
700 | ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS); | |
701 | } | |
702 | wrap_here (" "); | |
703 | if (sal.symtab) | |
704 | --- 436,446 ---- | |
705 | if (funname) | |
706 | { | |
707 | printf_filtered (" in "); | |
708 | ! if (cadillac) | |
709 | ! cadillac_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS, | |
710 | ! selected_frame_level); | |
711 | ! else | |
712 | ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS); | |
713 | } | |
714 | wrap_here (" "); | |
715 | if (sal.symtab) | |
716 | =================================================================== | |
717 | RCS file: /local/cvsfiles/devo/gdb/symfile.c,v | |
718 | retrieving revision 1.53 | |
719 | diff -c -r1.53 symfile.c | |
720 | *** 1.53 1992/06/13 16:20:12 | |
721 | --- symfile.c 1992/06/14 22:11:39 | |
722 | *************** | |
723 | *** 555,560 **** | |
724 | --- 555,563 ---- | |
725 | fflush (stdout); | |
726 | } | |
727 | ||
728 | + if (cadillac) | |
729 | + cadillac_symbol_file(objfile); | |
730 | + | |
731 | return (objfile); | |
732 | } | |
733 | ||
734 | =================================================================== | |
735 | RCS file: /local/cvsfiles/devo/gdb/utils.c,v | |
736 | retrieving revision 1.50 | |
737 | diff -c -r1.50 utils.c | |
738 | *** 1.50 1992/06/15 14:27:07 | |
739 | --- utils.c 1992/06/16 01:24:28 | |
740 | *************** | |
741 | *** 96,101 **** | |
742 | --- 96,102 ---- | |
743 | ||
744 | char *error_pre_print; | |
745 | char *warning_pre_print = "\nwarning: "; | |
746 | + | |
747 | \f | |
748 | /* Add a new cleanup to the cleanup_chain, | |
749 | and return the previous chain pointer | |
750 | *************** | |
751 | *** 694,700 **** | |
752 | register int ans2; | |
753 | ||
754 | /* Automatically answer "yes" if input is not from a terminal. */ | |
755 | ! if (!input_from_terminal_p ()) | |
756 | return 1; | |
757 | ||
758 | while (1) | |
759 | --- 695,701 ---- | |
760 | register int ans2; | |
761 | ||
762 | /* Automatically answer "yes" if input is not from a terminal. */ | |
763 | ! if (!input_from_terminal_p () && !cadillac) | |
764 | return 1; | |
765 | ||
766 | while (1) | |
767 | *************** | |
768 | *** 701,721 **** | |
769 | { | |
770 | va_start (args); | |
771 | ctlstr = va_arg (args, char *); | |
772 | vfprintf_filtered (stdout, ctlstr, args); | |
773 | - va_end (args); | |
774 | printf_filtered ("(y or n) "); | |
775 | ! fflush (stdout); | |
776 | ! answer = fgetc (stdin); | |
777 | ! clearerr (stdin); /* in case of C-d */ | |
778 | ! if (answer == EOF) /* C-d */ | |
779 | ! return 1; | |
780 | ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */ | |
781 | ! do | |
782 | ! { | |
783 | ! ans2 = fgetc (stdin); | |
784 | ! clearerr (stdin); | |
785 | ! } | |
786 | ! while (ans2 != EOF && ans2 != '\n'); | |
787 | if (answer >= 'a') | |
788 | answer -= 040; | |
789 | if (answer == 'Y') | |
790 | --- 702,734 ---- | |
791 | { | |
792 | va_start (args); | |
793 | ctlstr = va_arg (args, char *); | |
794 | + if (cadillac) | |
795 | + cadillac_query (ctlstr, args); | |
796 | vfprintf_filtered (stdout, ctlstr, args); | |
797 | printf_filtered ("(y or n) "); | |
798 | ! if (cadillac) | |
799 | ! { | |
800 | ! char *buf; | |
801 | ! | |
802 | ! buf = cadillac_command_line_input(); | |
803 | ! answer = buf ? *buf : 'Y'; | |
804 | ! cadillac_acknowledge_query(buf); | |
805 | ! } | |
806 | ! else | |
807 | ! { | |
808 | ! fflush (stdout); | |
809 | ! answer = fgetc (stdin); | |
810 | ! clearerr (stdin); /* in case of C-d */ | |
811 | ! if (answer == EOF) /* C-d */ | |
812 | ! return 1; | |
813 | ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */ | |
814 | ! do | |
815 | ! { | |
816 | ! ans2 = fgetc (stdin); | |
817 | ! clearerr (stdin); | |
818 | ! } | |
819 | ! while (ans2 != EOF && ans2 != '\n'); | |
820 | ! } | |
821 | if (answer >= 'a') | |
822 | answer -= 040; | |
823 | if (answer == 'Y') | |
824 | *************** | |
825 | *** 723,728 **** | |
826 | --- 736,742 ---- | |
827 | if (answer == 'N') | |
828 | return 0; | |
829 | printf_filtered ("Please answer y or n.\n"); | |
830 | + va_end (args); | |
831 | } | |
832 | } | |
833 | ||
834 | *************** | |
835 | *** 989,994 **** | |
836 | --- 1003,1014 ---- | |
837 | if (linebuffer == 0) | |
838 | return; | |
839 | ||
840 | + if (cadillac) | |
841 | + { | |
842 | + cadillac_fputs(linebuffer); | |
843 | + return; | |
844 | + } | |
845 | + | |
846 | /* Don't do any filtering if it is disabled. */ | |
847 | if (stream != stdout | |
848 | || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) | |
849 | =================================================================== | |
850 | RCS file: /local/cvsfiles/devo/gdb/valprint.c,v | |
851 | retrieving revision 1.42 | |
852 | diff -c -r1.42 valprint.c | |
853 | *** 1.42 1992/06/23 03:33:47 | |
854 | --- valprint.c 1992/06/23 04:19:55 | |
855 | *************** | |
856 | *** 485,490 **** | |
857 | --- 485,491 ---- | |
858 | struct type **dont_print; | |
859 | { | |
860 | int i, len, n_baseclasses; | |
861 | + char expr_tag[100]; /* Cadillac */ | |
862 | ||
863 | check_stub_type (type); | |
864 | ||
865 | *************** | |
866 | *** 549,554 **** | |
867 | --- 550,563 ---- | |
868 | fputs_filtered (TYPE_FIELD_NAME (type, i), stream); | |
869 | fputs_filtered (" = ", stream); | |
870 | } | |
871 | + | |
872 | + sprintf(expr_tag, ".%s", TYPE_FIELD_NAME(type, i)); | |
873 | + | |
874 | + if (cadillac) | |
875 | + cadillac_start_variable_annotation(expr_tag, NULL, | |
876 | + TYPE_FIELD_TYPE(type, i), | |
877 | + (CORE_ADDR) (valaddr + TYPE_FIELD_BITPOS(type, i) / 8), | |
878 | + ""); | |
879 | if (TYPE_FIELD_PACKED (type, i)) | |
880 | { | |
881 | value v; | |
882 | *************** | |
883 | *** 567,572 **** | |
884 | --- 576,583 ---- | |
885 | valaddr + TYPE_FIELD_BITPOS (type, i) / 8, | |
886 | 0, stream, format, 0, recurse + 1, pretty); | |
887 | } | |
888 | + if (cadillac) | |
889 | + cadillac_end_variable_annotation(); | |
890 | } | |
891 | if (pretty) | |
892 | { | |
893 | *************** | |
894 | *** 801,806 **** | |
895 | --- 812,818 ---- | |
896 | unsigned int rep1; | |
897 | /* Number of repetitions we have detected so far. */ | |
898 | unsigned int reps; | |
899 | + char expr_tag[100]; /* Cadillac */ | |
900 | ||
901 | if (i != 0) | |
902 | if (arrayprint) | |
903 | *************** | |
904 | *** 822,827 **** | |
905 | --- 834,845 ---- | |
906 | ++rep1; | |
907 | } | |
908 | ||
909 | + sprintf(expr_tag, "[%d]", i); | |
910 | + if (cadillac) | |
911 | + cadillac_start_variable_annotation(expr_tag, NULL, | |
912 | + elttype, | |
913 | + (CORE_ADDR) (valaddr + i * eltlen), | |
914 | + ""); | |
915 | if (reps > REPEAT_COUNT_THRESHOLD) | |
916 | { | |
917 | val_print (elttype, valaddr + i * eltlen, | |
918 | *************** | |
919 | *** 838,843 **** | |
920 | --- 856,863 ---- | |
921 | recurse + 1, pretty); | |
922 | things_printed++; | |
923 | } | |
924 | + if (cadillac) | |
925 | + cadillac_end_variable_annotation(); | |
926 | } | |
927 | if (i < len) | |
928 | fprintf_filtered (stream, "..."); | |
929 | =================================================================== | |
930 | RCS file: /local/cvsfiles/devo/gdb/config/ncr3000.mh,v | |
931 | retrieving revision 1.4 | |
932 | diff -c -r1.4 ncr3000.mh | |
933 | *** 1.4 1992/06/15 19:25:13 | |
934 | --- ncr3000.mh 1992/06/16 01:28:40 | |
935 | *************** | |
936 | *** 38,40 **** | |
937 | --- 38,46 ---- | |
938 | # The /usr/ucb/install program is incompatible (complains about unknown | |
939 | # group staff). Use good old cp... | |
940 | INSTALL = cp | |
941 | + | |
942 | + # These are the libs that are needed for the Cadillac version of gdb on | |
943 | + # SVR4. Note that we MUST include the standard C library before libucb.a, | |
944 | + # otherwise we get lots of broken stuff we don't want. | |
945 | + CADILLAC_LIBS = ${srcdir}/deblib/connection/libconn.a -L/usr/lib -lm -lnet \ | |
946 | + -lresolv -lform -lsocket -lc /usr/ucblib/libucb.a -lnsl |