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