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