]> Git Repo - binutils.git/blob - gdb/energize-patches
* hppa-tdep.c (frameless_function_invocation): If no unwind
[binutils.git] / gdb / energize-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 *** 2.72        1992/09/27 06:48:41
7 --- .Sanitize   1992/09/28 21:34:08
8 ***************
9 *** 74,79 ****
10 --- 74,82 ----
11   doc
12   dwarfread.c
13   elfread.c
14 + energize
15 + energize.c
16 + energize.h
17   environ.c
18   environ.h
19   eval.c
20 ===================================================================
21 *** 1.187       1992/09/26 08:06:30
22 --- Makefile.in 1992/09/28 21:34:08
23 ***************
24 *** 123,128 ****
25 --- 123,135 ----
26   READLINE_DEP = $$(READLINE_DIR)
27   RL_LIB = ./../readline${subdir}/libreadline.a
28   
29 + # Energize libraries.  Works slightly differently than other libraries
30 + # because it is a gdb subdir and we try to build the energize library
31 + # if it doesn't exist, unlike readline, bfd, mmalloc, etc.  Note
32 + # that SDIR and BDIR will be different if we configured with -srcdir.
33 + ENERGIZE_DIR = energize
34 + ENERGIZE_LIB = ${ENERGIZE_DIR}/libconn.a
35
36   # All the includes used for CFLAGS and for lint.
37   # -I. for config files.
38   # -I${srcdir} possibly for regex.h also.
39 ***************
40 *** 157,166 ****
41   # Libraries and corresponding dependencies for compiling gdb.
42   # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
43   # TERMCAP comes after readline, since readline depends on it.
44 ! CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
45 !       ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS}
46 ! CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} \
47 !       ${BFD_LIB} ${RL_LIB}            ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY}
48   
49   ADD_FILES = ${REGEX} ${ALLOCA}  ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
50   ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
51 --- 164,173 ----
52   # Libraries and corresponding dependencies for compiling gdb.
53   # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
54   # TERMCAP comes after readline, since readline depends on it.
55 ! CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} \
56 !       ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS} ${ENERGIZE_LIB}
57 ! CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} ${BFD_LIB} ${RL_LIB} ${OPCODES} \
58 !       ${MMALLOC_LIB} ${LIBIBERTY} ${ENERGIZE_LIB}
59   
60   ADD_FILES = ${REGEX} ${ALLOCA}  ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
61   ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
62 ***************
63 *** 200,206 ****
64          mem-break.c target.c \
65          dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
66          language.c parse.c buildsym.c objfiles.c \
67 !        minsyms.c mipsread.c maint.c
68   
69   # Source files in subdirectories (which will be handled separately by
70   #  'make gdb.tar.Z').
71 --- 207,213 ----
72          mem-break.c target.c \
73          dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
74          language.c parse.c buildsym.c objfiles.c \
75 !        minsyms.c mipsread.c maint.c energize.c
76   
77   # Source files in subdirectories (which will be handled separately by
78   #  'make gdb.tar.Z').
79 ***************
80 *** 289,295 ****
81       command.o utils.o expprint.o environ.o version.o gdbtypes.o \
82       copying.o $(DEPFILES) mem-break.o target.o \
83       putenv.o parse.o language.o $(YYOBJ) \
84 !     buildsym.o objfiles.o minsyms.o maint.o demangle.o \
85       dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
86       stabsread.o core.o
87   
88 --- 296,302 ----
89       command.o utils.o expprint.o environ.o version.o gdbtypes.o \
90       copying.o $(DEPFILES) mem-break.o target.o \
91       putenv.o parse.o language.o $(YYOBJ) \
92 !     buildsym.o objfiles.o minsyms.o maint.o demangle.o energize.o \
93       dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
94       stabsread.o core.o
95   
96 ***************
97 *** 303,309 ****
98   
99   NTSSTART = kdb-start.o
100   
101 ! SUBDIRS = doc
102   
103   # For now, shortcut the "configure GDB for fewer languages" stuff.
104   YYFILES = c-exp.tab.c m2-exp.tab.c
105 --- 310,316 ----
106   
107   NTSSTART = kdb-start.o
108   
109 ! SUBDIRS = doc ${ENERGIZE_DIR}
110   
111   # For now, shortcut the "configure GDB for fewer languages" stuff.
112   YYFILES = c-exp.tab.c m2-exp.tab.c
113 ***************
114 *** 365,370 ****
115 --- 372,391 ----
116         #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
117         echo "Load .c corresponding to:" $(DEPFILES)
118   
119 + ${ENERGIZE_LIB} :
120 +       @(cd ${ENERGIZE_DIR}; \
121 +               $(MAKE) \
122 +                       "against=$(against)" \
123 +                       "AR=$(AR)" \
124 +                       "AR_FLAGS=$(AR_FLAGS)" \
125 +                       "CC=$(CC)" \
126 +                       "CFLAGS=$(CFLAGS)" \
127 +                       "RANLIB=$(RANLIB)" \
128 +                       "MAKEINFO=$(MAKEINFO)" \
129 +                       "INSTALL=$(INSTALL)" \
130 +                       "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
131 +                       "INSTALL_DATA=$(INSTALL_DATA)" \
132 +                       "BISON=$(BISON)")
133   
134   # This is useful when debugging GDB, because some Unix's don't let you run GDB
135   # on itself without copying the executable.  So "make gdb1" will make
136 ===================================================================
137 *** 1.48        1992/09/29 05:07:04
138 --- breakpoint.c        1992/09/28 21:34:09
139 ***************
140 *** 273,278 ****
141 --- 273,279 ----
142             b->cond_string = NULL;
143             if (from_tty)
144               printf_filtered ("Breakpoint %d now unconditional.\n", bnum);
145 +           energize_condition_breakpoint(b);
146           }
147         else
148           {
149 ***************
150 *** 281,286 ****
151 --- 282,288 ----
152                typed in or the decompiled expression.  */
153             b->cond_string = savestring (arg, strlen (arg));
154             b->cond = parse_exp_1 (&arg, block_for_pc (b->address), 0);
155 +           energize_condition_breakpoint(b);
156             if (*arg)
157               error ("Junk at end of expression");
158           }
159 ***************
160 *** 322,327 ****
161 --- 324,330 ----
162         l = read_command_lines ();
163         free_command_lines (&b->commands);
164         b->commands = l;
165 +       energize_commands_breakpoint(b);
166         return;
167         }
168     error ("No breakpoint number %d.", bnum);
169 ***************
170 *** 445,452 ****
171                 b->enable = disabled;
172                 if (!disabled_breaks)
173                   {
174 !                   fprintf (stderr,
175 !                        "Cannot insert breakpoint %d:\n", b->number);
176                     printf_filtered ("Disabling shared library breakpoints:\n");
177                   }
178                 disabled_breaks = 1;
179 --- 448,455 ----
180                 b->enable = disabled;
181                 if (!disabled_breaks)
182                   {
183 !                   fprintf_filtered (stderr, "Cannot insert breakpoint %d:\n",
184 !                                     b->number);
185                     printf_filtered ("Disabling shared library breakpoints:\n");
186                   }
187                 disabled_breaks = 1;
188 ***************
189 *** 455,464 ****
190             else
191   #endif
192               {
193 !               fprintf (stderr, "Cannot insert breakpoint %d:\n", b->number);
194   #ifdef ONE_PROCESS_WRITETEXT
195 !               fprintf (stderr,
196 !                 "The same program may be running in another process.\n");
197   #endif
198                 memory_error (val, b->address); /* which bombs us out */
199               }
200 --- 458,468 ----
201             else
202   #endif
203               {
204 !               fprintf_filtered (stderr, "Cannot insert breakpoint %d:\n",
205 !                                 b->number);
206   #ifdef ONE_PROCESS_WRITETEXT
207 !               fprintf_filtered (stderr,
208 !                                 "The same program may be running in another process.\n");
209   #endif
210                 memory_error (val, b->address); /* which bombs us out */
211               }
212 ***************
213 *** 478,484 ****
214     int val;
215   
216   #ifdef BREAKPOINT_DEBUG
217 !   printf ("Removing breakpoints.\n");
218   #endif /* BREAKPOINT_DEBUG */
219   
220     ALL_BREAKPOINTS (b)
221 --- 482,488 ----
222     int val;
223   
224   #ifdef BREAKPOINT_DEBUG
225 !   printf_filtered ("Removing breakpoints.\n");
226   #endif /* BREAKPOINT_DEBUG */
227   
228     ALL_BREAKPOINTS (b)
229 ***************
230 *** 489,500 ****
231           return val;
232         b->inserted = 0;
233   #ifdef BREAKPOINT_DEBUG
234 !       printf ("Removed breakpoint at %s",
235 !               local_hex_string(b->address));
236 !       printf (", shadow %s",
237 !               local_hex_string(b->shadow_contents[0]));
238 !       printf (", %s.\n",
239 !               local_hex_string(b->shadow_contents[1]));
240   #endif /* BREAKPOINT_DEBUG */
241         }
242   
243 --- 493,504 ----
244           return val;
245         b->inserted = 0;
246   #ifdef BREAKPOINT_DEBUG
247 !       printf_filtered ("Removed breakpoint at %s",
248 !                        local_hex_string(b->address));
249 !       printf_filtered (", shadow %s",
250 !                        local_hex_string(b->shadow_contents[0]));
251 !       printf_filtered (", %s.\n",
252 !                        local_hex_string(b->shadow_contents[1]));
253   #endif /* BREAKPOINT_DEBUG */
254         }
255   
256 ***************
257 *** 922,927 ****
258 --- 926,932 ----
259             {
260               b->ignore_count--;
261               this_bp_stop = 0;
262 +             energize_ignore_breakpoint(b);
263             }
264           else
265             {
266 ***************
267 *** 1141,1157 ****
268         others++;
269     if (others > 0)
270       {
271 !       printf ("Note: breakpoint%s ", (others > 1) ? "s" : "");
272         ALL_BREAKPOINTS (b)
273         if (b->address == pc)
274           {
275             others--;
276 !           printf ("%d%s%s ",
277 !                   b->number,
278 !                   (b->enable == disabled) ? " (disabled)" : "",
279 !                   (others > 1) ? "," : ((others == 1) ? " and" : ""));
280           }
281 !       printf ("also set at pc %s.\n", local_hex_string(pc));
282       }
283   }
284   \f
285 --- 1146,1163 ----
286         others++;
287     if (others > 0)
288       {
289 !       printf_filtered ("Note: breakpoint%s ", (others > 1) ? "s" : "");
290         ALL_BREAKPOINTS (b)
291         if (b->address == pc)
292           {
293             others--;
294 !           printf_filtered ("%d%s%s ",
295 !                            b->number,
296 !                            (b->enable == disabled) ? " (disabled)" : "",
297 !                            (others > 1) ? "," :
298 !                              ((others == 1) ? " and" : ""));
299           }
300 !       printf_filtered ("also set at pc %s.\n", local_hex_string(pc));
301       }
302   }
303   \f
304 ***************
305 *** 1373,1378 ****
306 --- 1379,1386 ----
307   mention (b)
308        struct breakpoint *b;
309   {
310 +   energize_create_breakpoint(b);
311
312     switch (b->type)
313       {
314       case bp_watchpoint:
315 ***************
316 *** 1550,1557 ****
317   
318     if (sals.nelts > 1)
319       {
320 !       printf ("Multiple breakpoints were set.\n");
321 !       printf ("Use the \"delete\" command to delete unwanted breakpoints.\n");
322       }
323     free ((PTR)sals.sals);
324   }
325 --- 1558,1565 ----
326   
327     if (sals.nelts > 1)
328       {
329 !       printf_filtered ("Multiple breakpoints were set.\n");
330 !       printf_filtered ("Use the \"delete\" command to delete unwanted breakpoints.\n");
331       }
332     free ((PTR)sals.sals);
333   }
334 ***************
335 *** 1769,1775 ****
336           goto win;
337         }
338   #endif
339 !       printf ("No catch clause for exception %s.\n", p);
340   #if 0
341       win:
342   #endif
343 --- 1777,1783 ----
344           goto win;
345         }
346   #endif
347 !       printf_filtered ("No catch clause for exception %s.\n", p);
348   #if 0
349       win:
350   #endif
351 ***************
352 *** 1970,1985 ****
353         b->enable = enabled;
354         b->disposition = tempflag ? delete : donttouch;
355   
356 !       printf ("Breakpoint %d at %s", b->number, local_hex_string(b->address));
357         if (b->symtab)
358 !       printf (": file %s, line %d.", b->symtab->filename, b->line_number);
359 !       printf ("\n");
360       }
361   
362     if (sals.nelts > 1)
363       {
364 !       printf ("Multiple breakpoints were set.\n");
365 !       printf ("Use the \"delete\" command to delete unwanted breakpoints.\n");
366       }
367     free ((PTR)sals.sals);
368   }
369 --- 1978,1995 ----
370         b->enable = enabled;
371         b->disposition = tempflag ? delete : donttouch;
372   
373 !       printf_filtered ("Breakpoint %d at %s", b->number,
374 !                      local_hex_string(b->address));
375         if (b->symtab)
376 !       printf_filtered (": file %s, line %d.",
377 !                        b->symtab->filename, b->line_number);
378 !       printf_filtered ("\n");
379       }
380   
381     if (sals.nelts > 1)
382       {
383 !       printf_filtered ("Multiple breakpoints were set.\n");
384 !       printf_filtered ("Use the \"delete\" command to delete unwanted breakpoints.\n");
385       }
386     free ((PTR)sals.sals);
387   }
388 ***************
389 *** 2086,2095 ****
390         }
391   
392         if (found->next) from_tty = 1; /* Always report if deleted more than one */
393 !       if (from_tty) printf ("Deleted breakpoint%s ", found->next ? "s" : "");
394         while (found)
395         {
396 !         if (from_tty) printf ("%d ", found->number);
397           b1 = found->next;
398           delete_breakpoint (found);
399           found = b1;
400 --- 2096,2106 ----
401         }
402   
403         if (found->next) from_tty = 1; /* Always report if deleted more than one */
404 !       if (from_tty) printf_filtered ("Deleted breakpoint%s ",
405 !                                    found->next ? "s" : "");
406         while (found)
407         {
408 !         if (from_tty) printf_filtered ("%d ", found->number);
409           b1 = found->next;
410           delete_breakpoint (found);
411           found = b1;
412 ***************
413 *** 2120,2125 ****
414 --- 2131,2138 ----
415     register struct breakpoint *b;
416     register bpstat bs;
417   
418 +   energize_delete_breakpoint(bpt);
419
420     if (bpt->inserted)
421         target_remove_breakpoint(bpt->address, bpt->shadow_contents);
422   
423 ***************
424 *** 2144,2150 ****
425       free ((PTR)bpt->addr_string);
426   
427     if (xgdb_verbose && bpt->type == bp_breakpoint)
428 !     printf ("breakpoint #%d deleted\n", bpt->number);
429   
430     /* Be sure no bpstat's are pointing at it after it's been freed.  */
431     /* FIXME, how can we find all bpstat's?  We just check stop_bpstat for now. */
432 --- 2157,2163 ----
433       free ((PTR)bpt->addr_string);
434   
435     if (xgdb_verbose && bpt->type == bp_breakpoint)
436 !     printf_filtered ("breakpoint #%d deleted\n", bpt->number);
437   
438     /* Be sure no bpstat's are pointing at it after it's been freed.  */
439     /* FIXME, how can we find all bpstat's?  We just check stop_bpstat for now. */
440 ***************
441 *** 2264,2270 ****
442   
443     ALL_BREAKPOINTS_SAFE (b, temp)
444       {
445 !       sprintf (message, message1, b->number); /* Format possible error msg */
446         catch_errors (breakpoint_re_set_one, (char *) b, message);
447       }
448   
449 --- 2277,2283 ----
450   
451     ALL_BREAKPOINTS_SAFE (b, temp)
452       {
453 !       printf_filtered (message, message1, b->number); /* Format possible error msg */
454         catch_errors (breakpoint_re_set_one, (char *) b, message);
455       }
456   
457 ***************
458 *** 2298,2303 ****
459 --- 2311,2317 ----
460       if (b->number == bptnum)
461         {
462         b->ignore_count = count;
463 +       energize_ignore_breakpoint(b);
464         if (!from_tty)
465           return;
466         else if (count == 0)
467 ***************
468 *** 2322,2328 ****
469     struct breakpoint *b;
470   
471     ALL_BREAKPOINTS (b)
472 !     b->ignore_count = 0;
473   }
474   
475   /* Command to set ignore-count of breakpoint N to COUNT.  */
476 --- 2336,2345 ----
477     struct breakpoint *b;
478   
479     ALL_BREAKPOINTS (b)
480 !     {
481 !       b->ignore_count = 0;
482 !       energize_ignore_breakpoint(b);
483 !     }
484   }
485   
486   /* Command to set ignore-count of breakpoint N to COUNT.  */
487 ***************
488 *** 2377,2383 ****
489             function (b);
490             goto win;
491           }
492 !       printf ("No breakpoint number %d.\n", num);
493       win:
494         p = p1;
495       }
496 --- 2394,2400 ----
497             function (b);
498             goto win;
499           }
500 !       printf_filtered ("No breakpoint number %d.\n", num);
501       win:
502         p = p1;
503       }
504 ***************
505 *** 2389,2396 ****
506   {
507     bpt->enable = enabled;
508   
509     if (xgdb_verbose && bpt->type == bp_breakpoint)
510 !     printf ("breakpoint #%d enabled\n", bpt->number);
511   
512     check_duplicates (bpt->address);
513     if (bpt->type == bp_watchpoint)
514 --- 2406,2415 ----
515   {
516     bpt->enable = enabled;
517   
518 +   energize_enable_breakpoint(bpt);
519
520     if (xgdb_verbose && bpt->type == bp_breakpoint)
521 !     printf_filtered ("breakpoint #%d enabled\n", bpt->number);
522   
523     check_duplicates (bpt->address);
524     if (bpt->type == bp_watchpoint)
525 ***************
526 *** 2436,2441 ****
527 --- 2455,2462 ----
528   disable_breakpoint (bpt)
529        struct breakpoint *bpt;
530   {
531 +   energize_disable_breakpoint(bpt);
532
533     bpt->enable = disabled;
534   
535     if (xgdb_verbose && bpt->type == bp_breakpoint)
536 ===================================================================
537 *** 1.18        1992/07/10 17:22:30
538 --- command.c   1992/09/28 21:34:09
539 ***************
540 *** 1093,1098 ****
541 --- 1093,1100 ----
542     else
543       error ("gdb internal error: bad cmd_type in do_setshow_command");
544     (*c->function.sfunc) (NULL, from_tty, c);
545 +   if (energize)
546 +     print_prompt();
547   }
548   
549   /* Show all the settings in a list of show commands.  */
550 ***************
551 *** 1148,1154 ****
552       }
553   
554     if (pid != -1)
555 !     while ((rc = wait (&status)) != pid && rc != -1)
556         ;
557     else
558       error ("Fork failed");
559 --- 1150,1156 ----
560       }
561   
562     if (pid != -1)
563 !     while ((rc = energize_shell_wait (&status)) != pid && rc != -1)
564         ;
565     else
566       error ("Fork failed");
567 ===================================================================
568 *** 1.67        1992/09/21 20:01:00
569 --- configure.in        1992/09/28 21:34:10
570 ***************
571 *** 1,4 ****
572 ! configdirs="doc"
573   srcname="GDB"
574   srctrigger=main.c
575   
576 --- 1,4 ----
577 ! configdirs="energize doc"
578   srcname="GDB"
579   srctrigger=main.c
580   
581 ===================================================================
582 *** 1.48        1992/09/15 08:55:59
583 --- defs.h      1992/09/28 21:34:10
584 ***************
585 *** 811,814 ****
586 --- 811,816 ----
587   #define MAINTENANCE_CMDS 1
588   #endif
589   
590 + #include "energize.h"
591
592   #endif /* !defined (DEFS_H) */
593 ===================================================================
594 *** 2.5 1992/09/03 16:26:03
595 --- demangle.c  1992/09/28 21:34:10
596 ***************
597 *** 37,43 ****
598      the appropriate target configuration file. */
599   
600   #ifndef DEFAULT_DEMANGLING_STYLE
601 ! # define DEFAULT_DEMANGLING_STYLE AUTO_DEMANGLING_STYLE_STRING
602   #endif
603   
604   /* String name for the current demangling style.  Set by the "set demangling"
605 --- 37,43 ----
606      the appropriate target configuration file. */
607   
608   #ifndef DEFAULT_DEMANGLING_STYLE
609 ! # define DEFAULT_DEMANGLING_STYLE LUCID_DEMANGLING_STYLE_STRING
610   #endif
611   
612   /* String name for the current demangling style.  Set by the "set demangling"
613 ===================================================================
614 *** 1.34        1992/09/26 05:20:04
615 --- infcmd.c    1992/09/28 21:34:11
616 ***************
617 *** 242,247 ****
618 --- 242,248 ----
619   
620     target_create_inferior (exec_file, inferior_args,
621                           environ_vector (inferior_environ));
622 +   energize_new_process();
623   }
624   \f
625   static void
626 ===================================================================
627 *** 1.29        1992/09/25 19:19:00
628 --- inflow.c    1992/09/28 21:34:11
629 ***************
630 *** 87,93 ****
631   static short pgrp_inferior;
632   static short pgrp_ours;
633   # else /* not def SHORT_PGRP */
634 ! static int pgrp_inferior;
635   static int pgrp_ours;
636   # endif /* not def SHORT_PGRP */
637   #else /* not def TIOCGPGRP */
638 --- 87,93 ----
639   static short pgrp_inferior;
640   static short pgrp_ours;
641   # else /* not def SHORT_PGRP */
642 ! int pgrp_inferior;
643   static int pgrp_ours;
644   # endif /* not def SHORT_PGRP */
645   #else /* not def TIOCGPGRP */
646 ===================================================================
647 *** 1.59        1992/09/26 01:49:01
648 --- infrun.c    1992/09/28 21:34:12
649 ***************
650 *** 519,525 ****
651         flush_cached_frames ();
652         registers_changed ();
653   
654 !       target_wait (&w);
655   
656   #ifdef SIGTRAP_STOP_AFTER_LOAD
657   
658 --- 519,525 ----
659         flush_cached_frames ();
660         registers_changed ();
661   
662 !       energize_wait (&w);
663   
664   #ifdef SIGTRAP_STOP_AFTER_LOAD
665   
666 ===================================================================
667 *** 1.17        1992/09/26 09:06:10
668 --- inftarg.c   1992/09/28 21:34:12
669 ***************
670 *** 123,128 ****
671 --- 123,129 ----
672   
673     attach (pid);
674     inferior_pid = pid;
675 +   energize_new_process();
676     push_target (&child_ops);
677   #endif  /* ATTACH_DETACH */
678   }
679 ===================================================================
680 *** 1.57        1992/09/29 05:07:14
681 --- main.c      1992/09/28 21:34:13
682 ***************
683 *** 441,446 ****
684 --- 441,447 ----
685     char *corearg = NULL;
686     char *cdarg = NULL;
687     char *ttyarg = NULL;
688 +   char *energize_id = NULL;
689   
690     /* Pointers to all arguments of +command option.  */
691     char **cmdarg;
692 ***************
693 *** 539,544 ****
694 --- 540,546 ----
695         {"tty", required_argument, 0, 't'},
696         {"baud", required_argument, 0, 'b'},
697         {"b", required_argument, 0, 'b'},
698 +       {"context", required_argument, 0, 12},
699   /* Allow machine descriptions to add more options... */
700   #ifdef ADDITIONAL_OPTIONS
701         ADDITIONAL_OPTIONS
702 ***************
703 *** 571,576 ****
704 --- 573,581 ----
705           case 11:
706             cdarg = optarg;
707             break;
708 +         case 12:
709 +           energize_id = optarg;
710 +           break;
711           case 's':
712             symarg = optarg;
713             break;
714 ***************
715 *** 611,617 ****
716           ADDITIONAL_OPTION_CASES
717   #endif
718           case '?':
719 !           fprintf (stderr,
720                      "Use `%s +help' for a complete list of options.\n",
721                      argv[0]);
722             exit (1);
723 --- 616,622 ----
724           ADDITIONAL_OPTION_CASES
725   #endif
726           case '?':
727 !           fprintf_filtered (stderr,
728                      "Use `%s +help' for a complete list of options.\n",
729                      argv[0]);
730             exit (1);
731 ***************
732 *** 668,674 ****
733           corearg = argv[optind];
734           break;
735         case 3:
736 !         fprintf (stderr,
737                    "Excess command line arguments ignored. (%s%s)\n",
738                    argv[optind], (optind == argc - 1) ? "" : " ...");
739           break;
740 --- 673,679 ----
741           corearg = argv[optind];
742           break;
743         case 3:
744 !         fprintf_filtered (stderr,
745                    "Excess command line arguments ignored. (%s%s)\n",
746                    argv[optind], (optind == argc - 1) ? "" : " ...");
747           break;
748 ***************
749 *** 679,684 ****
750 --- 684,692 ----
751   
752     /* Run the init function of each source file */
753   
754 +   /* Must call this first to setup tty */
755 +   energize_initialize (energize_id, execarg);
756
757     initialize_cmd_lists ();    /* This needs to be done first */
758     initialize_all_files ();
759     initialize_main ();         /* But that omits this file!  Do it now */
760 ***************
761 *** 853,859 ****
762         if (!setjmp (to_top_level))
763         {
764           do_cleanups (ALL_CLEANUPS);           /* Do complete cleanup */
765 !         command_loop ();
766             quit_command ((char *)0, instream == stdin);
767         }
768       }
769 --- 861,870 ----
770         if (!setjmp (to_top_level))
771         {
772           do_cleanups (ALL_CLEANUPS);           /* Do complete cleanup */
773 !         if (energize)
774 !           energize_main_loop();
775 !         else
776 !           command_loop ();
777             quit_command ((char *)0, instream == stdin);
778         }
779       }
780 ***************
781 *** 915,921 ****
782         else if (c->function.cfunc == NO_FUNCTION)
783         error ("That is not a command, just a help topic.");
784         else
785 !       (*c->function.cfunc) (arg, from_tty & caution);
786      }
787   
788     /* Tell the user if the language has changed (except first time).  */
789 --- 926,932 ----
790         else if (c->function.cfunc == NO_FUNCTION)
791         error ("That is not a command, just a help topic.");
792         else
793 !       energize_call_command (c, arg, from_tty & caution);
794      }
795   
796     /* Tell the user if the language has changed (except first time).  */
797 ***************
798 *** 1317,1323 ****
799   #else
800     signal (STOP_SIGNAL, stop_sig);
801   #endif
802 !   printf ("%s", prompt);
803     fflush (stdout);
804   
805     /* Forget about any previous command -- null line now will do nothing.  */
806 --- 1328,1334 ----
807   #else
808     signal (STOP_SIGNAL, stop_sig);
809   #endif
810 !   printf_filtered ("%s", prompt);
811     fflush (stdout);
812   
813     /* Forget about any previous command -- null line now will do nothing.  */
814 ***************
815 *** 1463,1469 ****
816         if (expanded)
817         {
818           /* Print the changes.  */
819 !         printf ("%s\n", history_value);
820   
821           /* If there was an error, call this function again.  */
822           if (expanded < 0)
823 --- 1474,1480 ----
824         if (expanded)
825         {
826           /* Print the changes.  */
827 !         printf_filtered ("%s\n", history_value);
828   
829           /* If there was an error, call this function again.  */
830           if (expanded < 0)
831 ***************
832 *** 1570,1576 ****
833     while (1)
834       {
835         dont_repeat ();
836 !       p = command_line_input ((char *) NULL, instream == stdin);
837         if (p == NULL)
838         /* Treat end of file like "end".  */
839         break;
840 --- 1581,1587 ----
841     while (1)
842       {
843         dont_repeat ();
844 !       p = energize_command_line_input ((char *) NULL, instream == stdin);
845         if (p == NULL)
846         /* Treat end of file like "end".  */
847         break;
848 ***************
849 *** 1661,1667 ****
850        char *arg;
851        int from_tty;
852   {
853 !   printf ("\"info\" must be followed by the name of an info command.\n");
854     help_list (infolist, "info ", -1, stdout);
855   }
856   
857 --- 1672,1678 ----
858        char *arg;
859        int from_tty;
860   {
861 !   printf_filtered ("\"info\" must be followed by the name of an info command.\n");
862     help_list (infolist, "info ", -1, stdout);
863   }
864   
865 ***************
866 *** 1777,1783 ****
867   
868     if (from_tty)
869       {
870 !       printf ("Type commands for definition of \"%s\".\n\
871   End with a line saying just \"end\".\n", comname);
872         fflush (stdout);
873       }
874 --- 1788,1794 ----
875   
876     if (from_tty)
877       {
878 !       printf_filtered ("Type commands for definition of \"%s\".\n\
879   End with a line saying just \"end\".\n", comname);
880         fflush (stdout);
881       }
882 ***************
883 *** 1810,1816 ****
884       error ("Command \"%s\" is built-in.", comname);
885   
886     if (from_tty)
887 !     printf ("Type documentation for \"%s\".\n\
888   End with a line saying just \"end\".\n", comname);
889   
890     doclines = read_command_lines ();
891 --- 1821,1827 ----
892       error ("Command \"%s\" is built-in.", comname);
893   
894     if (from_tty)
895 !     printf_filtered ("Type documentation for \"%s\".\n\
896   End with a line saying just \"end\".\n", comname);
897   
898     doclines = read_command_lines ();
899 ***************
900 *** 1841,1847 ****
901   static void
902   print_gnu_advertisement()
903   {
904 !     printf ("\
905   GDB is free software and you are welcome to distribute copies of it\n\
906    under certain conditions; type \"show copying\" to see the conditions.\n\
907   There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
908 --- 1852,1858 ----
909   static void
910   print_gnu_advertisement()
911   {
912 !     printf_filtered ("\
913   GDB is free software and you are welcome to distribute copies of it\n\
914    under certain conditions; type \"show copying\" to see the conditions.\n\
915   There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
916 ***************
917 *** 1874,1880 ****
918   void
919   print_prompt ()
920   {
921 !   printf ("%s", prompt);
922     fflush (stdout);
923   }
924   \f
925 --- 1885,1891 ----
926   void
927   print_prompt ()
928   {
929 !   printf_filtered ("%s", prompt);
930     fflush (stdout);
931   }
932   \f
933 ***************
934 *** 1920,1929 ****
935     getcwd (dirbuf, sizeof (dirbuf));
936   
937     if (strcmp (dirbuf, current_directory))
938 !     printf ("Working directory %s\n (canonically %s).\n",
939             current_directory, dirbuf);
940     else
941 !     printf ("Working directory %s.\n", current_directory);
942   }
943   
944   static void
945 --- 1931,1940 ----
946     getcwd (dirbuf, sizeof (dirbuf));
947   
948     if (strcmp (dirbuf, current_directory))
949 !     printf_filtered ("Working directory %s\n (canonically %s).\n",
950             current_directory, dirbuf);
951     else
952 !     printf_filtered ("Working directory %s.\n", current_directory);
953   }
954   
955   static void
956 ***************
957 *** 2160,2166 ****
958        char *args;
959        int from_tty;
960   {
961 !   printf ("\"set history\" must be followed by the name of a history subcommand.\n");
962     help_list (sethistlist, "set history ", -1, stdout);
963   }
964   
965 --- 2171,2177 ----
966        char *args;
967        int from_tty;
968   {
969 !   printf_filtered ("\"set history\" must be followed by the name of a history subcommand.\n");
970     help_list (sethistlist, "set history ", -1, stdout);
971   }
972   
973 ===================================================================
974 *** 1.33        1992/09/29 05:07:19
975 --- printcmd.c  1992/09/28 21:34:13
976 ***************
977 *** 778,792 ****
978       {
979         int histindex = record_latest_value (val);
980   
981         if (inspect)
982 !       printf ("\031(gdb-makebuffer \"%s\"  %d '(\"", exp, histindex);
983         else
984         if (histindex >= 0) printf_filtered ("$%d = ", histindex);
985   
986         print_formatted (val, format, fmt.size);
987         printf_filtered ("\n");
988         if (inspect)
989 !       printf("\") )\030");
990       }
991   
992     if (cleanup)
993 --- 778,802 ----
994       {
995         int histindex = record_latest_value (val);
996   
997 +       if (energize)
998 +       {
999 +         char buf[20];
1000
1001 +         sprintf(buf, "$%d", histindex);
1002 +         energize_start_variable_annotation(buf, NULL, VALUE_TYPE(val),
1003 +                                            VALUE_ADDRESS(val), "");
1004 +       }
1005
1006         if (inspect)
1007 !       printf_filtered ("\031(gdb-makebuffer \"%s\"  %d '(\"", exp, histindex);
1008         else
1009         if (histindex >= 0) printf_filtered ("$%d = ", histindex);
1010   
1011         print_formatted (val, format, fmt.size);
1012 +       energize_end_variable_annotation();
1013         printf_filtered ("\n");
1014         if (inspect)
1015 !       printf_filtered("\") )\030");
1016       }
1017   
1018     if (cleanup)
1019 ***************
1020 *** 890,896 ****
1021       {
1022         if (is_a_field_of_this)
1023         {
1024 !         printf ("Symbol \"%s\" is a field of the local class variable `this'\n", exp);
1025           return;
1026         }
1027   
1028 --- 900,906 ----
1029       {
1030         if (is_a_field_of_this)
1031         {
1032 !         printf_filtered ("Symbol \"%s\" is a field of the local class variable `this'\n", exp);
1033           return;
1034         }
1035   
1036 ***************
1037 *** 897,903 ****
1038         msymbol = lookup_minimal_symbol (exp, (struct objfile *) NULL);
1039   
1040         if (msymbol != NULL)
1041 !       printf ("Symbol \"%s\" is at %s in a file compiled without debugging.\n",
1042                 exp, local_hex_string(msymbol -> address));
1043         else
1044         error ("No symbol \"%s\" in current context.", exp);
1045 --- 907,913 ----
1046         msymbol = lookup_minimal_symbol (exp, (struct objfile *) NULL);
1047   
1048         if (msymbol != NULL)
1049 !       printf_filtered ("Symbol \"%s\" is at %s in a file compiled without debugging.\n",
1050                 exp, local_hex_string(msymbol -> address));
1051         else
1052         error ("No symbol \"%s\" in current context.", exp);
1053 ***************
1054 *** 904,910 ****
1055         return;
1056       }
1057   
1058 !   printf ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
1059     val = SYMBOL_VALUE (sym);
1060     basereg = SYMBOL_BASEREG (sym);
1061   
1062 --- 914,920 ----
1063         return;
1064       }
1065   
1066 !   printf_filtered ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
1067     val = SYMBOL_VALUE (sym);
1068     basereg = SYMBOL_BASEREG (sym);
1069   
1070 ***************
1071 *** 912,945 ****
1072       {
1073       case LOC_CONST:
1074       case LOC_CONST_BYTES:
1075 !       printf ("constant");
1076         break;
1077   
1078       case LOC_LABEL:
1079 !       printf ("a label at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1080         break;
1081   
1082       case LOC_REGISTER:
1083 !       printf ("a variable in register %s", reg_names[val]);
1084         break;
1085   
1086       case LOC_STATIC:
1087 !       printf ("static storage at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1088         break;
1089   
1090       case LOC_REGPARM:
1091 !       printf ("an argument in register %s", reg_names[val]);
1092         break;
1093         
1094       case LOC_ARG:
1095         if (SYMBOL_BASEREG_VALID (sym))
1096         {
1097 !         printf ("an argument at offset %ld from register %s",
1098                   val, reg_names[basereg]);
1099         }
1100         else
1101         {
1102 !         printf ("an argument at offset %ld", val);
1103         }
1104         break;
1105   
1106 --- 922,955 ----
1107       {
1108       case LOC_CONST:
1109       case LOC_CONST_BYTES:
1110 !       printf_filtered ("constant");
1111         break;
1112   
1113       case LOC_LABEL:
1114 !       printf_filtered ("a label at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1115         break;
1116   
1117       case LOC_REGISTER:
1118 !       printf_filtered ("a variable in register %s", reg_names[val]);
1119         break;
1120   
1121       case LOC_STATIC:
1122 !       printf_filtered ("static storage at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1123         break;
1124   
1125       case LOC_REGPARM:
1126 !       printf_filtered ("an argument in register %s", reg_names[val]);
1127         break;
1128         
1129       case LOC_ARG:
1130         if (SYMBOL_BASEREG_VALID (sym))
1131         {
1132 !         printf_filtered ("an argument at offset %ld from register %s",
1133                   val, reg_names[basereg]);
1134         }
1135         else
1136         {
1137 !         printf_filtered ("an argument at offset %ld", val);
1138         }
1139         break;
1140   
1141 ***************
1142 *** 946,957 ****
1143       case LOC_LOCAL_ARG:
1144         if (SYMBOL_BASEREG_VALID (sym))
1145         {
1146 !         printf ("an argument at offset %ld from register %s",
1147                   val, reg_names[basereg]);
1148         }
1149         else
1150         {
1151 !         printf ("an argument at frame offset %ld", val);
1152         }
1153         break;
1154   
1155 --- 956,967 ----
1156       case LOC_LOCAL_ARG:
1157         if (SYMBOL_BASEREG_VALID (sym))
1158         {
1159 !         printf_filtered ("an argument at offset %ld from register %s",
1160                   val, reg_names[basereg]);
1161         }
1162         else
1163         {
1164 !         printf_filtered ("an argument at frame offset %ld", val);
1165         }
1166         break;
1167   
1168 ***************
1169 *** 958,990 ****
1170       case LOC_LOCAL:
1171         if (SYMBOL_BASEREG_VALID (sym))
1172         {
1173 !         printf ("a local variable at offset %ld from register %s",
1174                   val, reg_names[basereg]);
1175         }
1176         else
1177         {
1178 !         printf ("a local variable at frame offset %ld", val);
1179         }
1180         break;
1181   
1182       case LOC_REF_ARG:
1183 !       printf ("a reference argument at offset %ld", val);
1184         break;
1185   
1186       case LOC_TYPEDEF:
1187 !       printf ("a typedef");
1188         break;
1189   
1190       case LOC_BLOCK:
1191 !       printf ("a function at address %s",
1192               local_hex_string(BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
1193         break;
1194   
1195       default:
1196 !       printf ("of unknown (botched) type");
1197         break;
1198       }
1199 !   printf (".\n");
1200   }
1201   \f
1202   static void
1203 --- 968,1000 ----
1204       case LOC_LOCAL:
1205         if (SYMBOL_BASEREG_VALID (sym))
1206         {
1207 !         printf_filtered ("a local variable at offset %ld from register %s",
1208                   val, reg_names[basereg]);
1209         }
1210         else
1211         {
1212 !         printf_filtered ("a local variable at frame offset %ld", val);
1213         }
1214         break;
1215   
1216       case LOC_REF_ARG:
1217 !       printf_filtered ("a reference argument at offset %ld", val);
1218         break;
1219   
1220       case LOC_TYPEDEF:
1221 !       printf_filtered ("a typedef");
1222         break;
1223   
1224       case LOC_BLOCK:
1225 !       printf_filtered ("a function at address %s",
1226               local_hex_string(BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
1227         break;
1228   
1229       default:
1230 !       printf_filtered ("of unknown (botched) type");
1231         break;
1232       }
1233 !   printf_filtered (".\n");
1234   }
1235   \f
1236   static void
1237 ***************
1238 *** 1419,1425 ****
1239         d->status = disabled;
1240         return;
1241         }
1242 !   printf ("No display number %d.\n", num);
1243   }
1244     
1245   void
1246 --- 1429,1435 ----
1247         d->status = disabled;
1248         return;
1249         }
1250 !   printf_filtered ("No display number %d.\n", num);
1251   }
1252     
1253   void
1254 ***************
1255 *** 1428,1434 ****
1256     if (current_display_number >= 0)
1257       {
1258         disable_display (current_display_number);
1259 !       fprintf (stderr, "Disabling display %d to avoid infinite recursion.\n",
1260                current_display_number);
1261       }
1262     current_display_number = -1;
1263 --- 1438,1444 ----
1264     if (current_display_number >= 0)
1265       {
1266         disable_display (current_display_number);
1267 !       fprintf_filtered (stderr, "Disabling display %d to avoid infinite recursion.\n",
1268                current_display_number);
1269       }
1270     current_display_number = -1;
1271 ***************
1272 *** 1442,1448 ****
1273     register struct display *d;
1274   
1275     if (!display_chain)
1276 !     printf ("There are no auto-display expressions now.\n");
1277     else
1278         printf_filtered ("Auto-display expressions now in effect:\n\
1279   Num Enb Expression\n");
1280 --- 1452,1458 ----
1281     register struct display *d;
1282   
1283     if (!display_chain)
1284 !     printf_filtered ("There are no auto-display expressions now.\n");
1285     else
1286         printf_filtered ("Auto-display expressions now in effect:\n\
1287   Num Enb Expression\n");
1288 ***************
1289 *** 1495,1501 ****
1290               d->status = enabled;
1291               goto win;
1292             }
1293 !       printf ("No display number %d.\n", num);
1294         win:
1295         p = p1;
1296         while (*p == ' ' || *p == '\t')
1297 --- 1505,1511 ----
1298               d->status = enabled;
1299               goto win;
1300             }
1301 !       printf_filtered ("No display number %d.\n", num);
1302         win:
1303         p = p1;
1304         while (*p == ' ' || *p == '\t')
1305 ***************
1306 *** 1652,1662 ****
1307 --- 1662,1680 ----
1308          standard indentation here is 4 spaces, and val_print indents
1309          2 for each recurse.  */
1310         val = read_var_value (sym, FRAME_INFO_ID (fi));
1311
1312 +       energize_start_variable_annotation(SYMBOL_NAME(sym), sym,
1313 +                                        VALUE_TYPE(val),
1314 +                                        VALUE_ADDRESS(val), "");
1315
1316         if (val)
1317           val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val),
1318                    stream, 0, 0, 2, Val_no_prettyprint);
1319         else
1320         fputs_filtered ("???", stream);
1321
1322 +       energize_end_variable_annotation();
1323
1324         first = 0;
1325       }
1326   
1327 ===================================================================
1328 *** 1.35        1992/09/18 09:20:00
1329 --- stack.c     1992/09/28 21:34:14
1330 ***************
1331 *** 159,165 ****
1332         if (addressprint)
1333           printf_filtered ("%s in ", local_hex_string(fi->pc));
1334   
1335 !       fputs_demangled (fname, stdout, 0);
1336         fputs_filtered (" (...)\n", stdout);
1337         
1338         return;
1339 --- 159,168 ----
1340         if (addressprint)
1341           printf_filtered ("%s in ", local_hex_string(fi->pc));
1342   
1343 !       if (energize)
1344 !       energize_annotate_function(fname, 0, level);
1345 !       else
1346 !       fputs_demangled (fname, stdout, 0);
1347         fputs_filtered (" (...)\n", stdout);
1348         
1349         return;
1350 ***************
1351 *** 218,224 ****
1352         if (addressprint)
1353         if (fi->pc != sal.pc || !sal.symtab)
1354           printf_filtered ("%s in ", local_hex_string(fi->pc));
1355 !       fputs_demangled (funname ? funname : "??", stdout, 0);
1356         wrap_here ("   ");
1357         fputs_filtered (" (", stdout);
1358         if (args)
1359 --- 221,230 ----
1360         if (addressprint)
1361         if (fi->pc != sal.pc || !sal.symtab)
1362           printf_filtered ("%s in ", local_hex_string(fi->pc));
1363 !       if (energize)
1364 !       energize_annotate_function(funname ? funname : "??", 0, level);
1365 !       else
1366 !       fputs_demangled (funname ? funname : "??", stdout, 0);
1367         wrap_here ("   ");
1368         fputs_filtered (" (", stdout);
1369         if (args)
1370 ***************
1371 *** 255,261 ****
1372         {
1373           if (addressprint && mid_statement)
1374             printf_filtered ("%s\t", local_hex_string(fi->pc));
1375 !         print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
1376         }
1377         current_source_line = max (sal.line - lines_to_list/2, 1);
1378       }
1379 --- 261,268 ----
1380         {
1381           if (addressprint && mid_statement)
1382             printf_filtered ("%s\t", local_hex_string(fi->pc));
1383 !         if (!energize)
1384 !           print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
1385         }
1386         current_source_line = max (sal.line - lines_to_list/2, 1);
1387       }
1388 ***************
1389 *** 429,435 ****
1390     if (funname)
1391       {
1392         printf_filtered (" in ");
1393 !       fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
1394       }
1395     wrap_here ("   ");
1396     if (sal.symtab)
1397 --- 436,446 ----
1398     if (funname)
1399       {
1400         printf_filtered (" in ");
1401 !       if (energize)
1402 !       energize_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS,
1403 !                                  selected_frame_level);
1404 !       else
1405 !       fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
1406       }
1407     wrap_here ("   ");
1408     if (sal.symtab)
1409 ===================================================================
1410 *** 1.59        1992/09/29 05:07:26
1411 --- symfile.c   1992/09/28 21:34:14
1412 ***************
1413 *** 614,619 ****
1414 --- 614,621 ----
1415         fflush (stdout);
1416       }
1417   
1418 +   energize_symbol_file(objfile);
1419
1420     return (objfile);
1421   }
1422   
1423 ***************
1424 *** 646,652 ****
1425         current_source_line = 0;
1426         if (from_tty)
1427         {
1428 !         printf ("No symbol file now.\n");
1429         }
1430       }
1431     else
1432 --- 648,654 ----
1433         current_source_line = 0;
1434         if (from_tty)
1435         {
1436 !         printf_filtered ("No symbol file now.\n");
1437         }
1438       }
1439     else
1440 ***************
1441 *** 1164,1170 ****
1442       return;
1443     clear_symtab_users_done = clear_symtab_users_queued;
1444   
1445 !   printf ("Resetting debugger state after updating old symbol tables\n");
1446   
1447     /* Someday, we should do better than this, by only blowing away
1448        the things that really need to be blown.  */
1449 --- 1166,1172 ----
1450       return;
1451     clear_symtab_users_done = clear_symtab_users_queued;
1452   
1453 !   printf_filtered ("Resetting debugger state after updating old symbol tables\n");
1454   
1455     /* Someday, we should do better than this, by only blowing away
1456        the things that really need to be blown.  */
1457 ===================================================================
1458 *** 1.63        1992/09/26 05:34:06
1459 --- utils.c     1992/09/28 21:34:15
1460 ***************
1461 *** 700,720 ****
1462         fflush (stdout);
1463         va_start (args);
1464         ctlstr = va_arg (args, char *);
1465         vfprintf_filtered (stdout, ctlstr, args);
1466 -       va_end (args);
1467         printf_filtered ("(y or n) ");
1468 !       fflush (stdout);
1469 !       answer = fgetc (stdin);
1470 !       clearerr (stdin);               /* in case of C-d */
1471 !       if (answer == EOF)      /* C-d */
1472 !         return 1;
1473 !       if (answer != '\n')     /* Eat rest of input line, to EOF or newline */
1474 !       do 
1475 !         {
1476 !           ans2 = fgetc (stdin);
1477 !           clearerr (stdin);
1478 !         }
1479 !         while (ans2 != EOF && ans2 != '\n');
1480         if (answer >= 'a')
1481         answer -= 040;
1482         if (answer == 'Y')
1483 --- 700,731 ----
1484         fflush (stdout);
1485         va_start (args);
1486         ctlstr = va_arg (args, char *);
1487 +       energize_query (ctlstr, args);
1488         vfprintf_filtered (stdout, ctlstr, args);
1489         printf_filtered ("(y or n) ");
1490 !       if (energize)
1491 !       {
1492 !         char *buf;
1493
1494 !         buf = energize_command_line_input(0, 0);
1495 !         answer = buf ? *buf : 'Y';
1496 !         energize_acknowledge_query(buf);
1497 !       }
1498 !       else
1499 !       {
1500 !         fflush (stdout);
1501 !         answer = fgetc (stdin);
1502 !         clearerr (stdin);             /* in case of C-d */
1503 !         if (answer == EOF)    /* C-d */
1504 !           return 1;
1505 !         if (answer != '\n')   /* Eat rest of input line, to EOF or newline */
1506 !           do 
1507 !             {
1508 !               ans2 = fgetc (stdin);
1509 !               clearerr (stdin);
1510 !             }
1511 !         while (ans2 != EOF && ans2 != '\n');
1512 !       }
1513         if (answer >= 'a')
1514         answer -= 040;
1515         if (answer == 'Y')
1516 ***************
1517 *** 722,727 ****
1518 --- 733,739 ----
1519         if (answer == 'N')
1520         return 0;
1521         printf_filtered ("Please answer y or n.\n");
1522 +       va_end (args);
1523       }
1524   }
1525   
1526 ***************
1527 *** 1000,1005 ****
1528 --- 1012,1023 ----
1529     if (linebuffer == 0)
1530       return;
1531     
1532 +   if (energize)
1533 +     {
1534 +       energize_fputs(linebuffer);
1535 +       return;
1536 +     }
1537
1538     /* Don't do any filtering if it is disabled.  */
1539     if (stream != stdout
1540      || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX))
1541 ===================================================================
1542 *** 1.55        1992/09/29 05:07:34
1543 --- valprint.c  1992/09/28 21:34:15
1544 ***************
1545 *** 384,390 ****
1546                              VALUE_CONTENTS (val) + typelen * i,
1547                              VALUE_ADDRESS (val) + typelen * i,
1548                              stream, format, 1, 0, pretty);
1549 !                 fprintf (stream, " <repeats %u times>", reps);
1550                   i = rep1 - 1;
1551                   things_printed += REPEAT_COUNT_THRESHOLD;
1552                 }
1553 --- 384,390 ----
1554                              VALUE_CONTENTS (val) + typelen * i,
1555                              VALUE_ADDRESS (val) + typelen * i,
1556                              stream, format, 1, 0, pretty);
1557 !                 fprintf_filtered (stream, " <repeats %u times>", reps);
1558                   i = rep1 - 1;
1559                   things_printed += REPEAT_COUNT_THRESHOLD;
1560                 }
1561 ***************
1562 *** 488,493 ****
1563 --- 488,494 ----
1564        struct type **dont_print;
1565   {
1566     int i, len, n_baseclasses;
1567 +   char expr_tag[100];         /* Energize */
1568   
1569     check_stub_type (type);
1570   
1571 ***************
1572 *** 552,557 ****
1573 --- 553,565 ----
1574               fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
1575               fputs_filtered (" = ", stream);
1576             }
1577
1578 +         sprintf(expr_tag, ".%s", TYPE_FIELD_NAME(type, i));
1579
1580 +         energize_start_variable_annotation(expr_tag, NULL,
1581 +                                            TYPE_FIELD_TYPE(type, i),
1582 +                                            (CORE_ADDR) (valaddr + TYPE_FIELD_BITPOS(type, i) / 8),
1583 +                                            "");
1584           if (TYPE_FIELD_PACKED (type, i))
1585             {
1586               value v;
1587 ***************
1588 *** 570,575 ****
1589 --- 578,584 ----
1590                          valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
1591                          0, stream, format, 0, recurse + 1, pretty);
1592             }
1593 +         energize_end_variable_annotation();
1594         }
1595         if (pretty)
1596         {
1597 ***************
1598 *** 804,809 ****
1599 --- 813,819 ----
1600                   unsigned int rep1;
1601                   /* Number of repetitions we have detected so far.  */
1602                   unsigned int reps;
1603 +                 char expr_tag[100]; /* Energize */
1604                   
1605                   if (i != 0)
1606                     if (arrayprint)
1607 ***************
1608 *** 825,830 ****
1609 --- 835,845 ----
1610                       ++rep1;
1611                     }
1612   
1613 +                 sprintf(expr_tag, "[%d]", i);
1614 +                 energize_start_variable_annotation(expr_tag, NULL,
1615 +                                                    elttype,
1616 +                                                    (CORE_ADDR) (valaddr + i * eltlen),
1617 +                                                    "");
1618                   if (reps > REPEAT_COUNT_THRESHOLD)
1619                     {
1620                       val_print (elttype, valaddr + i * eltlen,
1621 ***************
1622 Sun Oct 24 23:48:55 1993*** 841,846 ****
1623 --- 856,862 ----
1624                                  recurse + 1, pretty);
1625                       things_printed++;
1626                     }
1627 +                 energize_end_variable_annotation();
1628                 }
1629               if (i < len)
1630                 fprintf_filtered (stream, "...");
1631 ***************
1632 *** 910,916 ****
1633             {
1634               fprintf_filtered (stream, "&");
1635               type_print_varspec_prefix (TYPE_FN_FIELD_TYPE (f, j), stream, 0, 0);
1636 !             fprintf (stream, kind);
1637               if (TYPE_FN_FIELD_PHYSNAME (f, j)[0] == '_'
1638                   && TYPE_FN_FIELD_PHYSNAME (f, j)[1] == CPLUS_MARKER)
1639                 type_print_method_args
1640 --- 926,932 ----
1641             {
1642               fprintf_filtered (stream, "&");
1643               type_print_varspec_prefix (TYPE_FN_FIELD_TYPE (f, j), stream, 0, 0);
1644 !             fprintf_filtered (stream, kind);
1645               if (TYPE_FN_FIELD_PHYSNAME (f, j)[0] == '_'
1646                   && TYPE_FN_FIELD_PHYSNAME (f, j)[1] == CPLUS_MARKER)
1647                 type_print_method_args
1648 ***************
1649 *** 1528,1534 ****
1650   
1651       case TYPE_CODE_METHOD:
1652         if (passed_a_ptr)
1653 !       fprintf (stream, "(");
1654         type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0,
1655                                  0);
1656         if (passed_a_ptr)
1657 --- 1544,1550 ----
1658   
1659       case TYPE_CODE_METHOD:
1660         if (passed_a_ptr)
1661 !       fprintf_filtered (stream, "(");
1662         type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0,
1663                                  0);
1664         if (passed_a_ptr)
1665 ***************
1666 *** 1907,1913 ****
1667                   if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0)
1668                     {
1669                       /* Keep GDB from crashing here.  */
1670 !                     fprintf (stream, "<undefined type> %s;\n",
1671                                TYPE_FN_FIELD_PHYSNAME (f, j));
1672                       break;
1673                     }
1674 --- 1923,1929 ----
1675                   if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0)
1676                     {
1677                       /* Keep GDB from crashing here.  */
1678 !                     fprintf_filtered (stream, "<undefined type> %s;\n",
1679                                TYPE_FN_FIELD_PHYSNAME (f, j));
1680                       break;
1681                     }
1682 ***************
1683 *** 2098,2104 ****
1684        char *arg;
1685        int from_tty;
1686   {
1687 !   printf (
1688   "\"set print\" must be followed by the name of a print subcommand.\n");
1689     help_list (setprintlist, "set print ", -1, stdout);
1690   }
1691 --- 2114,2120 ----
1692        char *arg;
1693        int from_tty;
1694   {
1695 !   printf_filtered (
1696   "\"set print\" must be followed by the name of a print subcommand.\n");
1697     help_list (setprintlist, "set print ", -1, stdout);
1698   }
1699 ===================================================================
1700 *** 1.5 1992/09/26 08:07:45
1701 --- amix.mh     1992/09/28 21:34:15
1702 ***************
1703 *** 22,24 ****
1704 --- 22,38 ----
1705   
1706   # SVR4 puts the BSD compatible install in /usr/ucb.
1707   INSTALL = /usr/ucb/install -c
1708
1709 + # These are the libs that are needed for the Energize version of gdb on
1710 + # SVR4.  Note that we MUST include the standard C library before libucb.a,
1711 + # otherwise we get lots of broken stuff we don't want.
1712 + ENERGIZE_LIB = energize/libconn.a
1713 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1714 +       -lsocket -lc /usr/ucblib/libucb.a -lnsl
1715
1716 + # These are the libs that are needed for the Energize version of gdb on
1717 + # SVR4.  Note that we MUST include the standard C library before libucb.a,
1718 + # otherwise we get lots of broken stuff we don't want.
1719 + ENERGIZE_LIB = energize/libconn.a
1720 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1721 +       -lsocket -lc /usr/ucblib/libucb.a -lnsl
1722 ===================================================================
1723 *** 1.5 1992/09/26 08:08:14
1724 --- ncr3000.mh  1992/09/28 21:34:16
1725 ***************
1726 *** 38,40 ****
1727 --- 38,59 ----
1728   # The /usr/ucb/install program is incompatible (complains about unknown
1729   # group staff).  Use good old cp...
1730   INSTALL = cp
1731
1732 + # These are the libs that are needed for the Energize version of gdb on
1733 + # SVR4.  Note that we MUST include the standard C library before libucb.a,
1734 + # otherwise we get lots of broken stuff we don't want.
1735 + XM_CLIBS = -L/usr/lib -lm -lnet -lresolv -lform -lsocket -lnsl -lc
1736
1737 + # These are the libs that are needed for the Energize version of gdb on
1738 + # SVR4.  Note that we MUST include the standard C library before libucb.a,
1739 + # otherwise we get lots of broken stuff we don't want.
1740 + ENERGIZE_LIB = energize/libconn.a
1741 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1742 +       -lsocket -lc /usr/ucblib/libucb.a -lnsl
1743
1744 + # These are the libs that are needed for the Energize version of gdb on
1745 + # SVR4.  Note that we MUST include the standard C library before libucb.a,
1746 + # otherwise we get lots of broken stuff we don't want.
1747 + ENERGIZE_LIB = energize/libconn.a
1748 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1749 +       -lsocket -lc /usr/ucblib/libucb.a -lnsl
This page took 0.119991 seconds and 4 git commands to generate.