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