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