Use new interfaces to native/target stuff.
[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 *** 2.72 1992/09/27 06:48:41
7 --- .Sanitize 1992/09/28 16:15:04
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 17:46:22
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 ieee-float.c 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 ieee-float.c 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 ieee-float.o 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 ieee-float.o 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.47 1992/09/19 11:47:08
138 --- breakpoint.c 1992/09/28 16:15:05
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 *** 923,928 ****
171 --- 926,932 ----
172 {
173 b->ignore_count--;
174 this_bp_stop = 0;
175 + energize_ignore_breakpoint(b);
176 }
177 else
178 {
179 ***************
180 *** 1375,1380 ****
181 --- 1379,1386 ----
182 mention (b)
183 struct breakpoint *b;
184 {
185 + energize_create_breakpoint(b);
186 +
187 switch (b->type)
188 {
189 case bp_watchpoint:
190 ***************
191 *** 2125,2130 ****
192 --- 2131,2138 ----
193 register struct breakpoint *b;
194 register bpstat bs;
195
196 + energize_delete_breakpoint(bpt);
197 +
198 if (bpt->inserted)
199 target_remove_breakpoint(bpt->address, bpt->shadow_contents);
200
201 ***************
202 *** 2303,2308 ****
203 --- 2311,2317 ----
204 if (b->number == bptnum)
205 {
206 b->ignore_count = count;
207 + energize_ignore_breakpoint(b);
208 if (!from_tty)
209 return;
210 else if (count == 0)
211 ***************
212 *** 2327,2333 ****
213 struct breakpoint *b;
214
215 ALL_BREAKPOINTS (b)
216 ! b->ignore_count = 0;
217 }
218
219 /* Command to set ignore-count of breakpoint N to COUNT. */
220 --- 2336,2345 ----
221 struct breakpoint *b;
222
223 ALL_BREAKPOINTS (b)
224 ! {
225 ! b->ignore_count = 0;
226 ! energize_ignore_breakpoint(b);
227 ! }
228 }
229
230 /* Command to set ignore-count of breakpoint N to COUNT. */
231 ***************
232 *** 2394,2399 ****
233 --- 2406,2413 ----
234 {
235 bpt->enable = enabled;
236
237 + energize_enable_breakpoint(bpt);
238 +
239 if (xgdb_verbose && bpt->type == bp_breakpoint)
240 printf_filtered ("breakpoint #%d enabled\n", bpt->number);
241
242 ***************
243 *** 2441,2446 ****
244 --- 2455,2462 ----
245 disable_breakpoint (bpt)
246 struct breakpoint *bpt;
247 {
248 + energize_disable_breakpoint(bpt);
249 +
250 bpt->enable = disabled;
251
252 if (xgdb_verbose && bpt->type == bp_breakpoint)
253 ===================================================================
254 *** 1.18 1992/07/10 17:22:30
255 --- command.c 1992/09/28 16:15:06
256 ***************
257 *** 1093,1098 ****
258 --- 1093,1100 ----
259 else
260 error ("gdb internal error: bad cmd_type in do_setshow_command");
261 (*c->function.sfunc) (NULL, from_tty, c);
262 + if (energize)
263 + print_prompt();
264 }
265
266 /* Show all the settings in a list of show commands. */
267 ***************
268 *** 1148,1154 ****
269 }
270
271 if (pid != -1)
272 ! while ((rc = wait (&status)) != pid && rc != -1)
273 ;
274 else
275 error ("Fork failed");
276 --- 1150,1156 ----
277 }
278
279 if (pid != -1)
280 ! while ((rc = energize_shell_wait (&status)) != pid && rc != -1)
281 ;
282 else
283 error ("Fork failed");
284 ===================================================================
285 *** 1.67 1992/09/21 20:01:00
286 --- configure.in 1992/09/28 16:15:06
287 ***************
288 *** 1,4 ****
289 ! configdirs="doc"
290 srcname="GDB"
291 srctrigger=main.c
292
293 --- 1,4 ----
294 ! configdirs="energize doc"
295 srcname="GDB"
296 srctrigger=main.c
297
298 ===================================================================
299 *** 1.48 1992/09/15 08:55:59
300 --- defs.h 1992/09/28 16:15:07
301 ***************
302 *** 811,814 ****
303 --- 811,816 ----
304 #define MAINTENANCE_CMDS 1
305 #endif
306
307 + #include "energize.h"
308 +
309 #endif /* !defined (DEFS_H) */
310 ===================================================================
311 *** 2.5 1992/09/03 16:26:03
312 --- demangle.c 1992/09/28 16:15:07
313 ***************
314 *** 37,43 ****
315 the appropriate target configuration file. */
316
317 #ifndef DEFAULT_DEMANGLING_STYLE
318 ! # define DEFAULT_DEMANGLING_STYLE AUTO_DEMANGLING_STYLE_STRING
319 #endif
320
321 /* String name for the current demangling style. Set by the "set demangling"
322 --- 37,43 ----
323 the appropriate target configuration file. */
324
325 #ifndef DEFAULT_DEMANGLING_STYLE
326 ! # define DEFAULT_DEMANGLING_STYLE LUCID_DEMANGLING_STYLE_STRING
327 #endif
328
329 /* String name for the current demangling style. Set by the "set demangling"
330 ===================================================================
331 *** 1.34 1992/09/26 05:20:04
332 --- infcmd.c 1992/09/28 16:53:10
333 ***************
334 *** 242,247 ****
335 --- 242,248 ----
336
337 target_create_inferior (exec_file, inferior_args,
338 environ_vector (inferior_environ));
339 + energize_new_process();
340 }
341 \f
342 static void
343 ===================================================================
344 *** 1.29 1992/09/25 19:19:00
345 --- inflow.c 1992/09/28 16:15:07
346 ***************
347 *** 87,93 ****
348 static short pgrp_inferior;
349 static short pgrp_ours;
350 # else /* not def SHORT_PGRP */
351 ! static int pgrp_inferior;
352 static int pgrp_ours;
353 # endif /* not def SHORT_PGRP */
354 #else /* not def TIOCGPGRP */
355 --- 87,93 ----
356 static short pgrp_inferior;
357 static short pgrp_ours;
358 # else /* not def SHORT_PGRP */
359 ! int pgrp_inferior;
360 static int pgrp_ours;
361 # endif /* not def SHORT_PGRP */
362 #else /* not def TIOCGPGRP */
363 ===================================================================
364 *** 1.59 1992/09/26 01:49:01
365 --- infrun.c 1992/09/28 16:22:33
366 ***************
367 *** 519,525 ****
368 flush_cached_frames ();
369 registers_changed ();
370
371 ! target_wait (&w);
372
373 #ifdef SIGTRAP_STOP_AFTER_LOAD
374
375 --- 519,525 ----
376 flush_cached_frames ();
377 registers_changed ();
378
379 ! energize_wait (&w);
380
381 #ifdef SIGTRAP_STOP_AFTER_LOAD
382
383 ===================================================================
384 *** 1.17 1992/09/26 09:06:10
385 --- inftarg.c 1992/09/28 16:43:53
386 ***************
387 *** 123,128 ****
388 --- 123,129 ----
389
390 attach (pid);
391 inferior_pid = pid;
392 + energize_new_process();
393 push_target (&child_ops);
394 #endif /* ATTACH_DETACH */
395 }
396 ===================================================================
397 *** 1.56 1992/09/22 05:23:29
398 --- main.c 1992/09/28 16:15:08
399 ***************
400 *** 441,446 ****
401 --- 441,447 ----
402 char *corearg = NULL;
403 char *cdarg = NULL;
404 char *ttyarg = NULL;
405 + char *energize_id = NULL;
406
407 /* Pointers to all arguments of +command option. */
408 char **cmdarg;
409 ***************
410 *** 539,544 ****
411 --- 540,546 ----
412 {"tty", required_argument, 0, 't'},
413 {"baud", required_argument, 0, 'b'},
414 {"b", required_argument, 0, 'b'},
415 + {"context", required_argument, 0, 12},
416 /* Allow machine descriptions to add more options... */
417 #ifdef ADDITIONAL_OPTIONS
418 ADDITIONAL_OPTIONS
419 ***************
420 *** 571,576 ****
421 --- 573,581 ----
422 case 11:
423 cdarg = optarg;
424 break;
425 + case 12:
426 + energize_id = optarg;
427 + break;
428 case 's':
429 symarg = optarg;
430 break;
431 ***************
432 *** 679,684 ****
433 --- 684,692 ----
434
435 /* Run the init function of each source file */
436
437 + /* Must call this first to setup tty */
438 + energize_initialize (energize_id, execarg);
439 +
440 initialize_cmd_lists (); /* This needs to be done first */
441 initialize_all_files ();
442 initialize_main (); /* But that omits this file! Do it now */
443 ***************
444 *** 853,859 ****
445 if (!setjmp (to_top_level))
446 {
447 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
448 ! command_loop ();
449 quit_command ((char *)0, instream == stdin);
450 }
451 }
452 --- 861,870 ----
453 if (!setjmp (to_top_level))
454 {
455 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
456 ! if (energize)
457 ! energize_main_loop();
458 ! else
459 ! command_loop ();
460 quit_command ((char *)0, instream == stdin);
461 }
462 }
463 ***************
464 *** 915,921 ****
465 else if (c->function.cfunc == NO_FUNCTION)
466 error ("That is not a command, just a help topic.");
467 else
468 ! (*c->function.cfunc) (arg, from_tty & caution);
469 }
470
471 /* Tell the user if the language has changed (except first time). */
472 --- 926,932 ----
473 else if (c->function.cfunc == NO_FUNCTION)
474 error ("That is not a command, just a help topic.");
475 else
476 ! energize_call_command (c, arg, from_tty & caution);
477 }
478
479 /* Tell the user if the language has changed (except first time). */
480 ***************
481 *** 1570,1576 ****
482 while (1)
483 {
484 dont_repeat ();
485 ! p = command_line_input ((char *) NULL, instream == stdin);
486 if (p == NULL)
487 /* Treat end of file like "end". */
488 break;
489 --- 1581,1587 ----
490 while (1)
491 {
492 dont_repeat ();
493 ! p = energize_command_line_input ((char *) NULL, instream == stdin);
494 if (p == NULL)
495 /* Treat end of file like "end". */
496 break;
497 ===================================================================
498 *** 1.32 1992/09/15 06:27:00
499 --- printcmd.c 1992/09/28 16:15:08
500 ***************
501 *** 778,783 ****
502 --- 778,792 ----
503 {
504 int histindex = record_latest_value (val);
505
506 + if (energize)
507 + {
508 + char buf[20];
509 +
510 + sprintf(buf, "$%d", histindex);
511 + energize_start_variable_annotation(buf, NULL, VALUE_TYPE(val),
512 + VALUE_ADDRESS(val), "");
513 + }
514 +
515 if (inspect)
516 printf_filtered ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
517 else
518 ***************
519 *** 784,789 ****
520 --- 793,799 ----
521 if (histindex >= 0) printf_filtered ("$%d = ", histindex);
522
523 print_formatted (val, format, fmt.size);
524 + energize_end_variable_annotation();
525 printf_filtered ("\n");
526 if (inspect)
527 printf_filtered("\") )\030");
528 ***************
529 *** 1652,1662 ****
530 --- 1662,1680 ----
531 standard indentation here is 4 spaces, and val_print indents
532 2 for each recurse. */
533 val = read_var_value (sym, FRAME_INFO_ID (fi));
534 +
535 + energize_start_variable_annotation(SYMBOL_NAME(sym), sym,
536 + VALUE_TYPE(val),
537 + VALUE_ADDRESS(val), "");
538 +
539 if (val)
540 val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val),
541 stream, 0, 0, 2, Val_no_prettyprint);
542 else
543 fputs_filtered ("???", stream);
544 +
545 + energize_end_variable_annotation();
546 +
547 first = 0;
548 }
549
550 ===================================================================
551 *** 1.35 1992/09/18 09:20:00
552 --- stack.c 1992/09/28 16:15:09
553 ***************
554 *** 159,165 ****
555 if (addressprint)
556 printf_filtered ("%s in ", local_hex_string(fi->pc));
557
558 ! fputs_demangled (fname, stdout, 0);
559 fputs_filtered (" (...)\n", stdout);
560
561 return;
562 --- 159,168 ----
563 if (addressprint)
564 printf_filtered ("%s in ", local_hex_string(fi->pc));
565
566 ! if (energize)
567 ! energize_annotate_function(fname, 0, level);
568 ! else
569 ! fputs_demangled (fname, stdout, 0);
570 fputs_filtered (" (...)\n", stdout);
571
572 return;
573 ***************
574 *** 218,224 ****
575 if (addressprint)
576 if (fi->pc != sal.pc || !sal.symtab)
577 printf_filtered ("%s in ", local_hex_string(fi->pc));
578 ! fputs_demangled (funname ? funname : "??", stdout, 0);
579 wrap_here (" ");
580 fputs_filtered (" (", stdout);
581 if (args)
582 --- 221,230 ----
583 if (addressprint)
584 if (fi->pc != sal.pc || !sal.symtab)
585 printf_filtered ("%s in ", local_hex_string(fi->pc));
586 ! if (energize)
587 ! energize_annotate_function(funname ? funname : "??", 0, level);
588 ! else
589 ! fputs_demangled (funname ? funname : "??", stdout, 0);
590 wrap_here (" ");
591 fputs_filtered (" (", stdout);
592 if (args)
593 ***************
594 *** 255,261 ****
595 {
596 if (addressprint && mid_statement)
597 printf_filtered ("%s\t", local_hex_string(fi->pc));
598 ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
599 }
600 current_source_line = max (sal.line - lines_to_list/2, 1);
601 }
602 --- 261,268 ----
603 {
604 if (addressprint && mid_statement)
605 printf_filtered ("%s\t", local_hex_string(fi->pc));
606 ! if (!energize)
607 ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
608 }
609 current_source_line = max (sal.line - lines_to_list/2, 1);
610 }
611 ***************
612 *** 429,435 ****
613 if (funname)
614 {
615 printf_filtered (" in ");
616 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
617 }
618 wrap_here (" ");
619 if (sal.symtab)
620 --- 436,446 ----
621 if (funname)
622 {
623 printf_filtered (" in ");
624 ! if (energize)
625 ! energize_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS,
626 ! selected_frame_level);
627 ! else
628 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
629 }
630 wrap_here (" ");
631 if (sal.symtab)
632 ===================================================================
633 *** 1.58 1992/09/19 16:55:36
634 --- symfile.c 1992/09/28 16:15:09
635 ***************
636 *** 614,619 ****
637 --- 614,621 ----
638 fflush (stdout);
639 }
640
641 + energize_symbol_file(objfile);
642 +
643 return (objfile);
644 }
645
646 ===================================================================
647 *** 1.63 1992/09/26 05:34:06
648 --- utils.c 1992/09/28 16:15:09
649 ***************
650 *** 700,720 ****
651 fflush (stdout);
652 va_start (args);
653 ctlstr = va_arg (args, char *);
654 vfprintf_filtered (stdout, ctlstr, args);
655 - va_end (args);
656 printf_filtered ("(y or n) ");
657 ! fflush (stdout);
658 ! answer = fgetc (stdin);
659 ! clearerr (stdin); /* in case of C-d */
660 ! if (answer == EOF) /* C-d */
661 ! return 1;
662 ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */
663 ! do
664 ! {
665 ! ans2 = fgetc (stdin);
666 ! clearerr (stdin);
667 ! }
668 ! while (ans2 != EOF && ans2 != '\n');
669 if (answer >= 'a')
670 answer -= 040;
671 if (answer == 'Y')
672 --- 700,731 ----
673 fflush (stdout);
674 va_start (args);
675 ctlstr = va_arg (args, char *);
676 + energize_query (ctlstr, args);
677 vfprintf_filtered (stdout, ctlstr, args);
678 printf_filtered ("(y or n) ");
679 ! if (energize)
680 ! {
681 ! char *buf;
682 !
683 ! buf = energize_command_line_input(0, 0);
684 ! answer = buf ? *buf : 'Y';
685 ! energize_acknowledge_query(buf);
686 ! }
687 ! else
688 ! {
689 ! fflush (stdout);
690 ! answer = fgetc (stdin);
691 ! clearerr (stdin); /* in case of C-d */
692 ! if (answer == EOF) /* C-d */
693 ! return 1;
694 ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */
695 ! do
696 ! {
697 ! ans2 = fgetc (stdin);
698 ! clearerr (stdin);
699 ! }
700 ! while (ans2 != EOF && ans2 != '\n');
701 ! }
702 if (answer >= 'a')
703 answer -= 040;
704 if (answer == 'Y')
705 ***************
706 *** 722,727 ****
707 --- 733,739 ----
708 if (answer == 'N')
709 return 0;
710 printf_filtered ("Please answer y or n.\n");
711 + va_end (args);
712 }
713 }
714
715 ***************
716 *** 1000,1005 ****
717 --- 1012,1023 ----
718 if (linebuffer == 0)
719 return;
720
721 + if (energize)
722 + {
723 + energize_fputs(linebuffer);
724 + return;
725 + }
726 +
727 /* Don't do any filtering if it is disabled. */
728 if (stream != stdout
729 || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX))
730 ===================================================================
731 *** 1.54 1992/09/15 06:27:03
732 --- valprint.c 1992/09/28 16:15:10
733 ***************
734 *** 488,493 ****
735 --- 488,494 ----
736 struct type **dont_print;
737 {
738 int i, len, n_baseclasses;
739 + char expr_tag[100]; /* Energize */
740
741 check_stub_type (type);
742
743 ***************
744 *** 552,557 ****
745 --- 553,565 ----
746 fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
747 fputs_filtered (" = ", stream);
748 }
749 +
750 + sprintf(expr_tag, ".%s", TYPE_FIELD_NAME(type, i));
751 +
752 + energize_start_variable_annotation(expr_tag, NULL,
753 + TYPE_FIELD_TYPE(type, i),
754 + (CORE_ADDR) (valaddr + TYPE_FIELD_BITPOS(type, i) / 8),
755 + "");
756 if (TYPE_FIELD_PACKED (type, i))
757 {
758 value v;
759 ***************
760 *** 570,575 ****
761 --- 578,584 ----
762 valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
763 0, stream, format, 0, recurse + 1, pretty);
764 }
765 + energize_end_variable_annotation();
766 }
767 if (pretty)
768 {
769 ***************
770 *** 804,809 ****
771 --- 813,819 ----
772 unsigned int rep1;
773 /* Number of repetitions we have detected so far. */
774 unsigned int reps;
775 + char expr_tag[100]; /* Energize */
776
777 if (i != 0)
778 if (arrayprint)
779 ***************
780 *** 825,830 ****
781 --- 835,845 ----
782 ++rep1;
783 }
784
785 + sprintf(expr_tag, "[%d]", i);
786 + energize_start_variable_annotation(expr_tag, NULL,
787 + elttype,
788 + (CORE_ADDR) (valaddr + i * eltlen),
789 + "");
790 if (reps > REPEAT_COUNT_THRESHOLD)
791 {
792 val_print (elttype, valaddr + i * eltlen,
793 ***************
794 *** 841,846 ****
795 --- 856,862 ----
796 recurse + 1, pretty);
797 things_printed++;
798 }
799 + energize_end_variable_annotation();
800 }
801 if (i < len)
802 fprintf_filtered (stream, "...");
803 ===================================================================
804 *** 1.5 1992/09/26 08:07:45
805 --- amix.mh 1992/09/28 16:15:10
806 ***************
807 *** 22,24 ****
808 --- 22,38 ----
809
810 # SVR4 puts the BSD compatible install in /usr/ucb.
811 INSTALL = /usr/ucb/install -c
812 +
813 + # These are the libs that are needed for the Energize version of gdb on
814 + # SVR4. Note that we MUST include the standard C library before libucb.a,
815 + # otherwise we get lots of broken stuff we don't want.
816 + ENERGIZE_LIB = energize/libconn.a
817 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
818 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
819 +
820 + # These are the libs that are needed for the Energize version of gdb on
821 + # SVR4. Note that we MUST include the standard C library before libucb.a,
822 + # otherwise we get lots of broken stuff we don't want.
823 + ENERGIZE_LIB = energize/libconn.a
824 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
825 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
826 ===================================================================
827 *** 1.5 1992/09/26 08:08:14
828 --- ncr3000.mh 1992/09/28 16:15:10
829 ***************
830 *** 38,40 ****
831 --- 38,59 ----
832 # The /usr/ucb/install program is incompatible (complains about unknown
833 # group staff). Use good old cp...
834 INSTALL = cp
835 +
836 + # These are the libs that are needed for the Energize version of gdb on
837 + # SVR4. Note that we MUST include the standard C library before libucb.a,
838 + # otherwise we get lots of broken stuff we don't want.
839 + XM_CLIBS = -L/usr/lib -lm -lnet -lresolv -lform -lsocket -lnsl -lc
840 +
841 + # These are the libs that are needed for the Energize version of gdb on
842 + # SVR4. Note that we MUST include the standard C library before libucb.a,
843 + # otherwise we get lots of broken stuff we don't want.
844 + ENERGIZE_LIB = energize/libconn.a
845 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
846 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
847 +
848 + # These are the libs that are needed for the Energize version of gdb on
849 + # SVR4. Note that we MUST include the standard C library before libucb.a,
850 + # otherwise we get lots of broken stuff we don't want.
851 + ENERGIZE_LIB = energize/libconn.a
852 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
853 + -lsocket -lc /usr/ucblib/libucb.a -lnsl